Re: [PATCH][DOC] Fix for PREPARE TRANSACTION doc and postgres_fdwmessage. - Mailing list pgsql-hackers

From Kyotaro Horiguchi
Subject Re: [PATCH][DOC] Fix for PREPARE TRANSACTION doc and postgres_fdwmessage.
Date
Msg-id 20191107.161047.8804898233547736.horikyota.ntt@gmail.com
Whole thread Raw
In response to Re: [PATCH][DOC] Fix for PREPARE TRANSACTION doc and postgres_fdw message.  (Etsuro Fujita <etsuro.fujita@gmail.com>)
Responses Re: [PATCH][DOC] Fix for PREPARE TRANSACTION doc and postgres_fdwmessage.  (Gilles Darold <gilles@darold.net>)
Re: [PATCH][DOC] Fix for PREPARE TRANSACTION doc and postgres_fdw message.  (Etsuro Fujita <etsuro.fujita@gmail.com>)
List pgsql-hackers
Hello.

At Wed, 6 Nov 2019 20:13:10 +0900, Etsuro Fujita <etsuro.fujita@gmail.com> wrote in 
> Hi Michael-san,
> 
> 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. 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.

A verbose alternative can be:

"cannot PREPARE a transaction that has modified data on foreign tables using postgres_fdw"

Or I think different style is OK here since the message is not of core
but of an extension.

"postgres_fdw doesn't support PREPARE of a transaction that has modified data on foreign tables"

That could be shorter or simpler, of course.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Application name for pg_basebackup and friends
Next
From: Michael Paquier
Date:
Subject: Re: [bug fix] Produce a crash dump before main() on Windows