From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Michael Holzman <michaelholzman(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: FDW and transaction management |
Date: | 2016-02-08 16:25:35 |
Message-ID: | 56B8C17F.9070806@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 02/07/2016 10:24 PM, Michael Holzman wrote:
> Greetings,
>
> I am trying to understand the subject. I see in the documentation
> (http://www.postgresql.org/docs/current/static/postgres-fdw.html) that
>
>
> F.31.3. Transaction Management
>
> During a query that references any remote tables on a foreign
> server,postgres_fdwopens a transaction on the remote server if one is
> not already open corresponding to the current local transaction. The
> remote transaction is committed or aborted when the local transaction
> commits or aborts. Savepoints are similarly managed by creating
> corresponding remote savepoints.
>
> The remote transaction usesSERIALIZABLEisolation level when the local
> transaction hasSERIALIZABLEisolation level; otherwise it usesREPEATABLE
> READisolation level. This choice ensures that if a query performs
> multiple table scans on the remote server, it will get
> snapshot-consistent results for all the scans. A consequence is that
> successive queries within a single transaction will see the same data
> from the remote server, even if concurrent updates are occurring on the
> remote server due to other activities. That behavior would be expected
> anyway if the local transaction usesSERIALIZABLEorREPEATABLE
> READisolation level, but it might be surprising for aREAD COMMITTEDlocal
> transaction. A futurePostgreSQLrelease might modify these rules.
>
>
> Unfortunately, the Postgres Wiki
> (https://wiki.postgresql.org/wiki/SQL/MED#No_transaction_management)
> states quite the opposite:
>
>
> No transaction management
>
> FDW for PostgreSQL never emit transaction command such as BEGIN,
> ROLLBACK and COMMIT. Thus, all SQL statements are executed in each
> transaction when 'autocommit' was set to 'on'.
>
>
> What is the correct state of the subject?
The documentation.
If you look a bottom of Wiki page you will find:
This page was last modified on 6 March 2012, at 11:11
>
>
> --
> Regards,
> Michael Holzman
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2016-02-08 16:33:35 | Re: Trouble installing postgresql server on Amazon Linux |
Previous Message | David G. Johnston | 2016-02-08 16:05:01 | Re: COALESCE requires NULL from scalar subquery has a type |