Re: Patch to avoid orphaned dependencies - Mailing list pgsql-hackers

From Zhihong Yu
Subject Re: Patch to avoid orphaned dependencies
Date
Msg-id CALNJ-vTVe6=2=kB1vzZsPU8cUMaDX25mBMLRCWSTsday3APTSw@mail.gmail.com
Whole thread Raw
In response to Patch to avoid orphaned dependencies  ("Drouvot, Bertrand" <bdrouvot@amazon.com>)
List 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

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_stat_statements and "IN" conditions
Next
From: Andres Freund
Date:
Subject: Re: using extended statistics to improve join estimates