Re: [HACKERS] GSoC 2017: Foreign Key Arrays - Mailing list pgsql-hackers

From Mark Rofail
Subject Re: [HACKERS] GSoC 2017: Foreign Key Arrays
Date
Msg-id CAJvoCuvNuN3GrM4TSDAx3nfTkcJjNhk27HzPQEYkZHykOz6MSg@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] GSoC 2017: Foreign Key Arrays  (Alexander Korotkov <aekorotkov@gmail.com>)
Responses Re: [HACKERS] GSoC 2017: Foreign Key Arrays
List pgsql-hackers
On Thu, Jul 27, 2017 at 12:54 PM, Alexander Korotkov <aekorotkov@gmail.com> wrote:
How many rows of FK table were referencing the PK table row you're updating/deleting.
I wonder how may RI trigger work so fast if it has to do some job besides index search with no results?
The problem here is that the only to option for the foreign key arrays are NO ACTION and RESTRICT which don't allow me to update/delete a refrenced row in the PK Table. the EXPLAIN ANALYZE only tells me that this violates the FK constraint.

So we have two options. Either implement CASCADE or if there's a configration for EXPLAIN to show costs even if it violates the FK constraints.
 
I think we should also vary the number of referencing rows.
The x axis is the number if refrencing rows in the FK table 

pgsql-hackers by date:

Previous
From: amul sul
Date:
Subject: Re: [HACKERS] [POC] hash partitioning
Next
From: Ashutosh Bapat
Date:
Subject: Re: [HACKERS] Transactions involving multiple postgres foreign servers