Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Non-transactional pg_class, try 2

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] Non-transactional pg_class, try 2
Date: 2006-06-29 00:08:21
Message-ID: 9109.1151539701@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> This patch has the nasty side effect mentioned above -- people will have
> to set template0 as connectable and manually run vacuum on it
> periodically, unless they run autovacuum.

That's pretty messy --- making template0 connectable is a great way to
shoot yourself in the foot.  What I'd propose instead is that even if
autovacuum is nominally off, the system forces autovacuum when it
notices that a non-connectable database is approaching wraparound.
In this mode the autovac daemon would be restricted to processing
non-connectable databases.  (The subtext here is that autovac is the
wave of the future anyway.)

In fact, maybe we should just force an autovac cycle for any DB that
appears to be approaching wraparound, rather than waiting for the
shutdown-before-wraparound code to kick in.  Getting into that state
amounts to whacking DBAs upside the head for being stupid, which
doesn't really win us any friends ...

Implementation-wise, I'd propose that we add another PostmasterSignal
event type whereby a backend could request the postmaster to launch
an autovac process even if autovac is off.  The end-of-VACUUM code that
scans pg_database.datminxid would issue the signal if it finds anything
seriously old.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Greg StarkDate: 2006-06-29 00:34:11
Subject: Re: [GENERAL] UUID's as primary keys
Previous:From: Alvaro HerreraDate: 2006-06-28 23:49:54
Subject: Re: [HACKERS] Non-transactional pg_class, try 2

pgsql-patches by date

Next:From: Simon RiggsDate: 2006-06-29 08:39:27
Subject: Re: [HACKERS] Non-transactional pg_class, try 2
Previous:From: Alvaro HerreraDate: 2006-06-28 23:49:54
Subject: Re: [HACKERS] Non-transactional pg_class, try 2

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group