Re: [PATCH][DOC] Fix for PREPARE TRANSACTION doc and postgres_fdw message.
Etsuro Fujita <etsuro.fujita@gmail.com>
From: Etsuro Fujita <etsuro.fujita@gmail.com>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>, Gilles Darold <gilles@darold.net>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-11-07T08:20:07Z
Lists: pgsql-hackers
Horiguchi-san, On Thu, Nov 7, 2019 at 4:11 PM Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote: > At Wed, 6 Nov 2019 20:13:10 +0900, Etsuro Fujita <etsuro.fujita@gmail.com> wrote in > > On Wed, Nov 6, 2019 at 4:35 PM Michael Paquier <michael@paquier.xyz> wrote: > > > On Wed, Nov 06, 2019 at 03:12:04PM +0900, Etsuro Fujita wrote: > > > > On Wed, Nov 6, 2019 at 1:13 PM Michael Paquier <michael@paquier.xyz> wrote: > > > >> "postgres_fdw foreign tables" sounds weird to me. Could "foreign > > > >> tables using postgres_fdw" be a better wording? I am wondering as > > > >> well if we should not split this information into two parts: one for > > > >> the actual error message which only mentions foreign tables, and a > > > >> second one with a hint to mention that postgres_fdw has been used. > > > > > > > > We use "postgres_fdw foreign tables" or "postgres_fdw tables" in > > > > release notes, so I thought it was OK to use that in error messages as > > > > well. But actually, these wordings are not suitable for error > > > > messages? > > > > > > It is true that the docs of postgres_fdw use that and that it is used > > > in some comments. Still, I found this wording a bit weird.. If you > > > think that what you have is better, I am also fine to let you have the > > > final word, so please feel to ignore me :) > > > > I'd like to hear the opinions of others. > > FWIW, I see it a bit weird, too. Only two people complaining about the wording? Considering as well that we use that wording in the docs and there were no complains about that IIRC, I don't feel a need to change that, TBH. > And perhaps "prepare" should be in > upper case letters. Seems like a good idea. > 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. > > A verbose alternative can be: > > "cannot PREPARE a transaction that has modified data on foreign tables using postgres_fdw" I don't think that's better, because that doesn't address the original issue reported in this thread, as Gilles pointed out just before in his email. See the commit message in the patch I posted. Thanks for the comments! Best regards, Etsuro Fujita
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