Re: Minimal logical decoding on standbys - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: Minimal logical decoding on standbys
Date
Msg-id d8f1f66dfe845a7d18eba7b6e5a27b2f1a887b57.camel@j-davis.com
Whole thread Raw
In response to Re: Minimal logical decoding on standbys  (Andres Freund <andres@anarazel.de>)
Responses Re: Minimal logical decoding on standbys
List pgsql-hackers
On Sun, 2023-04-02 at 14:35 -0700, Andres Freund wrote:
> Why not offer a function to add a CV to a WES? It seems somehow odd
> to require
> going through condition_variable.c to create a WES.

I agree that it's a bit odd, but remember that after waiting on a CV's
latch, it needs to re-insert itself into the CV's wait list.

A WaitEventSetWait() can't do that, unless we move the details of re-
adding to the wait list into latch.c. I considered that, but latch.c
already implements the APIs for WaitEventSet and Latch, so it felt
complex to also make it responsible for ConditionVariable.

I'm open to suggestion.

Regards,
    Jeff Davis




pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Making background psql nicer to use in tap tests
Next
From: Andres Freund
Date:
Subject: Re: Minimal logical decoding on standbys