Re: How to avoid vacuuming a huge logging table - Mailing list pgsql-performance

From Greg Sabino Mullane
Subject Re: How to avoid vacuuming a huge logging table
Date
Msg-id cfa4aeda403c8884312dadae31ba07d7@biglumber.com
Whole thread Raw
In response to How to avoid vacuuming a huge logging table  (Mark Stosberg <mark@summersault.com>)
Responses Re: How to avoid vacuuming a huge logging table
List 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@turnstep.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-----



pgsql-performance by date:

Previous
From: Dan Harris
Date:
Subject: Re: General advice on user functions
Next
From: "D'Arcy J.M. Cain"
Date:
Subject: Re: How to avoid vacuuming a huge logging table