| From: | Antonin Houska <ah(at)cybertec(dot)at> | 
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
| Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> | 
| Subject: | Re: Unnecessary checks for new rows by some RI trigger functions? | 
| Date: | 2019-02-25 07:20:10 | 
| Message-ID: | 3735.1551079210@localhost | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Not sure what I think about your new proposed patch.  What problem
> do you think it solves?  Also, don't think I believe this:
> 
> +		 * crosscheck_snapshot is actually used only for UPDATE / DELETE
> +		 * queries.
I wanted to clarify the meaning of crosscheck_snapshot, i.e. only set it when
it's needed. Anyway I don't feel now it's worth the amount of code changed.
> The commands we're issuing here are SELECT FOR UPDATE^H^H^HSHARE,
> and those should chase up to the newest row version and do a
> crosscheck just as UPDATE / DELETE would do.  If they don't, there's
> a hazard of mis-enforcing the FK constraint in the face of
> concurrent updates.
Maybe I missed something. When I searched through the code I saw the
crosscheck_snapshot passed only to heap_update() and heap_delete().
-- 
Antonin Houska
https://www.cybertec-postgresql.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kyotaro HORIGUCHI | 2019-02-25 07:40:56 | Re: Protect syscache from bloating with negative cache entries | 
| Previous Message | Masahiko Sawada | 2019-02-25 06:59:21 | Re: reloption to prevent VACUUM from truncating empty pages at the end of relation |