RE: [PoC] pg_upgrade: allow to upgrade publisher node
Zhijie Hou (Fujitsu) <houzj.fnst@fujitsu.com>
From: "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Bruce Momjian <bruce@momjian.us>, "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Julien Rouhaud <rjuju123@gmail.com>, vignesh C <vignesh21@gmail.com>, Masahiko Sawada <sawada.mshk@gmail.com>
Date: 2023-08-21T09:45:44Z
Lists: pgsql-hackers
On Monday, August 21, 2023 11:21 AM Amit Kapila <amit.kapila16@gmail.com> wrote: > > On Sun, Aug 20, 2023 at 6:49 PM Masahiko Sawada > <sawada.mshk@gmail.com> wrote: > > > > On Thu, Aug 17, 2023 at 10:31 PM Amit Kapila <amit.kapila16@gmail.com> > wrote: > > > > > > > > > > > Sorry I was not clear. I meant the logical replication slots that > > > > are > > > > *not* used by logical replication, i.e., are created manually and > > > > used by third party tools that periodically consume decoded > > > > changes. As we discussed before, these slots will never be able to > > > > pass that confirmed_flush_lsn check. > > > > > > > > > > I think normally one would have a background process to periodically > > > consume changes. Won't one can use the walsender infrastructure for > > > their plugins to consume changes probably by using replication > > > protocol? > > > > Not sure. > > > > I think one can use Streaming Replication Protocol to achieve it [1]. > > > > Also, I feel it is the plugin author's responsibility to consume > > > changes or advance slot to the required position before shutdown. > > > > How does the plugin author ensure that the slot consumes all WAL > > records including shutdown_checkpoint before shutdown? > > > > By using "Streaming Replication Protocol" so that walsender can take care of it. > If not, I think users should drop such slots before the upgrade because anyway, > they won't be usable after the upgrade. Yes, I think pglogical is one example which start a bgworker(apply worker) on client to consume changes which also uses Streaming Replication Protocol IIRC. And pg_recvlogical is another example which connects to walsender and consume changes. Best Regards, Hou zj
Commits
-
Fix issues in binary_upgrade_logical_slot_has_caught_up().
- 0bf62460bb9e 17.0 landed
-
Fix a random failure in 003_logical_slots.pl.
- 63c5df126abb 17.0 landed
-
Fix a test in 003_logical_slots.
- 3e36e48d8efe 17.0 landed
-
Fix uninitialized slot array access during the upgrade.
- a7db71ed2787 17.0 landed
-
Fix the test 003_logical_slots.
- 8af917be6bad 17.0 landed
-
Commit b195e6d482 forgot to update meson.build.
- 8949b978ff49 17.0 landed
-
Use shorter file names in the upgrade logical slots test.
- b195e6d482b8 17.0 landed
-
Migrate logical slots to the new node during an upgrade.
- 29d0a77fa660 17.0 landed
-
Flush logical slots to disk during a shutdown checkpoint if required.
- e0b2eed047df 17.0 landed
-
Prevent possibility of panics during shutdown checkpoint.
- c6c333436491 10.0 cited