[HACKERS] logical replication deranged sender - Mailing list pgsql-hackers

From Jeff Janes
Subject [HACKERS] logical replication deranged sender
Date
Msg-id CAMkU=1xUJKs=2etq2K7bmbY51Q7g853HLxJ7qEB2Snog9oRvDw@mail.gmail.com
Whole thread Raw
Responses Re: [HACKERS] logical replication deranged sender  (Petr Jelinek <petr.jelinek@2ndquadrant.com>)
List pgsql-hackers
After dropping a subscription, it says it succeeded and that it dropped the slot on the publisher.

But the publisher still has the slot, and a full-tilt process described by ps as 

postgres: wal sender process jjanes [local] idle in transaction

Strace shows that this process is doing nothing but opening, reading, lseek, and closing from pg_wal, and calling sbrk.  It never sends anything.

This is not how it should work, correct?

I'm running pgbench -c4 -j8 on the publisher, publishing all pgbench tables.

It doesn't seem to happen every time I create and then drop a subscription, but it happens pretty often.

The subscribing server's logs shows:

21270  2017-05-07 16:04:16.517 PDT LOG:  process 21270 still waiting for AccessShareLock on relation 6100 of database 0 after 1000.051 ms
21270  2017-05-07 16:04:16.517 PDT DETAIL:  Process holding the lock: 25493. Wait queue: 21270.
21270  2017-05-07 16:04:16.520 PDT LOG:  process 21270 acquired AccessShareLock on relation 6100 of database 0 after 1003.608 ms
25493 DROP SUBSCRIPTION 2017-05-07 16:04:16.520 PDT LOG:  duration: 1005.176 ms CPU: user: 0.00 s, system: 0.00 s, elapsed: 1.00 s   statement: drop subscription foobar ;

The publishing server's logs doesn't show anything relevant.

I'm using 86713de,  I have not tried this in earlier commits.

Cheers,

Jeff

pgsql-hackers by date:

Previous
From: Daniele Varrazzo
Date:
Subject: Re: [HACKERS] Detecting schema changes during logical replication
Next
From: Andres Freund
Date:
Subject: Re: [HACKERS] Concurrent ALTER SEQUENCE RESTART Regression