Re: Patch to avoid orphaned dependencies

From: Zhihong Yu <zyu(at)yugabyte(dot)com>
To: bdrouvot(at)amazon(dot)com, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Patch to avoid orphaned dependencies
Date: 2022-01-04 23:04:46
Message-ID: CALNJ-vTVe6=2=kB1vzZsPU8cUMaDX25mBMLRCWSTsday3APTSw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

For genam.c:

+ UseDirtyCatalogSnapshot = dirtysnap;
+
Does the old value of UseDirtyCatalogSnapshot need to be restored at the
end of the func ?

+systable_recheck_tuple(SysScanDesc sysscan, HeapTuple tup, bool dirtysnap)

Considering that parameter dirtysnap is a bool, I think it should be named
isdirtysnap so that its meaning can be distinguished from:

+ Snapshot dirtySnapshot;

+ UseDirtyCatalogSnapshot = true;
+
+ dirtySnapshot = GetCatalogSnapshot(RelationGetRelid(*depRel));

I tend to think that passing usedirtysnap (bool parameter)
to GetCatalogSnapshot() would be more flexible than setting global variable.

Cheers

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2022-01-04 23:55:50 Re: using extended statistics to improve join estimates
Previous Message Tom Lane 2022-01-04 23:02:43 Re: pg_stat_statements and "IN" conditions