Re: Multiple call of GetTransactionSnapshot in single flow - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Multiple call of GetTransactionSnapshot in single flow
Date
Msg-id 9375.1416376114@sss.pgh.pa.us
Whole thread Raw
In response to Multiple call of GetTransactionSnapshot in single flow  (Rajeev rastogi <rajeev.rastogi@huawei.com>)
List pgsql-hackers
Rajeev rastogi <rajeev.rastogi@huawei.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



pgsql-hackers by date:

Previous
From: Etsuro Fujita
Date:
Subject: Re: postgres_fdw behaves oddly
Next
From: Michael Paquier
Date:
Subject: Re: REINDEX CONCURRENTLY 2.0