From: | Amit Langote <amitlangote09(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: problems with foreign keys on partitioned tables |
Date: | 2019-01-19 12:07:42 |
Message-ID: | CA+HiwqF43JQBHKSrfxn846rVb1ycZfnsRakTT9rLhVj=WzGyNw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Jan 19, 2019 at 7:16 AM Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:
> Thanks, this is better. There were a few other things I didn't like, so
> I updated it. Mostly, two things:
>
> 1. I didn't like a seqscan on pg_trigger, so I turned that into an
> indexed scan on the constraint OID, and then the other two conditions
> are checked in the returned tuples. Also, what's the point on
> duplicating code and checking how many you deleted? Just delete them
> all.
Yeah, I didn't quite like what that code looked like, but it didn't
occur to me that there's an index on tgconstraint.
It looks much better now.
> 2. I didn't like the ABI break, and it wasn't necessary: you can just
> call createForeignKeyActionTriggers directly. That's much simpler.
OK.
> I also added tests. While running them, I noticed that my previous
> commit was broken in terms of relcache invalidation. I don't really
> know if this is a new problem with that commit, or an existing one. The
> fix is 0001.
Looks good.
Thanks,
Amit
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Langote | 2019-01-19 12:17:34 | Re: Query with high planning time at version 11.1 compared versions 10.5 and 11.0 |
Previous Message | Sergei Kornilov | 2019-01-19 11:07:42 | Re: [HACKERS] REINDEX CONCURRENTLY 2.0 |