From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Kurt Overberg <kurt(at)hotdogrecords(dot)com> |
Cc: | Chris Browne <cbbrowne(at)acm(dot)org>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Maintenance question / DB size anomaly... |
Date: | 2007-06-19 23:26:10 |
Message-ID: | 18495.1182295570@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Kurt Overberg <kurt(at)hotdogrecords(dot)com> writes:
> That's the thing thats kinda blowing my mind here, when I look at
> that table:
> db1=# select count(*) from _my_cluster.sl_log_1 ;
> count
> -------
> 6788
> (1 row)
Well, that's real interesting. AFAICS there are only two possibilities:
1. VACUUM sees the other 300k tuples as INSERT_IN_PROGRESS; a look at
the code shows that these are counted the same as plain live tuples,
but they'd not be visible to other transactions. I wonder if you could
have any really old open transactions that might have inserted all those
tuples?
2. The other 300k tuples are committed good, but they are not seen as
valid by a normal MVCC-aware transaction, probably because of
transaction wraparound. This would require the sl_log_1 table to have
escaped vacuuming for more than 2 billion transactions, which seems a
bit improbable but maybe not impossible. (You did say you were running
PG 8.0.x, right? That's the last version without any strong defenses
against transaction wraparound...)
The way to get some facts, instead of speculating, would be to get hold
of the appropriate version of pg_filedump from
http://sources.redhat.com/rhdb/ and dump out sl_log_1 with it
(probably the -i option would be sufficient), then take a close look
at the tuples that aren't visible to other transactions. (You could
do "select ctid from sl_log_1" to determine which ones are visible.)
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Charles Sprickman | 2007-06-19 23:42:03 | Re: PostgreSQL Configuration Tool for Dummies |
Previous Message | Josh Berkus | 2007-06-19 22:46:37 | Re: PostgreSQL Configuration Tool for Dummies |