[PATCH][DOC] Fix for PREPARE TRANSACTION doc and postgres_fdw message.
Gilles DAROLD <gilles@darold.net>
From: Gilles Darold <gilles@darold.net>
To: "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2019-11-01T16:29:23Z
Lists: pgsql-hackers
Attachments
- fix_prepare_transaction_doc-v1.diff (text/x-patch) patch v1
- fix_message_pg_fdw_v1.diff (text/x-patch) patch v1
Hi,
As per the following code, t1 is a remote table through postgres_fdw:
test=# BEGIN;
BEGIN
test=# SELECT * FROM t1;
...
test=# PREPARE TRANSACTION 'gxid1';
ERROR: cannot prepare a transaction that modified remote tables
I have attached a patch to the documentation that adds remote tables to
the list of objects where any operation prevent using a prepared
transaction, currently it is just notified "operations involving
temporary tables or the session's temporary namespace".
The second patch modify the message returned by postgres_fdw as per the
SELECT statement above the message should be more comprehensible with:
ERROR: cannot PREPARE a transaction that has operated on remote tables
like for temporary objects:
ERROR: cannot PREPARE a transaction that has operated on temporary
objects
Best regards,
--
Gilles
--
Gilles Darold
http://www.darold.net/
Commits
-
Add regression test for two-phase transaction in postgres_fdw
- 94fec48516a7 13.0 landed
-
postgres_fdw: Fix error message for PREPARE TRANSACTION.
- 1bd67d535843 9.4.25 landed
- b260ce9c19b6 9.5.20 landed
- bca0aed2d01c 9.6.16 landed
- 0c7a28a5eabd 10.11 landed
- 042e82cef949 11.6 landed
- 0cc31cc32da0 12.1 landed
- 879c11761571 13.0 landed