Re: [HACKERS] Apparent walsender bug triggered by logical replication - Mailing list pgsql-hackers

From Andres Freund
Subject Re: [HACKERS] Apparent walsender bug triggered by logical replication
Date
Msg-id 20170630001533.f7yhwnq6qi5kl2et@alap3.anarazel.de
Whole thread Raw
In response to [HACKERS] Apparent walsender bug triggered by logical replication  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

On 2017-06-29 20:07:14 -0400, Tom Lane wrote:
> I was able to make the hang go away by means of the attached patch that
> allows WalSndWaitForWal to exit early if the client has shut down the
> COPY.  However, since that function is miserably underdocumented (like
> most of this code :-(), I have little idea if this is correct or safe.

Seems reasonable to me.


> I also wonder why WalSndWaitForWal is being called for WAL that seemingly
> doesn't exist yet, and whether that doesn't indicate another bug somewhere
> in this stack.

That's pretty normal - we can only send back something once a
transaction is complete, and until that happens we'll just block waiting
for more WAL.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: [HACKERS] Apparent walsender bug triggered by logical replication
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Broken hint bits (freeze)