Re: pg_upgrade and epoch - Mailing list pgsql-hackers

From Sergey Konoplev
Subject Re: pg_upgrade and epoch
Date
Msg-id CAL_0b1s+1HghM4Enf7FpoyuH8S7kqV-LJWiieL6azmNd+Xk+iQ@mail.gmail.com
Whole thread Raw
In response to pg_upgrade and epoch  (Sergey Burladyan <eshkinkot@gmail.com>)
Responses Re: pg_upgrade and epoch
List pgsql-hackers
On Tue, Apr 22, 2014 at 6:33 PM, Sergey Burladyan <eshkinkot@gmail.com> wrote:
> Current pg_upgrade copy XID into new cluster, but not it epoch. Why?
>
> Without epoch from old cluster txid_current() in upgraded database return
> lower value than before upgrade. This break, for example, PgQ and it must
> be fixed by hand after upgrade with pg_resetxlog.
>
> PS: see
> http://lists.pgfoundry.org/pipermail/skytools-users/2014-April/001812.html

BTW, I didn't manage to make a test case yet. Recently, when I was
migrating several servers to skytools3 and upgrading from 9.0 to 9.2,
I noticed that epoch was copied, timeline id was >0 after upgrade, but
skytools3 sometimes still didn't like it. Also note "sometimes" here,
so in some cases everything was okay, but in some it wasn't. I still
can't explain this, but incrementing timeline id always helped.

-- 
Kind regards,
Sergey Konoplev
PostgreSQL Consultant and DBA

http://www.linkedin.com/in/grayhemp
+1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979
gray.ru@gmail.com



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Missing pfree in logical_heap_rewrite_flush_mappings()
Next
From: Sergey Burladyan
Date:
Subject: Re: pg_upgrade and epoch