Since Slony has its own maitenance thread to do vacuuming, is it
redundant to vacuum the the files in the slony schemas again during
regular maintenance?

If so, this recipe recently shared by Greg Sabino Mullane on the
performance list may be of interest.

It can be run with "psql -f custom_vacuum.sql" and would exclude
everything in the "_cluster" schema:

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
-- Note, because of the use of a hardcoded filename,
-- It could be a mistake to run this script against beta and production
at the same time.
\o /tmp/custom_vacuum_tmp.sql
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 != '_cluster'
   ORDER BY 1;
\o
\i /tmp/custom_vacuum_tmp.sql

_______________________________________________
Slony1-general mailing list
[email protected]
http://gborg.postgresql.org/mailman/listinfo/slony1-general

Reply via email to