From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Noah Misch <noah(at)leadboat(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Re: pg_upgrade cleanup |
Date: | 2015-05-18 14:58:42 |
Message-ID: | 20150518145842.GA28626@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, May 16, 2015 at 12:21:12PM -0400, Noah Misch wrote:
> The rest of this change is opaque to me. "More consistent" with what? The
> old use of the "tli" variable sure looked like a bug, considering the variable
> was never set to anything but zero. What is the anticipated behavior change?
The fact you saw the bug helps in another way. I was confused why we
had not gotten reports about incorrect timeline restoration in previous
versions of pg_upgrade. It turns out that through 9.2, we always used a
timeline of 1:
"\"%s/pg_resetxlog\" -l 1,%u,%u \"%s\"", new_cluster.bindir,
^
In 9.3 we added code to restore the timeline, but the code that read the
9.2 pg_controldata was buggy, so it tried to restore a timeline of 0,
which was ignored because the timeline can't be decreased with
pg_resetxlog. Only in 9.4 was the timeline properly restored, leading
to the missing history file error.
This confirms that setting the timeline to 1 unconditionally, as I did
on Friday, is the right fix, and I have added a C comment so we will
remember _why_ this has to be the case.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Korotkov | 2015-05-18 15:07:50 | Re: WIP: Enhanced ALTER OPERATOR |
Previous Message | Uriy Zhuravlev | 2015-05-18 14:44:16 | Re: WIP: Enhanced ALTER OPERATOR |