Re: [HACKERS] pg_dump with both --serializable-deferrable and -j

2015-01-30 Thread Kevin Grittner
Tom Lane t...@sss.pgh.pa.us wrote: Kevin Grittner kgri...@ymail.com writes: I propose to apply the attached to master and back-patch to 9.3 Objections? Only the nit-picky one that I quite dislike putting a comment block inside an if-condition like that. Comment moved above the

Re: [HACKERS] pg_dump with both --serializable-deferrable and -j

2015-01-29 Thread Tom Lane
Kevin Grittner kgri...@ymail.com writes: I propose to apply the attached to master and back-patch to 9.3, and follow that with a patch (for master only) along the lines suggested by Andres. Since *that* change is more invasive and changes existing behavior I will submit it to the open CF

Re: [HACKERS] pg_dump with both --serializable-deferrable and -j

2015-01-29 Thread Kevin Grittner
Kevin Grittner kgri...@ymail.com wrote: Tom Lane t...@sss.pgh.pa.us wrote: A comment seems essential here, because as written anybody would think the test for a snapshot is a bug. Good point. I propose to apply the attached to master and back-patch to 9.3, and follow that with a patch

Re: [HACKERS] pg_dump with both --serializable-deferrable and -j

2015-01-28 Thread Andres Freund
On 2015-01-28 15:32:15 +, Kevin Grittner wrote: Andres Freund and...@2ndquadrant.com wrote: ISTM that the check is just overzelous and/or needs to be moved into ImportSnapshot(). There it then could be made to check if the exporting xact was also deferrable. That would be great if

Re: [HACKERS] pg_dump with both --serializable-deferrable and -j

2015-01-28 Thread Kevin Grittner
Kevin Grittner kgri...@ymail.com 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

Re: [HACKERS] pg_dump with both --serializable-deferrable and -j

2015-01-28 Thread Tom Lane
Kevin Grittner kgri...@ymail.com writes: Kevin Grittner kgri...@ymail.com 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

Re: [HACKERS] pg_dump with both --serializable-deferrable and -j

2015-01-28 Thread Kevin Grittner
Andres Freund and...@2ndquadrant.com wrote: On 2015-01-28 15:32:15 +, Kevin Grittner wrote: Andres Freund and...@2ndquadrant.com wrote: ISTM that the check is just overzelous and/or needs to be moved into ImportSnapshot(). There it then could be made to check if the exporting xact was

Re: [HACKERS] pg_dump with both --serializable-deferrable and -j

2015-01-28 Thread Andres Freund
On 2015-01-28 14:54:15 +, Kevin Grittner wrote: Kevin Grittner kgri...@ymail.com wrote: Alexander Korotkov aekorot...@gmail.com wrote: Could we start snapshot-importing transaction with repeatable read isolation level? You can if you don't use the option which specifies that you

Re: [HACKERS] pg_dump with both --serializable-deferrable and -j

2015-01-28 Thread Kevin Grittner
Andres Freund and...@2ndquadrant.com wrote: Kevin Grittner kgri...@ymail.com wrote: Alexander Korotkov aekorot...@gmail.com wrote: Could we start snapshot-importing transaction with repeatable read isolation level? If you are talking about having pg_dump acquire a safe snapshot and have

Re: [HACKERS] pg_dump with both --serializable-deferrable and -j

2015-01-28 Thread Kevin Grittner
Kevin Grittner kgri...@ymail.com wrote: Alexander Korotkov aekorot...@gmail.com wrote: Could we start snapshot-importing transaction with repeatable read isolation level? You can if you don't use the option which specifies that you want serializable behavior. Why specify

Re: [HACKERS] pg_dump with both --serializable-deferrable and -j

2015-01-28 Thread Kevin Grittner
Alexander Korotkov aekorot...@gmail.com wrote: when pg_dump is run with both --serializable-deferrable and -j options to pg_dump, it returns errors: pg_dump: [archiver (db)] query failed: ERROR: a snapshot-importing transaction must not be READ ONLY DEFERRABLE pg_dump: [archiver (db)]

[HACKERS] pg_dump with both --serializable-deferrable and -j

2015-01-26 Thread Alexander Korotkov
Hackers, when pg_dump is run with both --serializable-deferrable and -j options to pg_dump, it returns errors: pg_dump: [archiver (db)] query failed: ERROR: a snapshot-importing transaction must not be READ ONLY DEFERRABLE pg_dump: [archiver (db)] query failed: ERROR: a snapshot-importing