Re: pg_upgrade and epoch

From: Sergey Burladyan <eshkinkot(at)gmail(dot)com>
To: Sergey Konoplev <gray(dot)ru(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_upgrade and epoch
Date: 2014-04-23 03:08:42
Message-ID: CAJ2ymdjmA9ge3yqbnTb7QFrroqqcLn_bCOLAGS4U_fev3-msJg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Apr 23, 2014 at 6:38 AM, Sergey Konoplev <gray(dot)ru(at)gmail(dot)com> wrote:

>
> 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
>
...

This is strange, if I not mistaken XID copied by copy_clog_xlog_xid(void):
http://doxygen.postgresql.org/pg__upgrade_8c_source.html#l00398
and there is no epoch (-e XIDEPOCH) in pg_resetxlog call args

I test it like this:
~/inst/pg9.2/bin/initdb d9.2
/usr/lib/postgresql/9.3/bin/initdb d9.3
~/inst/pg9.2/bin/postgres -D d9.2 -p 5433
^C
~/inst/pg9.2/bin/pg_resetxlog -e 8 d9.2/
~/inst/pg9.2/bin/postgres -D d9.2 -p 5433
psql -At -h localhost -p 5433 -c 'select txid_current()' postgres
34359739064
^C
/usr/lib/postgresql/9.3/bin/pg_upgrade -d d9.2 -D d9.3 -b ~/inst/pg9.2/bin
-B /usr/lib/postgresql/9.3/bin -k
/usr/lib/postgresql/9.3/bin/postgres -D d9.3 -p 5433 -k`pwd`/s
psql -At -h localhost -p 5433 -c 'select txid_current()' postgres
756

34359739064 switched to 756 after upgrade

--
Sergey Burladyan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sergey Konoplev 2014-04-23 03:49:08 Re: pg_upgrade and epoch
Previous Message Sergey Konoplev 2014-04-23 02:38:35 Re: pg_upgrade and epoch