Decoding of two-phase xacts missing from CREATE_REPLICATION_SLOT command

Jeff Davis <pgsql@j-davis.com>

From: Jeff Davis <pgsql@j-davis.com>
To: pgsql-hackers@postgresql.org
Cc: Amit Kapila <akapila@postgresql.org>, Ajin Cherian <itsajin@gmail.com>, vignesh C <vignesh21@gmail.com>, Peter Smith <smithpb2250@gmail.com>
Date: 2021-06-02T23:17:58Z
Lists: pgsql-hackers
Commit 19890a064 changed pg_create_logical_replication_slot() to allow
decoding of two-phase transactions, but did not extend the
CREATE_REPLICATION_SLOT command to support it. Strangely, it does
extend the CreateReplicationSlotCmd struct to add a "two_phase" field,
but doesn't set it anywhere.

There were patches[1] from around the time of the commit to support
CREATE_REPLICATION_SLOT as well.

Is there a reason to support two-phase decoding, but not with the
replication protocol? If so, why change the CreateReplicationSlotCmd
structure as though we will support it?

Regards,
	Jeff Davis

[1] 
https://www.postgresql.org/message-id/CAFPTHDZ2rigOf0oM0OBhv1yRmyMO5-SQfT9FCLYj-Jp9ShXB3A@mail.gmail.com





Commits

  1. Remove two_phase variable from CreateReplicationSlotCmd struct.

  2. Add option to enable two_phase commits via pg_create_logical_replication_slot.