Re: Referential Integrity Checks with Statement-level Triggers - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: Referential Integrity Checks with Statement-level Triggers
Date
Msg-id CAFj8pRCpmA1oydTD2iT0BxuaOV0Q9iMb5kW7Sc=LEU4rJeqPiQ@mail.gmail.com
Whole thread Raw
In response to Re: Referential Integrity Checks with Statement-level Triggers  (Adam Brusselback <adambrusselback@gmail.com>)
List pgsql-hackers


po 17. 12. 2018 v 19:19 odesílatel Adam Brusselback <adambrusselback@gmail.com> napsal:
It's something I know I am interested in. For me, I don't really care if my statement doesn't cancel until the very end if there is a RI violation. The benefit of not having deletes be slow on tables which have others referencing it  with a fkey which don't have their own index is huge IMO. I have a good number of those type of logging tables where an index is not useful 99% of the time, but every once and a while a bulk delete needs to happen.

It is far from a premature optimization IMO, it is super useful and something I was hoping would happen ever since I heard about transition tables being worked on.

note: my sentence about premature optimization was related to my idea to divide RI check per 10K rows.

It would be great if RI check will be faster.


Just my $0.02.
-Adam

pgsql-hackers by date:

Previous
From: Adam Brusselback
Date:
Subject: Re: Referential Integrity Checks with Statement-level Triggers
Next
From: Alvaro Herrera
Date:
Subject: Re: Should new partitions inherit their tablespace from their parent?