Re: [PATCH][DOC] Fix for PREPARE TRANSACTION doc and postgres_fdw message.
Kyotaro Horiguchi <horikyota.ntt@gmail.com>
From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: gilles@darold.net
Cc: etsuro.fujita@gmail.com, michael@paquier.xyz,
pgsql-hackers@lists.postgresql.org
Date: 2019-11-07T08:22:18Z
Lists: pgsql-hackers
Hello Gilles. I made a silly mistake. At Thu, 7 Nov 2019 09:05:55 +0100, Gilles Darold <gilles@darold.net> wrote in > > FWIW, I see it a bit weird, too. And perhaps "prepare" should be in > > upper case letters. Plus, any operation including a SELECT on a > > temporary table inhibits PREAPRE TRANSACTION, but the same on a > > postgres_fdw foreign tables is not. So the error message is rather > > wrong. > > > This is not what I've experienced, see the first message of the thread. > A SELECT on foreign table prevent to use PREPARE TRANSACTION like with > temporary table. Perhaps postgres_fdw should not throw an error with > readonly queries on foreign tables but I guess that it is pretty hard to > know especially on a later PREPARE event. But maybe I'm wrong, it is not > easy every day :-) Can you share the SQL code you have executed to allow > PREPARE transaction after a SELECT on a postgres_fdw foreign table? Oooops! After reading this, I came to be afraid that I did something wrong, then I rechecked actual behavior. Finally I found that SELECT * FROM foregn_tbl prohibits PREPARE TRANSACTION. I might have used a local table instead of foreign tabel at the previous trial. Sorry for the mistake and thank you for pointing it. So my fixed proposals are: "cannot PREPARE a transaction that has operated on foreign tables using postgres_fdw" Or "postgres_fdw doesn't support PREPARE of a transaction that has accessed foreign tables" -- Kyotaro Horiguchi NTT Open Source Software Center
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