diff options
author | Michael Paquier <michael@paquier.xyz> | 2019-10-27 13:54:12 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2019-10-27 13:54:12 +0900 |
commit | 51970fa8df9b32b5501ca1cb9d5b805894c1e064 (patch) | |
tree | 147620609798bd265664c29befc07771ff32e70b /src/backend/access/transam/xlog.c | |
parent | b804521344fb366215900ac3f01314a1710bc6d8 (diff) | |
download | postgresql-51970fa8df9b32b5501ca1cb9d5b805894c1e064.tar.gz postgresql-51970fa8df9b32b5501ca1cb9d5b805894c1e064.zip |
Fix initialization of fake LSN for unlogged relations
9155580 has changed the value of the first fake LSN for unlogged
relations from 1 to FirstNormalUnloggedLSN (aka 1000), GiST requiring a
non-zero LSN on some pages to allow an interlocking logic to work, but
its value was still initialized to 1 at the beginning of recovery or
after running pg_resetwal. This fixes the initialization for both code
paths.
Author: Takayuki Tsunakawa
Reviewed-by: Dilip Kumar, Kyotaro Horiguchi, Michael Paquier
Discussion: https://postgr.es/m/OSBPR01MB2503CE851940C17DE44AE3D9FE6F0@OSBPR01MB2503.jpnprd01.prod.outlook.com
Backpatch-through: 12
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r-- | src/backend/access/transam/xlog.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 46d41318992..2e3cc510060 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -6687,7 +6687,7 @@ StartupXLOG(void) if (ControlFile->state == DB_SHUTDOWNED) XLogCtl->unloggedLSN = ControlFile->unloggedLSN; else - XLogCtl->unloggedLSN = 1; + XLogCtl->unloggedLSN = FirstNormalUnloggedLSN; /* * We must replay WAL entries using the same TimeLineID they were created |