diff options
author | Thomas Munro <tmunro@postgresql.org> | 2020-04-08 23:45:09 +1200 |
---|---|---|
committer | Thomas Munro <tmunro@postgresql.org> | 2020-04-08 23:45:09 +1200 |
commit | d140f2f3e225ea53e2d92ab6833b8c186c90666c (patch) | |
tree | 36e5d16f4fb7af2f5d8f6d151b351c01d71cc504 /src/backend/access/transam/xlogfuncs.c | |
parent | 83fd4532a72179c370e318075a10e0e2aa832024 (diff) | |
download | postgresql-d140f2f3e225ea53e2d92ab6833b8c186c90666c.tar.gz postgresql-d140f2f3e225ea53e2d92ab6833b8c186c90666c.zip |
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
Diffstat (limited to 'src/backend/access/transam/xlogfuncs.c')
-rw-r--r-- | src/backend/access/transam/xlogfuncs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/access/transam/xlogfuncs.c b/src/backend/access/transam/xlogfuncs.c index b84ba572596..00e1b33ed5f 100644 --- a/src/backend/access/transam/xlogfuncs.c +++ b/src/backend/access/transam/xlogfuncs.c @@ -398,7 +398,7 @@ pg_last_wal_receive_lsn(PG_FUNCTION_ARGS) { XLogRecPtr recptr; - recptr = GetWalRcvWriteRecPtr(NULL, NULL); + recptr = GetWalRcvFlushRecPtr(NULL, NULL); if (recptr == 0) PG_RETURN_NULL(); |