Re: Patch for pg_upgrade to turn off autovacuum

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Patch for pg_upgrade to turn off autovacuum
Дата
Msg-id 201104222348.p3MNmid19232@momjian.us
обсуждение исходный текст
Ответ на Re: Patch for pg_upgrade to turn off autovacuum  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
Jeff Davis wrote:
> On Fri, 2011-04-22 at 17:34 -0400, Bruce Momjian wrote:
> > Tom Lane wrote:
> > > Bruce Momjian <bruce@momjian.us> writes:
> > > > I thought some more about this and I don't want autovacuum to run on the
> > > > old server.  This is because pg_dumpall --binary-upgrade --schema-only
> > > > grabs the datfrozenxid for all the databases at the start, then connects
> > > > to each database to gets the relfrozenxids.  I don't want to risk any
> > > > advancement of either of those during the pg_dumpall run.
> > > 
> > > Why?  It doesn't really matter --- if you grab a value that is older
> > > than the latest, it's still valid.  As Robert said, you're
> > > over-engineering this, and thereby introducing potential failure modes,
> > > for no gain.
> > 
> > Uh, I am kind of paranoid about pg_upgrade because it is trying to do
> > something Postgres was never designed to do.  I am a little worried that
> > we would be assuming that pg_dumpall always does the datfrozenxid first
> > and if we ever did it last we would have relfrozenxids before the
> > datfrozenxid.  I am worried if we don't prevent autovacuum on the old
> > server that pg_upgrade will be more fragile to changes in other parts of
> > the system.
> 
> If we back-patch the "-b" to 8.3, then we can always use it on both the
> old and new systems. Upgrading to the latest patch-level on both old and
> new should be a prerequisite for pg_upgrade anyway.
>
> That would turn the catalog check from a special case (use "-b"
> sometimes, other times don't; which could cause fragility and bugs),
> into just another sanity check with an easy workaround ("your postgres
> doesn't support '-b', upgrade to the latest patch-level before
> upgrading").
> 
> One of the things I like about the design of pg_upgrade is that it
> doesn't seem to have a lot of special cases for different version
> combinations.
> 
> What do you think?

Well, I am concerned that there isn't enough testing of the -b flag to
be sure it has zero effect on a running server that is not doing a
binary upgrade, which is why I liked doing it only in 9.1.  And we would
still need code to check if the -b flag is supported.

We can save this for 9.2 if people prefer, but we would still need a PG
version check, rather than a catalog version check.

Of course, if people prefer backpatch, we can do that, but I would need
many more eyes on this patch.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + It's impossible for everything to be true. +


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: Patch for pg_upgrade to turn off autovacuum
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Patch for pg_upgrade to turn off autovacuum