Re: pg_upgrade - link mode and transaction-wraparound data loss

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: jesper(at)krogh(dot)cc
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_upgrade - link mode and transaction-wraparound data loss
Date: 2010-05-18 18:52:17
Message-ID: 201005181852.o4IIqHW05061@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

jesper(at)krogh(dot)cc wrote:
> > on the old and new servers, but if you can only provide these values on
> > one of the two servers, it is still useful. Thanks.
>
> Hi Bruce, thanks for your prompt response.
>
> First the new one..

Great.

> jk(at)pal:~$ psql -p 5433
> psql (9.0beta1)
> Type "help" for help.
>
> data=# SELECT datname, datfrozenxid FROM pg_database;
> datname | datfrozenxid
> -----------+--------------
> template0 | 654
> postgres | 2374592801
> data | 2023782337
> jk | 2023822188
> template1 | 2374592801
> workqueue | 2023822188
> (6 rows)
>
> data=# SELECT txid_current();
> txid_current
> --------------
> 2375384556
> (1 row)
>
> data=# \q
>
> Then the old one.
>
> jk(at)pal:~$ psql data
> psql (9.0beta1, server 8.4.1)
> WARNING: psql version 9.0, server version 8.4.
> Some psql features might not work.
> Type "help" for help.
>
> data# SELECT datname, datfrozenxid FROM pg_database;
> datname | datfrozenxid
> -----------+--------------
> template0 | 2073823552

This line above looks very odd because I didn't think the template0
datfrozenxid could be advanced. Can I see the output of this query:

SELECT datname, datfrozenxid, datallowconn FROM pg_database;

I am wondering if you set datallowconn for template0 to 'true'.

> postgres | 2023820521
> data | 2023782337
> jk | 2023822188
> template1 | 2073823552
> workqueue | 2023822188
> (6 rows)
>
> data=# SELECT txid_current();
> txid_current
> --------------
> 2390524243
> (1 row)
>
>
> The old database has been "copied" over using rsync and
> pg_start_backup()/pg_stop_backup() procecures and started up
> using a recovery.conf file.

My other idea is that somehow recovery touches datallowconn for
template0.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2010-05-18 19:05:28 Re: Documentation Bug/Misnomer?
Previous Message Stephen Frost 2010-05-18 18:46:29 Re: Documentation Bug/Misnomer?