Re: How to avoid vacuuming a huge logging table

From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: How to avoid vacuuming a huge logging table
Date: 2007-02-21 21:58:33
Message-ID: cfa4aeda403c8884312dadae31ba07d7@biglumber.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

A minor correction to my earlier post: I should have specified the
schema as well in the vacuum command for tables with the same
name in different schemas:

SET search_path = 'pg_catalog';
SELECT set_config('search_path',
current_setting('search_path')||','||quote_ident(nspname),'false')
FROM pg_namespace
WHERE nspname <> 'pg_catalog'
ORDER BY 1;

\t
\o pop
SELECT 'vacuum verbose analyze '||quote_ident(nspname)||'.'||quote_ident(relname)||';'
FROM pg_class c, pg_namespace n
WHERE relkind = 'r'
AND relnamespace = n.oid
AND nspname = 'novac'
ORDER BY 1;
\o
\i pop

- --
Greg Sabino Mullane greg(at)turnstep(dot)com
End Point Corporation
PGP Key: 0x14964AC8 200702211652
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iD8DBQFF3L+XvJuQZxSWSsgRAwzeAKDz+YmLmm9K0of/ObjUux/P7fg7jwCfeSoK
TfVGoSyThrdFjlGXWn1aEGI=
=/jBZ
-----END PGP SIGNATURE-----

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message D'Arcy J.M. Cain 2007-02-21 22:04:06 Re: How to avoid vacuuming a huge logging table
Previous Message Dan Harris 2007-02-21 21:40:54 Re: General advice on user functions