From: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Amit Langote <amitlangote09(at)gmail(dot)com> |
Subject: | Re: A bug in mapping attributes in ATExecAttachPartition() |
Date: | 2017-08-01 03:10:30 |
Message-ID: | 4e793896-bb01-1796-8231-4a31cc38e969@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Thanks for taking a look at this.
On 2017/08/01 6:26, Robert Haas wrote:
> On Wed, Jul 26, 2017 at 9:50 PM, Amit Langote
> <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote:
>> At least patch 0001 does address a bug. Not sure if we can say that 0002
>> addresses a bug; it implements a feature that might be a
>> nice-to-have-in-PG-10.
>
> I think 0001 is actually several fixes that should be separated:
Agreed.
>
> - Cosmetic fixes, like renaming childrels to attachRel_children,
> adding a period after "Grab a work queue entry", and replacing the if
> (skip_validate) / if (!skip_validate) blocks with if (skip_validate) {
> ... } else { ... }.
OK, these cosmetic changes are now in attached patch 0001.
>
> - Taking AccessExclusiveLock initially to avoid a lock upgrade hazard.
This in 0002.
>
> - Rejiggering things so that we apply map_partition_varattnos() to the
> partConstraint in all relevant places.
And this in 0003.
> Regarding the XXX, we currently require AccessExclusiveLock for the
> addition of a CHECK constraint, so I think it's best to just do the
> same thing here. We can optimize later, but it's probably not easy to
> come up with something that is safe and correct in all cases.
Agreed. Dropped the XXX part in the comment.
0004 is what used to be 0002 before (checking partition constraints of
individual leaf partitions to skip their scans). Attached here just in case.
Thanks,
Amit
Attachment | Content-Type | Size |
---|---|---|
0001-Cosmetic-fixes-for-code-in-ATExecAttachPartition.patch | text/plain | 3.0 KB |
0002-Fix-lock-upgrade-deadlock-hazard-in-ATExecAttachPart.patch | text/plain | 2.8 KB |
0003-Cope-with-differing-attnos-in-ATExecAttachPartition-.patch | text/plain | 7.9 KB |
0004-Teach-ATExecAttachPartition-to-skip-validation-in-mo.patch | text/plain | 11.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Etsuro Fujita | 2017-08-01 03:45:26 | Re: [HACKERS] BUG #14759: insert into foreign data partitions fail |
Previous Message | David G. Johnston | 2017-08-01 02:44:08 | Re: Update description of \d[S+] in \? |