]> granicus.if.org Git - postgresql/commit
Don't set ThisTimeLineID in checkpointer & bgwriter during recovery.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 20 Dec 2012 12:01:50 +0000 (14:01 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 20 Dec 2012 12:39:04 +0000 (14:39 +0200)
commit1a11d4609efaae39d9b7472fb965bca1c0aeda01
tree718587c38569a268f5fe0fbbb51e201e9fcee3d9
parent345fb82f1616b4d44d8a67a6c10e964400d29c09
Don't set ThisTimeLineID in checkpointer & bgwriter during recovery.

We used to set it to the current recovery target timeline, but the recovery
target timeline can change during recovery, leaving ThisTimeLineID at an
old value. That seems worse than always leaving it at zero to begin with.

AFAICS there was no good reason to set it in the first place. ThisTimeLineID
is not needed in checkpointer or bgwriter process, until it's time to write
the end-of-recovery checkpoint, and at that point ThisTimeLineID is updated
anyway.
src/backend/access/transam/xlog.c
src/backend/postmaster/bgwriter.c
src/backend/postmaster/checkpointer.c