From: | Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> |
---|---|
To: | Gilles Darold <gilles(at)darold(dot)net> |
Cc: | "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: [PATCH][DOC] Fix for PREPARE TRANSACTION doc and postgres_fdw message. |
Date: | 2019-11-05 09:35:54 |
Message-ID: | CAPmGK14xPTGHKgo_AkGL__fzdLgxpvSoy-zxUzOvD10H7dx8bg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi Gilles,
On Sat, Nov 2, 2019 at 1:29 AM Gilles Darold <gilles(at)darold(dot)net> wrote:
> 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".
I'm not sure that's a good idea because file_fdw works well for
PREPARE TRANSACTION! How about adding a note about that to the
section of Transaction Management in the postgres_fdw documentation
like the attached?
> 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
+1 (I too think it would be better to use "foreign tables" rather
than "remote tables" as pointed by Michael-san, but I think it might
be much better to use "postgres_fdw foreign tables", not just "foreign
tables".)
Best regards,
Etsuro Fujita
Attachment | Content-Type | Size |
---|---|---|
improve-postgres-fdw-doc.patch | application/octet-stream | 539 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | k.jamison@fujitsu.com | 2019-11-05 09:58:22 | RE: [Patch] Optimize dropping of relation buffers using dlist |
Previous Message | Amit Kapila | 2019-11-05 09:22:21 | Re: cost based vacuum (parallel) |