From: | Corey Huinker <corey(dot)huinker(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: transition tables and UPDATE |
Date: | 2023-02-02 20:28:57 |
Message-ID: | CADkLM=dhxN-8TLdOa6tPxSzZTfTHO0SKzp8pSAUbg5pozgsd4g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>
>
> even uglier than what I already had. So yeah, I think it might be
> useful if we had a way to inject a counter or something in there.
>
>
This came up for me when I was experimenting with making the referential
integrity triggers fire on statements rather than rows. Doing so has the
potential to take a lot of the sting out of big deletes where the
referencing column isn't indexed (thus resulting in N sequentials scans of
the referencing table). If that were 1 statement then we'd get a single
(still ugly) hash join, but it's an improvement.
It has been suggested that the the overhead of forming the tuplestores of
affected rows and reconstituting them into EphemerialNamedRelations could
be made better by instead storing an array of old ctids and new ctids,
which obviously would be in the same order, if we had a means of
reconstituting those with just the columns needed for the check (and
generating a fake ordinality column for your needs), that would be
considerably lighter weight than the tuplestores, and it might make
statement level triggers more useful all around.
From | Date | Subject | |
---|---|---|---|
Next Message | Nikolay Samokhvalov | 2023-02-02 20:31:33 | Re: Amcheck verification of GiST and GIN |
Previous Message | Robert Haas | 2023-02-02 20:23:51 | a very minor bug and a couple of comment changes for basebackup.c |