The reason was that the ALTER SUBSCRIPTION .. SET PUBLICATION will lead to the restarting of apply worker and after the restart, the apply worker will use the existing slot and replication origin corresponding to the subscription. Now, it is possible that before restart the origin has not been updated and the WAL start location points to a location before where PUBLICATION exists which can lead to the error "publication ... does not exist". Fix it by recreating the subscription as a newly created subscription will start processing WAL from the recent WAL location and will see the required publication. This behavior has existed from the time logical replication was introduced but is exposed by this test and we have started a discussion for a better fix for this problem. As per Buildfarm Diagnosed-by: Amit Kapila Author: Vignesh C Discussion: https://postgr.es/m/3307255.1706911634@sss.pgh.pa.us |
||
---|---|---|
.. | ||
t | ||
.gitignore | ||
Makefile | ||
README | ||
meson.build |
README
src/test/subscription/README Regression tests for subscription/logical replication ===================================================== This directory contains a test suite for subscription/logical replication. Running the tests ================= NOTE: You must have given the --enable-tap-tests argument to configure. Also, to use "make installcheck", you must have built and installed contrib/hstore in addition to the core code. Run make check or make installcheck You can use "make installcheck" if you previously did "make install". In that case, the code in the installation tree is tested. With "make check", a temporary installation tree is built from the current sources and then tested. Either way, this test initializes, starts, and stops several test Postgres clusters. See src/test/perl/README for more info about running these tests.