feat(data): manage Postgres Advanced logical replication - #3902
Conversation
michaelmalave
left a comment
There was a problem hiding this comment.
Some small updates requested with a few findings.
56f8038 to
4218d52
Compare
jdowning
left a comment
There was a problem hiding this comment.
Submitted the three follow-up responses after rebasing the branch onto current main.
|
Including for record, this was the full test suite run to confirm functionality and errors. All completed within expectations confirming functionality. npm install All commands run via the compiled ./bin/run (dev mode ./bin/dev.js throws .ts.ts resolution errors).
./bin/run data:pg:logical-replication:publishing:enable $DB -a $APP Wait until enablement finishes before creating publications — poll with: ./bin/run data:pg:info $DB -a $APP # wait for it to settle (~2.5 min first time)
schema-scoped./bin/run data:pg:logical-replication:publications:create $DB --name orders_pub --schema public -a $APP all-schemas./bin/run data:pg:logical-replication:publications:create $DB --name all_pub --all-schemas -a $APP negative: both --schema and --table → should error./bin/run data:pg:logical-replication:publications:create $DB --name bad1 --schema public --table public.orders -a $APP negative: no target flag → should error./bin/run data:pg:logical-replication:publications:create $DB --name bad2 -a $APP
./bin/run data:pg:logical-replication:publications $DB -a $APP
./bin/run data:pg:logical-replication:publications:update $DB --name orders_pub --all-schemas -a $APP
wrong confirm → rejected./bin/run data:pg:logical-replication:publications:destroy $DB --name orders_pub --confirm WRONG -a $APP correct confirm (app name) → destroys./bin/run data:pg:logical-replication:publications:destroy $DB --name orders_pub --confirm $APP -a $APP
./bin/run data:pg:lr:publications $DB -a $APP
./bin/run data:pg:logical-replication:publications DATABASE_URL -a general-test-app → Error: You can only use this command on Advanced-tier databases. |
michaelmalave
left a comment
There was a problem hiding this comment.
Validation completed and full set of commands + functionality validated (see prior comment). This is approved.
Add commands to enable logical replication publishing and subscribing\non Postgres Advanced databases.\n\nAdd publication list, info, create, update, and destroy operations\nwith table- and schema-scoped targets. Include --all-schemas as an\nopinionated setup path for all current customer schemas, while making\nits non-continuous behavior explicit.\n\nResolve and reject non-Advanced databases before contacting the Data\nAPI, preserve destructive confirmation for publication removal, and\ncover the command flows with unit tests.
Consume publication collection responses through items, count, and limit\nand read individual publications directly from the response body.\n\nAdd data:pg:lr aliases for logical replication enablement and\npublication management commands.
Co-authored-by: Helen Cheng <48834224+heicheng18@users.noreply.github.com> Signed-off-by: Justin Downing <justin@downing.us>
Co-authored-by: Helen Cheng <48834224+heicheng18@users.noreply.github.com> Signed-off-by: Justin Downing <justin@downing.us>
Co-authored-by: Helen Cheng <48834224+heicheng18@users.noreply.github.com> Signed-off-by: Justin Downing <justin@downing.us>
Co-authored-by: Helen Cheng <48834224+heicheng18@users.noreply.github.com> Signed-off-by: Justin Downing <justin@downing.us>
Co-authored-by: Helen Cheng <48834224+heicheng18@users.noreply.github.com> Signed-off-by: Justin Downing <justin@downing.us>
Co-authored-by: Helen Cheng <48834224+heicheng18@users.noreply.github.com> Signed-off-by: Justin Downing <justin@downing.us>
Co-authored-by: Helen Cheng <48834224+heicheng18@users.noreply.github.com> Signed-off-by: Justin Downing <justin@downing.us>
Co-authored-by: Helen Cheng <48834224+heicheng18@users.noreply.github.com> Signed-off-by: Justin Downing <justin@downing.us>
Co-authored-by: Helen Cheng <48834224+heicheng18@users.noreply.github.com> Signed-off-by: Justin Downing <justin@downing.us>
Summary
Add commands to enable logical replication publishing and subscribing on Postgres Advanced databases.
Add publication list, info, create, update, and destroy operations with table and schema scoped targets. Include --all-schemas as an opinionated setup path for all current customer schemas, while making its non-continuous behavior explicit.
Resolve and reject non-Advanced databases before contacting the Data API, preserve destructive confirmation for publication removal, and cover the command flows with unit tests.
Type of Change
Breaking Changes (major semver update)
!after your change type to denote a change that breaks current behaviorFeature Additions (minor semver update)
Patch Updates (patch semver update)
Testing
Notes:
Steps:
Screenshots (if applicable)
Related Issues
GitHub issue: #[GitHub issue number]
GUS work item: W-24080815