pgsql: Don't set ThisTimeLineID in checkpointer & bgwriter during recov

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Don't set ThisTimeLineID in checkpointer & bgwriter during recov
Date: 2012-12-20 12:41:32
Message-ID: E1TlfRM-0000h8-IW@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/1a11d4609efaae39d9b7472fb965bca1c0aeda01

Modified Files
--------------
src/backend/access/transam/xlog.c | 7 ++++++-
src/backend/postmaster/bgwriter.c | 6 ------
src/backend/postmaster/checkpointer.c | 6 ------
3 files changed, 6 insertions(+), 13 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2012-12-20 12:50:12 Re: [COMMITTERS] pgsql: Allow a streaming replication standby to follow a timeline switc
Previous Message Bruce Momjian 2012-12-20 12:37:38 pgsql: Add pg_upgrade comment about mismatch error