Re: pg_upgrade and epoch

From: Sergey Konoplev <gray(dot)ru(at)gmail(dot)com>
To: Sergey Burladyan <eshkinkot(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_upgrade and epoch
Date: 2014-04-23 02:38:35
Message-ID: CAL_0b1s+1HghM4Enf7FpoyuH8S7kqV-LJWiieL6azmNd+Xk+iQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 22, 2014 at 6:33 PM, Sergey Burladyan <eshkinkot(at)gmail(dot)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(dot)ru(at)gmail(dot)com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sergey Burladyan 2014-04-23 03:08:42 Re: pg_upgrade and epoch
Previous Message Tom Lane 2014-04-23 02:37:37 Re: Missing pfree in logical_heap_rewrite_flush_mappings()