Re: vacuumdb --freeze

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Zeugswetter Andreas OSB sIT <Andreas(dot)Zeugswetter(at)s-itsolutions(dot)at>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: vacuumdb --freeze
Date: 2009-02-18 12:13:22
Message-ID: 200902181213.n1ICDMJ06538@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Zeugswetter Andreas OSB sIT wrote:
>
> > > > I would like to add a --freeze parameter to vacuumdb for use by the
> > > > binary upgrade utility, and for symmetry with the existing VACUUM
> > > > options; patch attached.
> > >
> > > Exactly what do you think the upgrade utility is going to do with it?
> > > Surely not a database-wide VACUUM FREEZE, if we are hoping that upgrade
> > > is going to be fast.
> > >
> > > As far as I can see this is a solution looking for a problem.
> >
> > I didn't go into the use-case. The way pg_migrator works is to copy the
> > _schema_ from the old database and load it into the new database. We
> > then need to run vacuum freeze on the schema-only databases because we
> > then move pg_clog from the old database to the new one; so, it is
> > needed, and it will not take long to run.
>
> My first impulse was the same as Tom's, thanks for the explanation.
>
> To the filled database case:
>
> Would it make sense to enhance --table to allow wildcards and remove the
> "cannot vacuum a specific table in all databases" check ?
>
> One more question I have though is:
> How do you make sure noone (e.g. autovacuum analyze)
> unfreezes tuples after the vacuum freeze ?

I will start a new thread to answer this question, but the short answer
is that the freeze only needs to happen in a fresh initdb database, and
once clog is copied over, new transactions can be created normally.

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

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2009-02-18 12:20:07 Re: Hot standby, recovery infra
Previous Message Bruce Momjian 2009-02-18 12:12:03 Re: vacuumdb --freeze