Re: pg_upgrade and logical replication
vignesh C <vignesh21@gmail.com>
From: vignesh C <vignesh21@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>,
Justin Pryzby <pryzby@telsasoft.com>, Masahiko Sawada <sawada.mshk@gmail.com>,
Michael Paquier <michael@paquier.xyz>, Peter Smith <smithpb2250@gmail.com>, Julien Rouhaud <rjuju123@gmail.com>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2024-03-27T06:27:29Z
Lists: pgsql-hackers
Attachments
- v1-0001-Fix-random-upgrade-failure-test-in-004_subscripti.patch (text/x-patch) patch v1-0001
On Mon, 19 Feb 2024 at 12:38, Amit Kapila <amit.kapila16@gmail.com> wrote: > > On Mon, Feb 19, 2024 at 6:54 AM Hayato Kuroda (Fujitsu) > <kuroda.hayato@fujitsu.com> wrote: > > > > Thanks for reviewing! PSA new version. > > > > Pushed this after making minor changes in the comments. Recently there was a failure in 004_subscription tap test at [1]. In this failure, the tab_upgraded1 table was expected to have 51 records but has only 50 records. Before the upgrade both publisher and subscriber have 50 records. After the upgrade we have inserted one record in the publisher, now tab_upgraded1 will have 51 records in the publisher. Then we start the subscriber after changing max_logical_replication_workers so that apply workers get started and apply the changes received. After starting we enable regress_sub5, wait for sync of regress_sub5 subscription and check for tab_upgraded1 and tab_upgraded2 table data. In a few random cases the one record that was inserted into tab_upgraded1 table will not get replicated as we have not waited for regress_sub4 subscription to apply the changes from the publisher. The attached patch has changes to wait for regress_sub4 subscription to apply the changes from the publisher before verifying the data. [1] - https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=mamba&dt=2024-03-26%2004%3A23%3A13 Regards, Vignesh
Commits
-
pg_upgrade: Retrieve subscription count more efficiently.
- 73de50e13e39 17.0 landed
- 364509a2e7f9 18.0 landed
-
Fix random failure in 004_subscription.
- 677a45c4ae16 17.0 landed
-
Fix 004_subscription.pl to allow its usage in --link mode.
- f17529b71097 17.0 landed
-
Allow upgrades to preserve the full subscription's state.
- 9a17be1e244a 17.0 landed
-
Prevent startup of logical replication launcher during pg_upgrade
- 7021d3b17664 17.0 landed