From: | Dmitry Dolgov <9erthalion6(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: propagating replica identity to partitions |
Date: | 2019-02-18 09:19:40 |
Message-ID: | CA+q6zcVvHfx0ewD3if0Z4q45-LgJkt988h_8eC_=-7PExfdQ4w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> On Fri, Feb 15, 2019 at 10:02 PM Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:
>
> On 2019-Feb-07, Dmitry Dolgov wrote:
>
> > Could there be a race condition somewhere? The idea and the code looks
> > reasonable, but when I'm testing ALTER TABLE ... REPLICA IDENTITY with this
> > patch and concurrent partition creation, I've got the following error on ATTACH
> > PARTITION:
> >
> > ERROR: 42P17: replica index does not exist in partition "test373"
> > LOCATION: MatchReplicaIdentity, tablecmds.c:15018
> >
> > This error seems unstable, other time I've got a deadlock. And I don't observe
> > this behaviour on the master.
>
> Can you share your reproducer?
Sure, I was running concurrently the attached script, that creates a chain of
nested partitions test1,test2,..., and in a separate session:
alter table test1 replica identity full;
Checking this time, I've got from the script:
ERROR: 40P01: deadlock detected
DETAIL: Process 10547 waits for AccessShareLock on relation 30449
of database
29898; blocked by process 9714.
Process 9714 waits for AccessExclusiveLock on relation 30454 of
database 29898;
blocked by process 10547.
HINT: See server log for query details.
LOCATION: DeadLockReport, deadlock.c:1140
Time: 1001.917 ms (00:01.002)
Attachment | Content-Type | Size |
---|---|---|
nested_partitions.sh | text/x-sh | 308 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Meskes | 2019-02-18 09:30:14 | Re: [PROPOSAL]a new data type 'bytea' for ECPG |
Previous Message | Higuchi, Daisuke | 2019-02-18 09:19:29 | RE: [Bug Fix] ECPG: could not use some CREATE TABLE AS syntax |