Re: [HACKERS] Race conditions with WAL sender PID lookups - Mailing list pgsql-hackers

From Erik Rijkers
Subject Re: [HACKERS] Race conditions with WAL sender PID lookups
Date
Msg-id e0514734ff7f44295a8f69105d5e1eb9@xs4all.nl
Whole thread Raw
In response to Re: [HACKERS] Race conditions with WAL sender PID lookups  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: [HACKERS] Race conditions with WAL sender PID lookups  (Erik Rijkers <er@xs4all.nl>)
List pgsql-hackers
On 2017-05-20 14:40, Michael Paquier wrote:
> On Fri, May 19, 2017 at 3:01 PM, Masahiko Sawada 
> <sawada.mshk@gmail.com> wrote:
>> Also, as Horiguchi-san pointed out earlier, walreceiver seems need the
>> similar fix.
> 
> Actually, now that I look at it, ready_to_display should as well be
> protected by the lock of the WAL receiver, so it is incorrectly placed
> in walreceiver.h. As you are pointing out, pg_stat_get_wal_receiver()
> is lazy as well, and that's new in 10, so we have an open item here
> for both of them. And I am the author for both things. No issues
> spotted in walreceiverfuncs.c after review.
> 
> I am adding an open item so as both issues are fixed in PG10. With the
> WAL sender part, I think that this should be a group shot.
> 
> So what do you think about the attached?

> [walsnd-pid-races-v3.patch]


With this patch on current master my logical replication tests 
(pgbench-over-logical-replication) run without errors for the first time 
in many days (even weeks).

I'll do still more and longer tests but I have gathered already a long 
streak of successful runs since you posted the patch so I am getting 
convinced this patch is solved the problem that I was experiencing.

Pity it didn't make the beta.


thanks,

Erik Rijkers




pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] bumping HASH_VERSION to 3
Next
From: Pavel Stehule
Date:
Subject: Re: [HACKERS] Variable substitution in psql backtick expansion