On Wed, Jan 15, 2025 at 5:33 PM Shubham Khanna <[email protected]>
wrote:
> Previously, the warning was necessary because the 'two-phase' option
> was not available, and users needed to be informed about the default
> behavior regarding 'two-phase' commit. However, with the recent
> addition of the 'two-phase' option, users can now directly configure
> this behavior during the setup process.
> Given this enhancement, the warning message is no longer relevant and
> should be removed from the documentation to reflect the latest changes
> accurately. Updating the documentation will help ensure that it aligns
> with the current functionality and avoids any potential confusion for
> users.
Hi Shubham,
Even though the documentation is updated, the actual code still gives a
warning, when you try and create pg_createsubscriber with the
--enable-two-phase option:
pg_createsubscriber: warning: two_phase option will not be enabled for
replication slots
pg_createsubscriber: detail: Subscriptions will be created with the
two_phase option disabled. Prepared transactions will be replicated at
COMMIT PREPARED.
This is coming from code in check_publisher()
if (max_prepared_transactions != 0)
{
pg_log_warning("two_phase option will not be enabled for
replication slots");
pg_log_warning_detail("Subscriptions will be created with the
two_phase option disabled. "
"Prepared transactions will be replicated at
COMMIT PREPARED.");
}
I think this code needs to be updated as well.
regards,
Ajin Cherian
Fujitsu Australia