From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "Matthew T(dot) O'Connor" <matthew(at)zeut(dot)net>, pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: Autovacuum loose ends |
Date: | 2005-07-22 22:54:32 |
Message-ID: | 20050722225432.GA2734@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
On Thu, Jul 14, 2005 at 10:52:56AM -0400, Tom Lane wrote:
Hey,
> * Or actually, it would vacuum template0, except that since no regular
> backend ever connects to template0, there will be no stats DB entry for
> it and so the loop in AutoVacMain will ignore it. This is definitely
> BAD as it means that a database that's not been touched since postmaster
> start will never be vacuumed, not even for XID wraparound prevention.
> That test needs to be weakened.
I've hacked the whole thing enough that I fixed most of the issues.
However this one I don't know how to handle. What I need to do is
compare each database's frozen Xid with the current transaction Id.
I can get the frozenxid from the flatfile -- however I don't have
anything with which to compare it. I tried ReadNewTransactionId(), but
it doesn't work because it tries to acquire a LWLock, which isn't
possible because we don't have a PGPROC before connecting to a database.
I guess I could the Xid from pg_control. This seems unclean however.
Opinions about doing that? Better ideas?
--
Alvaro Herrera (<alvherre[a]alvh.no-ip.org>)
"Crear es tan difícil como ser libre" (Elsa Triolet)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-07-22 23:11:36 | Re: Checkpoint cost, looks like it is WAL/CRC |
Previous Message | Tom Lane | 2005-07-22 22:54:21 | Re: Checkpoint cost, looks like it is WAL/CRC |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-07-22 23:37:53 | Re: Autovacuum loose ends |
Previous Message | Mark Wong | 2005-07-22 19:47:18 | Re: [PATCHES] COPY FROM performance improvements |