Dear hackers, Here is a new patch.
Previously I wrote: > Based on above idea, I made new version patch which some functionalities were > exported from pg_resetwal. In this approach, pg_upgrade itself removed WALs > and > then create logical slots, then pg_resetwal would be called with new option > --no-switch, which avoid to switch a WAL segment file. The option is only used > for the upgrading purpose so it is not written in doc and usage(). This option > is not required if pg_resetwal -o does not discard WAL records. Please see the > fork thread [1]. But for now, these changes were reverted because changing pg_resetwal -o stuff may be a bit risky. This has been located more than ten years so that we should be more careful for modifying. Also, I cannot come up with problems if slots are created after the pg_resetwal. Background processes would not generate decodable changes (listed in [1]), and BGworkers by extensions could be ignored [2]. Based on the discussion on forked thread [3] and if it is accepted, we will apply again. Also. some comments and function name was improved. [1]: https://www.postgresql.org/message-id/TYAPR01MB58660273EACEFC5BF256B133F50DA%40TYAPR01MB5866.jpnprd01.prod.outlook.com [2]: https://www.postgresql.org/message-id/CAA4eK1L4JB%2BKH_4EQryDEhyaLBPW6V20LqjdzOxCWyL7rbxqsA%40mail.gmail.com [3]: https://www.postgresql.org/message-id/flat/CAA4eK1KRyPMiY4fW98qFofsYrPd87Oc83zDNxSeHfTYh_asdBg%40mail.gmail.com Best Regards, Hayato Kuroda FUJITSU LIMITED
v50-0001-pg_upgrade-Allow-to-replicate-logical-replicatio.patch
Description: v50-0001-pg_upgrade-Allow-to-replicate-logical-replicatio.patch