Re: [HACKERS] GSoC 2017: Foreign Key Arrays

From: Mark Rofail <markm(dot)rofail(at)gmail(dot)com>
To: 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>, Andreas Karlsson <andreas(at)proxel(dot)se>, 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-12 21:32:27
Message-ID: CAJvoCusQQ4amLpmFeFGVE6rrAhrBx5PjZ=xY7CyE7i=wm8Ku6A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dear All,

I have retested the patch on a windows build and it passes the regression
tests thanks to Justin's recommendations. Hopefully, it will pass CI too.

Changelog:
- v7 (compatible with current master 2021-3-12,
commit 02b5940dbea17d07a1dbcba3cbe113cc8b70f228)
* re-add failing regression test with fixes
* rebase patch

/Mark

On Thu, Mar 4, 2021 at 12:22 AM Mark Rofail <markm(dot)rofail(at)gmail(dot)com> wrote:

> Hello Justin,
>
> It doesn't just rebase: it also removes the test which was failing on
>> windows
>> CI:
>>
> My apologies, I didn’t include it in the changelog since this is not a
> code change, just wanted to see if any other test would fail on the windows
> CI
>
> I think the SELECT, when it works, is actually doing a seq scan and not
>> using
>> the index. On my PC, the index scan is used until an autovacuum/analyze
>> run,
>> after which it uses seqscan. I'm not sure how the other CIs all managed
>> to run
>> autovacuum between creating a table and running a query on it, though.
>
> This is genius! That explains it. I have been racking my brain for two
> weeks now and you figured it out.
>
> I guess you should first run the query with "explain (costs off)" to show
>> what
>> plan it's using, and add things like "SET enable_seqscan=off" as needed to
>> guarantee that everyone will use the same plan, regardless of minor cost
>> differences and vacuum timing.
>
> I think that will solve the test discrepancy.
>
> Honestly Justin, hats off!
>
> /Mark
>
>>

Attachment Content-Type Size
v7-0002-fk_arrays_elems.patch text/x-patch 118.2 KB
v7-0001-anyarray_anyelement_operators.patch text/x-patch 27.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-03-12 21:40:25 Re: [patch] [doc] Minor variable related cleanup and rewording of plpgsql docs
Previous Message David G. Johnston 2021-03-12 21:30:41 Re: [patch] [doc] Minor variable related cleanup and rewording of plpgsql docs