logical replication deranged sender

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: logical replication deranged sender
Date: 2017-05-07 23:17:31
Message-ID: CAMkU=1xUJKs=2etq2K7bmbY51Q7g853HLxJ7qEB2Snog9oRvDw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2017-05-07 23:43:34 Re: Concurrent ALTER SEQUENCE RESTART Regression
Previous Message Daniele Varrazzo 2017-05-07 21:54:26 Re: Detecting schema changes during logical replication