Re: Why does exec_simple_query requires 2 snapshots

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andy Fan <zhihuifan1213(at)163(dot)com>
Cc: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Why does exec_simple_query requires 2 snapshots
Date: 2025-02-18 15:43:40
Message-ID: 1241667.1739893420@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andy Fan <zhihuifan1213(at)163(dot)com> writes:
> My question is why can't we share the same snapshot for the 2 cases?
> parser & planner requires Catalog Snapshot which should be the
> latest one, but in the above case, looks the executor can reuse it as
> well. Is there anything I missed?

Many years ago, we committed a patch to do exactly that. We had
to back it out again because it broke too many real-world scenarios.
I'm too lazy to search the archives for you, but you might be able
to find the commit and revert by searching the git history.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2025-02-18 15:44:05 Re: Adjusting hash join memory limit to handle batch explosion
Previous Message Robert Haas 2025-02-18 15:13:03 Re: Clarification on Role Access Rights to Table Indexes