Kevin Grittner <[email protected]> wrote:
> Having pg_dump use repeatable read transactions for the processes
> that import the snapshot would work fine, as long as they are
> reading a snapshot which was captured by a serializable read only
> deferrable transaction.
It looks like the attached patch does it (although it is only
lightly tested so far and only on the master branch). This seems
like a back-patchable bug fix (to 9.3).
Thoughts?
--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index c3ebb3a..65ccc93 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -1011,7 +1011,7 @@ setup_connection(Archive *AH, DumpOptions *dopt, const char *dumpencoding,
ExecuteSqlStatement(AH, "BEGIN");
if (AH->remoteVersion >= 90100)
{
- if (dopt->serializable_deferrable)
+ if (dopt->serializable_deferrable && AH->sync_snapshot_id == NULL)
ExecuteSqlStatement(AH,
"SET TRANSACTION ISOLATION LEVEL "
"SERIALIZABLE, READ ONLY, DEFERRABLE");
--
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers