Обсуждение: 20110408pg upgrade fix: How do I know if I am being affected before errors occur

Поиск
Список
Период
Сортировка

20110408pg upgrade fix: How do I know if I am being affected before errors occur

От
Erwin Brandstetter
Дата:
Hello!

In connection with the recently discovered bug with pg_upgrade:
http://wiki.postgresql.org/wiki/20110408pg_upgrade_fix

If I an not sure whether pg_upgrade or pg_migrate has been applied on
certain databases in the past:
 - How do I know if I am being affected by the bug _before_ errors
occur?
 - Can applying the proposed fix break anything if the db wasn't
affected to begin with?

Information as to that is missing in the mail to pgsql-
announce@postgresql.org as well as on the wiki-page.

Thank You! Regards
Erwin

Re: 20110408pg upgrade fix: How do I know if I am being affected before errors occur

От
Stephen Frost
Дата:
Erwin,

* Erwin Brandstetter (brsaweda@gmail.com) wrote:
>  - Can applying the proposed fix break anything if the db wasn't
> affected to begin with?

Running a database-wide 'vacuum freeze;' will either succeed (and all
will be well), or it'll generate the errors in the message (in which
case you'll need to restore the CLOG files, as at the wiki page, and
then re-run the 'vacuum freeze;').

    Thanks,

        Stephen

Вложения

Re: 20110408pg upgrade fix: How do I know if I am being affected before errors occur

От
Erwin Brandstetter
Дата:
On Apr 9, 4:31 pm, sfr...@snowman.net (Stephen Frost) wrote:
> Running a database-wide 'vacuum freeze;' will either succeed (and all
> will be well), or it'll generate the errors in the message (in which
> case you'll need to restore the CLOG files, as at the wiki page, and
> then re-run the 'vacuum freeze;').

Thank you! My DBs seem to be in the clear. :)

RES: 20110408pg upgrade fix: How do I know if I am being affected before errors occur

От
"Carlos Sotto Maior \(SIM\)"
Дата:
Hi,

I just noticed this thread today.
I am running 9.0.3.  I Read the 20110408 upgrade fix announcement, checked
pg_clog/ and noticed that it show only a single 0000 file.

I understand I may be hit by the mentioned problem.

Yes, I do have all tar archives available, but since my Database is
relatively small I can afford dumping / recreating and restoring this night
which is great.

My questions are:
Having a single 0000 in the pg_clog directory is indicative that my database
has been hit ?
If I run a database wise 'vacuum freeze' and all goes well does it means I
do not have to take any action?
Dumping and recreating the data base would be my best option to get rid of
this potential  problem. Correct ?

Thanks,

Carlos Sotto Maior
+55 11 8244-7899
csotto@sistemassim.com.br

Sistemas Sim Serviços e Tecnologia Ltda.
+55 11 5041-3086
Rua Tenente Gomes Ribeiro, 78
Vila Clementino (Próximo ao Metro Santa Cruz)
São Paulo - SP
04038-040

-----Mensagem original-----
De: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org] Em nome de Stephen Frost
Enviada em: sábado, 9 de abril de 2011 11:32
Para: Erwin Brandstetter
Cc: pgsql-admin@postgresql.org
Assunto: Re: [ADMIN] 20110408pg upgrade fix: How do I know if I am being
affected before errors occur

Erwin,

* Erwin Brandstetter (brsaweda@gmail.com) wrote:
>  - Can applying the proposed fix break anything if the db wasn't
> affected to begin with?

Running a database-wide 'vacuum freeze;' will either succeed (and all will
be well), or it'll generate the errors in the message (in which case you'll
need to restore the CLOG files, as at the wiki page, and then re-run the
'vacuum freeze;').

    Thanks,

        Stephen


Re: RES: 20110408pg upgrade fix: How do I know if I am being affected before errors occur

От
"Kevin Grittner"
Дата:
"Carlos Sotto Maior (SIM)" <csotto@sistemassim.com.br> wrote:

> If I run a database wise 'vacuum freeze' and all goes well does it
> means I do not have to take any action?

If you run it in all databases except template0, and it doesn't
generate any errors, you are good.

> Dumping and recreating the data base would be my best option to
> get rid of this potential  problem. Correct ?

If you're in a state where a simple VACUUM FREEZE won't fix it, the
pg_dump won't run without error, and won't contain all your data.

-Kevin