From: | Kevin Grittner <kgrittn(at)ymail(dot)com> |
---|---|
To: | Andres Freund <andres(at)2ndquadrant(dot)com> |
Cc: | Alexander Korotkov <aekorotkov(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_dump with both --serializable-deferrable and -j |
Date: | 2015-01-28 15:32:15 |
Message-ID: | 1230516688.1130516.1422459135332.JavaMail.yahoo@mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> Kevin Grittner <kgrittn(at)ymail(dot)com> wrote:
>>> Alexander Korotkov <aekorotkov(at)gmail(dot)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 cooperating processes in the same pg_dump run use that
>> snapshot in repeatable read transactions, then yes -- that would
>> work. As long as a repeatable read transaction is using a safe
>> snapshot it will not see any anomalies.
> Why could it be unsafe to import a snapshot that's been generated as
> serializable deferrable into another backend?
That wouldn't be unsafe, which is what I was saying the post you
responded to.
> Doesn't the fact that it
> has been exported out of a deferrable xact that's still running pretty
> much guarantee that the other xact is also safe?
As long as it is at least repeatable read, yes.
> 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 had access to that
information; I don't see it, though. 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.
--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2015-01-28 15:35:28 | Re: Misaligned BufferDescriptors causing major performance problems on AMD |
Previous Message | Amit Kapila | 2015-01-28 15:29:52 | Re: Parallel Seq Scan |