Re: pg_upgrade and epoch - Mailing list pgsql-hackers

From Sergey Burladyan
Subject Re: pg_upgrade and epoch
Date
Msg-id CAJ2ymdjmA9ge3yqbnTb7QFrroqqcLn_bCOLAGS4U_fev3-msJg@mail.gmail.com
Whole thread Raw
In response to Re: pg_upgrade and epoch  (Sergey Konoplev <gray.ru@gmail.com>)
Responses Re: pg_upgrade and epoch  (Sergey Konoplev <gray.ru@gmail.com>)
Re: pg_upgrade and epoch  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On Wed, Apr 23, 2014 at 6:38 AM, Sergey Konoplev <gray.ru@gmail.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):
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

pgsql-hackers by date:

Previous
From: Sergey Konoplev
Date:
Subject: Re: pg_upgrade and epoch
Next
From: Sergey Konoplev
Date:
Subject: Re: pg_upgrade and epoch