Repository navigation
pg_autoctl: relocate vendored pg_receivewal to src/bin/common - #1194
Merged
Merged
Conversation
pg_walserver's own embedded pull capturer (a following commit) needs to fork and call pg_receivewal_main() in-process, exactly like pg_autoctl's service_archiver_pgreceivewal_ctl.c already does -- so the vendored pg_receivewal sources move to src/bin/common/vendor/pg_receivewal/, the same relocation fetch_client.c already went through in this PR, so both binaries build the identical sources instead of duplicating them. Build-only move: Makefile.common now owns the shared include path and the pgrw-*.o object build rule (named pgrw-*, not vendor-*, so it can never collide with a caller's own "vendor-%.o: .../vendor/%.c" pattern rule, e.g. pg_walserver's own vendor/tar.c); pg_autoctl's Makefile drops its own copy of that rule and links the shared PG_RECEIVEWAL_VENDOR_OBJS instead. .gitattributes' -citus-style exceptions and one header comment follow the files to their new path. No behavior change; pg_autoctl still builds and links exactly the same object code as before.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pure build-only relocation, split out of #1193 for isolated review before that
PR rebases on top of it.
pg_walserver's own embedded pull capturer (landing later in #1193) needs tofork and call
pg_receivewal_main()in-process, exactly likepg_autoctl'sservice_archiver_pgreceivewal_ctl.calready does -- so the vendoredpg_receivewalsources move tosrc/bin/common/vendor/pg_receivewal/, thesame relocation
fetch_client.calready went through earlier in this samePR, so both binaries build the identical sources instead of duplicating them.
src/bin/common/Makefile.commonnow owns the shared include path and thepgrw-*.oobject build rule (namedpgrw-*, notvendor-*, so it can nevercollide with a caller's own
vendor-%.o: .../vendor/%.cpattern rule, e.g.pg_walserver's ownvendor/tar.c);pg_autoctl's Makefile drops its owncopy of that rule and links the shared
PG_RECEIVEWAL_VENDOR_OBJSinstead..gitattributes'-citus-styleexceptions and one header comment follow thefiles to their new path.
No behavior change:
pg_autoctlstill builds and links exactly the sameobject code as before. Verified with a clean
docker build --target run(zero warnings) and
citus_indent --check/ci/banned.h.shboth clean.