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

2015-01-30 Thread Kevin Grittner
Tom Lane wrote: > Kevin Grittner 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 if-condition, and pushed. Thanks for

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

2015-01-29 Thread Tom Lane
Kevin Grittner 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 for > review.

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

2015-01-29 Thread Kevin Grittner
Kevin Grittner wrote: > Tom Lane 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 (for master only) along the line

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

2015-01-28 Thread Kevin Grittner
Andres Freund wrote: > On 2015-01-28 15:32:15 +, Kevin Grittner wrote: >> Andres Freund 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

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

2015-01-28 Thread Tom Lane
Kevin Grittner writes: > Kevin Grittner 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

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 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 ImportSnapshot h

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

2015-01-28 Thread Kevin Grittner
Kevin Grittner 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 (althou

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

2015-01-28 Thread Kevin Grittner
Andres Freund wrote: > Kevin Grittner wrote: >>> Alexander Korotkov 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 cooperating processes in the same pg_dump

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 wrote: > > Alexander Korotkov 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 beh

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

2015-01-28 Thread Kevin Grittner
Kevin Grittner wrote: > Alexander Korotkov 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 --serializable-deferrable if > you don't? > >> A

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

2015-01-28 Thread Kevin Grittner
Alexander Korotkov 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)] query failed: ERRO