Rationalize GetWalRcv{Write,Flush}RecPtr().
Thomas Munro <tmunro@postgresql.org>
Rationalize GetWalRcv{Write,Flush}RecPtr().
GetWalRcvWriteRecPtr() previously reported the latest *flushed*
location. Adopt the conventional terminology used elsewhere in the tree
by renaming it to GetWalRcvFlushRecPtr(), and likewise for some related
variables that used the term "received".
Add a new definition of GetWalRcvWriteRecPtr(), which returns the latest
*written* value. This will allow later patches to use the value for
non-data-integrity purposes, without having to wait for the flush
pointer to advance.
Reviewed-by: Alvaro Herrera <alvherre@2ndquadrant.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/CA%2BhUKGJ4VJN8ttxScUFM8dOKX0BrBiboo5uz1cq%3DAovOddfHpA%40mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/transam/xlog.c | modified | +10 −10 |
| src/backend/access/transam/xlogfuncs.c | modified | +1 −1 |
| src/backend/replication/README | modified | +1 −1 |
| src/backend/replication/walreceiver.c | modified | +10 −5 |
| src/backend/replication/walreceiverfuncs.c | modified | +18 −6 |
| src/backend/replication/walsender.c | modified | +1 −1 |
| src/include/replication/walreceiver.h | modified | +14 −4 |
Discussion
- WIP: WAL prefetch (another approach) 180 messages · 2020-01-01 → 2022-09-25