From: | Amit Kapila <amit(dot)kapila(at)huawei(dot)com> |
---|---|
To: | "'Heikki Linnakangas'" <hlinnakangas(at)vmware(dot)com>, "'Fujii Masao'" <masao(dot)fujii(at)gmail(dot)com> |
Cc: | "'PostgreSQL-development'" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: ThisTimeLineID in checkpointer and bgwriter processes |
Date: | 2012-12-21 06:18:13 |
Message-ID: | 005301cddf42$f58f0980$e0ad1c80$@kapila@huawei.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thursday, December 20, 2012 11:15 PM Heikki Linnakangas wrote:
> On 20.12.2012 18:19, Fujii Masao wrote:
> > InstallXLogFileSegment() also uses ThisTimeLineID. But your recent
> commit
> > doesn't take care of it and prevents the standby from recycling the
> WAL files
> > properly. Specifically, the standby recycles the WAL file to wrong
> name.
>
> A-ha, good catch. So that's actually a live bug in 9.1 and 9.2 as well:
> after the recovery target timeline has changed, restartpoints will
> continue to preallocate/recycle WAL files for the old timeline. That's
> otherwise harmless, but the useless WAL files waste space, and
> walreceiver will have to always create new files.
>
> So instead of always running with ThisTimeLineID = 0 in the
> checkpointer
> process, I guess we'll have to update it to the timeline being
> replayed,
> when creating a restartpoint.
Shouldn't there be a check if(RecoveryInProgress), before assigning
RecoveryTargetTLI to ThisTimeLineID in CreateRestartPoint()?
With Regards,
Amit Kapila.
From | Date | Subject | |
---|---|---|---|
Next Message | Kohei KaiGai | 2012-12-21 06:22:48 | Re: Review of Row Level Security |
Previous Message | Gurjeet Singh | 2012-12-21 06:16:12 | Re: [PERFORM] pgbench to the MAXINT |