Rajeev rastogi <rajeev.rast...@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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers