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