From: Gourish Singbal <gourish@gmail.com>
To: Benjamin Krajmalnik <kraj@illumen.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-admin@postgresql.org, "Matthew T. O'Connor" <matthew@zeut.net>
Subject: Re: pg_clog questions
Date: Fri, 26 May 2006 12:09:33 +0530
Message-ID: <674d1f8a0605252339k248ed8fay33c56e3939843417@mail.gmail.com> (raw)
In-Reply-To: <20060525223944.GO13700@surnet.cl>
References: <8511B4970E0D124898E973DF496F9B432516EA@stash.stackdump.local>
<20060525223944.GO13700@surnet.cl>
Ok After reading this mail i too went to check out pg_clog and noticed that
there were 368 file dating back to the day we had installed postgresql and
occuping 92 MB od space.
So i decided to vacuum the postgres and template1 databases since the other
databases are database - wide vacuumed daily.
vacuuming postgres database did not do any good so went to template1 . On
completion found that the files had reduced to 109 number and size of
pg_clog was 27 MB now.
But still these were too many files hence decide to peform vacuum freeze on
template1 and postgres databases. on finishing .. checked the pg_clog dir
and found that there was just one file there
drwx------ 10 postgres wheel 632 2006-05-25 23:15 ..
drwx------ 2 postgres wheel 72 2006-05-25 23:20 .
-rw------- 1 postgres wheel 172032 2006-05-25 23:35 016C
and if i am not mistaken this is the only file that the postgres is using at
this time.
also age went down to
postgres=# SELECT datname, age(datfrozenxid) FROM pg_database;
datname | age
---------------------+------------
postgres | 73
template1 | 128
template0 | 382360894
...etc
thanks for the info in the email thread.
On 5/26/06, Alvaro Herrera <alvherre@commandprompt.com> wrote:
>
> Benjamin Krajmalnik wrote:
> > I just ran both VACUUM ANALYZE and VACUUM on all of the databases (the
> > project database and the database created for the default user).
> > All of the commit logs are still there.
>
> Did you vacuum the template1 (and possibly postgres) databases as well?
>
> > Do they get cleared only by VACUUM FULL?
>
> No, VACUUM suffices.
>
> > On another subject, is there a query I can run to find out who the owner
> > of a filenode is?
>
> Sure -- pg_class.relowner from pg_class where relfilenode = ' ... '
>
> --
> Alvaro Herrera
> http://www.CommandPrompt.com/
> PostgreSQL Replication, Consulting, Custom Development, 24x7 support
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>
--
Best,
Gourish Singbal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: gourish@gmail.com, kraj@illumen.com, tgl@sss.pgh.pa.us, matthew@zeut.net
Subject: Re: pg_clog questions
In-Reply-To: <674d1f8a0605252339k248ed8fay33c56e3939843417@mail.gmail.com>
References: <8511B4970E0D124898E973DF496F9B432516EA@stash.stackdump.local> <20060525223944.GO13700@surnet.cl> <674d1f8a0605252339k248ed8fay33c56e3939843417@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox