On Wed, Oct 21, 2020 at 1:38 PM Peter Smith <smithpb2...@gmail.com> wrote: > > The PG docs for PREPARE TRANSACTION [1] don't say anything about an > empty (zero length) transaction-id. > e.g. PREPARE TRANSACTION ''; > [1] https://www.postgresql.org/docs/current/sql-prepare-transaction.html > > ~ > > Meanwhile, during testing I found the 2PC prepare hangs when an empty > id is used. >
Can you please take an example to explain what you are trying to say? I have tried below and doesn't face any problem: postgres=# Begin; BEGIN postgres=*# select txid_current(); txid_current -------------- 534 (1 row) postgres=*# Prepare Transaction 'foo'; PREPARE TRANSACTION postgres=# Commit Prepared 'foo'; COMMIT PREPARED postgres=# Begin; BEGIN postgres=*# Prepare Transaction 'foo'; PREPARE TRANSACTION postgres=# Commit Prepared 'foo'; COMMIT PREPARED -- With Regards, Amit Kapila.