pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: postgres_fdw: Fix corner cases in transaction mode propagation.
2+ messages / 1 participants
[nested] [flat]

* pgsql: postgres_fdw: Fix corner cases in transaction mode propagation.
@ 2026-10-05 07:17  Etsuro Fujita <efujita@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Etsuro Fujita @ 2026-10-05 07:17 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

postgres_fdw: Fix corner cases in transaction mode propagation.

This commit addresses the following issues in commit de28140de:

* When the local transaction was DEFERRABLE, begin_remote_xact() started
  a remote transaction in the same mode without checking the remote
  server version.  Since DEFERRABLE is supported only in v9.1 and later,
  this would cause a syntax error on older remote servers.  Fix this by
  propagating the mode only to remote servers that support it.
* pgfdw_xact_callback() committed remote transactions without
  synchronizing the read-only mode.  If the local transaction had become
  READ ONLY since the last remote operation, this would cause deferred
  triggers on remote servers to still run in READ WRITE mode.  Fix this
  by synchronizing the mode at commit time.
* The documentation did not match the actual implementation.  Update the
  documentation to reflect the implementation.

Reported-by: Fujii Masao <masao.fujii@gmail.com>
Author: Etsuro Fujita <etsuro.fujita@gmail.com>
Reviewed-by: Matheus Alcantara <matheusssilv97@gmail.com>
Discussion: https://postgr.es/m/CAHGQGwE4UMaWGOZq1Z7YUTUSg-CgL4yAzO5YaGwTZe1-6Pjg2g%40mail.gmail.com
Backpatch-through: 19

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d6393fc40a59830a88a79bdf08e962122fa9c631

Modified Files
--------------
contrib/postgres_fdw/connection.c              | 54 +++++++++++++++++++++++---
contrib/postgres_fdw/expected/postgres_fdw.out | 30 ++++++++++++--
contrib/postgres_fdw/sql/postgres_fdw.sql      | 30 ++++++++++++--
doc/src/sgml/postgres-fdw.sgml                 | 15 +++----
4 files changed, 106 insertions(+), 23 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: postgres_fdw: Fix corner cases in transaction mode propagation.
@ 2026-10-05 07:17  Etsuro Fujita <efujita@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Etsuro Fujita @ 2026-10-05 07:17 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

postgres_fdw: Fix corner cases in transaction mode propagation.

This commit addresses the following issues in commit de28140de:

* When the local transaction was DEFERRABLE, begin_remote_xact() started
  a remote transaction in the same mode without checking the remote
  server version.  Since DEFERRABLE is supported only in v9.1 and later,
  this would cause a syntax error on older remote servers.  Fix this by
  propagating the mode only to remote servers that support it.
* pgfdw_xact_callback() committed remote transactions without
  synchronizing the read-only mode.  If the local transaction had become
  READ ONLY since the last remote operation, this would cause deferred
  triggers on remote servers to still run in READ WRITE mode.  Fix this
  by synchronizing the mode at commit time.
* The documentation did not match the actual implementation.  Update the
  documentation to reflect the implementation.

Reported-by: Fujii Masao <masao.fujii@gmail.com>
Author: Etsuro Fujita <etsuro.fujita@gmail.com>
Reviewed-by: Matheus Alcantara <matheusssilv97@gmail.com>
Discussion: https://postgr.es/m/CAHGQGwE4UMaWGOZq1Z7YUTUSg-CgL4yAzO5YaGwTZe1-6Pjg2g%40mail.gmail.com
Backpatch-through: 19

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7d3d2db7d5e533fa42a4202c7d308cbb0cbf9333

Modified Files
--------------
contrib/postgres_fdw/connection.c              | 54 +++++++++++++++++++++++---
contrib/postgres_fdw/expected/postgres_fdw.out | 30 ++++++++++++--
contrib/postgres_fdw/sql/postgres_fdw.sql      | 30 ++++++++++++--
doc/src/sgml/postgres-fdw.sgml                 | 15 +++----
4 files changed, 106 insertions(+), 23 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2026-10-05 07:17 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-10-05 07:17 pgsql: postgres_fdw: Fix corner cases in transaction mode propagation. Etsuro Fujita <efujita@postgresql.org>
2026-10-05 07:17 pgsql: postgres_fdw: Fix corner cases in transaction mode propagation. Etsuro Fujita <efujita@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox