Re: [PoC] pg_upgrade: allow to upgrade publisher node
Bruce Momjian <bruce@momjian.us>
From: Bruce Momjian <bruce@momjian.us>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Julien Rouhaud <rjuju123@gmail.com>, Masahiko Sawada <sawada.mshk@gmail.com>, "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, vignesh C <vignesh21@gmail.com>
Date: 2023-08-11T18:03:47Z
Lists: pgsql-hackers
On Fri, Aug 11, 2023 at 11:18:09AM +0530, Amit Kapila wrote: > On Fri, Aug 11, 2023 at 10:43 AM Julien Rouhaud <rjuju123@gmail.com> wrote: > > I disagree. As I mentioned before any module registered in > > shared_preload_libraries can spawn background workers which can perform any > > activity. There were previous reports of corruption because of multi-xact > > being generated by such bgworkers during pg_upgrade, I'm pretty sure that there > > are some modules that create objects (automatic partitioning tools for > > instance). It's also unclear to me what would happen if some writes are > > performed by such module at various points of the pg_upgrade process. Couldn't > > that lead to either data loss or broken slot (as it couldn't stream changes > > from older major version)? > > It won't be any bad than what can happen to tables. If we know that > such bgworkers can cause corruption if they do writes during the > upgrade, I don't think it is the job of this patch to prevent the > related scenarios. We can probably disallow the creation of new slots > during the binary upgrade but that also I am not sure. I guess it > would be better to document such hazards as a first step and then > probably write a patch to prevent WAL writes or something along those > lines. Yes, if users are connecting to the clusters during pg_upgrade, we have many more problems than slots. -- Bruce Momjian <bruce@momjian.us> https://momjian.us EDB https://enterprisedb.com Only you can decide what is important to you.
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