Re: Should a DB vacuum use up a lot of space ?

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Should a DB vacuum use up a lot of space ?
Date: 2016-08-07 17:41:03
Message-ID: 6d3ea2b9-d7f0-648e-8ceb-679b909c2442@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 8/7/2016 10:26 AM, Philippe Girolami wrote:
> More weirdness this afternoon : the wraparound ERROR showed up again even though I have trouble believing I burned through so many transactions in under a day. But let’s assume I did, here is what I noticed
>
> 1) I vacuumed all other databases. For everyone of those, the age went down to 50M instead of zero. Is that normal ?
> 2) The only database that didn’t work on was template0 (the age did not change). It did work on template1
>
> Should I suspect something fishy going on ?

do you have any long running 'idle in transaction' sessions? these would
show up in pg_stat_activity, you want to look at now()-xact_start to see
the age of the oldest of these. no tuples newer than the oldest
xact_start can be vacuumed.

select * from pg_stat_activity where state='idle in transaction';

select count(*), max(now()-xact_start) from pg_stat_activity where
state='idle in transaction';

--
john r pierce, recycling bits in santa cruz

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2016-08-07 19:21:54 Re: Should a DB vacuum use up a lot of space ?
Previous Message Philippe Girolami 2016-08-07 17:26:27 Re: Should a DB vacuum use up a lot of space ?