Re: [HACKERS] GSoC 2017: Foreign Key Arrays

From: Andreas Karlsson <andreas(at)proxel(dot)se>
To: Mark Rofail <markm(dot)rofail(at)gmail(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: Alexander Korotkov <aekorotkov(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, David Steele <david(at)pgmasters(dot)net>, Erik Rijkers <er(at)xs4all(dot)nl>, Hans-Jürgen Schönig <hs(at)cybertec(dot)at>, Joel Jacobson <joel(at)compiler(dot)org>, Michael Paquier <michael(at)paquier(dot)xyz>, Robert Haas <robertmhaas(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Zhihong Yu <zyu(at)yugabyte(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] GSoC 2017: Foreign Key Arrays
Date: 2021-03-15 23:27:25
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 3/15/21 4:29 PM, Mark Rofail wrote:
> Actually, your fix led me in the right way, the issue was how windows
> handle pointers.


I have started working on a partially new strategy for the second patch.
The ideas are:

1. I have removed the dependency on count(DISTINCT ...) by using an
anti-join instead (this was implemented by Joel Jacobson with cleanup
and finishing touches by me). The code is much clearer now IMHO.

2. That instead of selecting operators at execution time we save which
operators to use in pg_constraint. This is heavily a work in progress in
my attached patches. I am not 100% convinced this is the right way to go
but I plan to work some on this this weekend to see how ti will work out.

Another thing I will look into is you gin patch. While you fixed it for
simple scalar types which fit into the Datum type I wonder if we do not
also need to copy types which are too large to fit into a Datum but I
have not investigated yet which memory context the datum passed to
ginqueryarrayextract() is allocated in.


Attachment Content-Type Size
v10-0002-fk_arrays_elems.patch text/x-patch 114.5 KB
v10-0001-anyarray_anyelement_operators.patch text/x-patch 29.5 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiro Ikeda 2021-03-15 23:50:25 make the stats collector shutdown without writing the statsfiles if the immediate shutdown is requested.
Previous Message Andres Freund 2021-03-15 23:16:16 Re: New IndexAM API controlling index vacuum strategies