Re: Multiple call of GetTransactionSnapshot in single flow

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rajeev rastogi <rajeev(dot)rastogi(at)huawei(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Multiple call of GetTransactionSnapshot in single flow
Date: 2014-11-19 05:48:34
Message-ID: 9375.1416376114@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Rajeev rastogi <rajeev(dot)rastogi(at)huawei(dot)com> writes:
> What is the reason for taking snapshot multiple time:

To get the right answer. I believe Robert Haas has been down this rabbit
hole most recently before you: see commits d573e239f and 532994299.
The execution snapshot has to be (at minimum) later than acquisition of
all table locks for the query, and that means it'd better be different
from the snapshot used for parse/plan activities.

The right solution here is not so much to reduce the number of snapshots
as to make them cheaper. Heikki was working on something for that,
but I'm not sure where he is with that patch.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Etsuro Fujita 2014-11-19 05:48:36 Re: postgres_fdw behaves oddly
Previous Message Etsuro Fujita 2014-11-19 05:44:48 Re: inherit support for foreign tables