Re: [HACKERS] make async slave to wait for lsn to be replayed - Mailing list pgsql-hackers

From Anna Akenteva
Subject Re: [HACKERS] make async slave to wait for lsn to be replayed
Date
Msg-id e544ce8b7e6ceadf6bb89094aef68c26@postgrespro.ru
Whole thread Raw
In response to Re: [HACKERS] make async slave to wait for lsn to be replayed  (Kartyshov Ivan <i.kartyshov@postgrespro.ru>)
Responses Re: [HACKERS] make async slave to wait for lsn to be replayed  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
On 2020-04-07 00:58, Kartyshov Ivan wrote:
> Ok, here is a new version of patch with single LSN and TIMEOUT.

I had a look at the code and did some more code cleanup, with Ivan's 
permission.
This is what I did:
- Removed "WAIT FOR" command tag from cmdtaglist.h and renamed WaitStmt 
to WaitClause (since there's no standalone WAIT FOR command anymore)
- Added _copyWaitClause() and _equalWaitClause()
- Removed unused #include-s from utility.c
- Adjusted tests and documentation
- Fixed/added some code comments

I have a couple of questions about WaitUtility() though:
- When waiting forever (due to not specifying a timeout), isn't 60 
seconds too long of an interval to check for interrupts?
- If we did specify a timeout, it might be a very long one. In this 
case, shouldn't we also make sure to wake up sometimes to check for 
interrupts?
- Is it OK that specifying timeout = 0 (BEGIN WAIT FOR LSN ... TIMEOUT 
0) is the same as not specifying timeout at all?

-- 
Anna Akenteva
Postgres Professional:
The Russian Postgres Company
http://www.postgrespro.com
Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCH] Incremental sort (was: PoC: Partial sort)
Next
From: Jeff Davis
Date:
Subject: Re: Make MemoryContextMemAllocated() more precise