| From: | Anna Akenteva <a(dot)akenteva(at)postgrespro(dot)ru> | 
|---|---|
| To: | Kartyshov Ivan <i(dot)kartyshov(at)postgrespro(dot)ru> | 
| Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org | 
| Subject: | Re: [HACKERS] make async slave to wait for lsn to be replayed | 
| Date: | 2020-04-07 02:25:53 | 
| Message-ID: | e544ce8b7e6ceadf6bb89094aef68c26@postgrespro.ru | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | 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 | Content-Type | Size | 
|---|---|---|
| begin_waitfor_v7.patch | text/x-diff | 26.0 KB | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jeff Davis | 2020-04-07 02:26:15 | Re: Make MemoryContextMemAllocated() more precise | 
| Previous Message | Tom Lane | 2020-04-07 02:19:41 | Re: [PATCH] Incremental sort (was: PoC: Partial sort) |