Melvin Davidson mdavidson at trenstar.com
Thu Mar 27 08:07:52 PDT 2008
-----Original Message-----
From: slony1-general-bounces at lists.slony.info [mailto:slony1-general-bounces at lists.slony.info] On Behalf Of Christopher Browne
Sent: Thursday, March 27, 2008 8:25 AM
To: Alex Haugg
Cc: Slony1-general at lists.slony.info
Subject: Re: [Slony1-general] database dump

Alex Haugg <haugg at comdasys.com> writes:
> i have a tiny problem,
>
> i need a db dump command without slony configurations (without:
> slony_cluster, slony functions and without slony trigger).
>
> thanks for your answer,

Another method to do this would be to use SQL to generate scripts to dump only the non slony schemas.
EG:
SELECT 'pg_dump -c -f ' || nspname || '_file_name.backup -i -n ' || nspname
  FROM pg_namespace nsp
  WHERE nsp.oid NOT IN
  (SELECT pronamespace FROM pg_proc WHERE proname = 'slonyversion')
 ORDER BY nspname;

Sample Output:
"pg_dump -c -f information_schema_file_name.backup -i -n information_schema"
"pg_dump -c -f pg_catalog_file_name.backup -i -n pg_catalog"
"pg_dump -c -f pg_temp_1_file_name.backup -i -n pg_temp_1"
"pg_dump -c -f pg_toast_file_name.backup -i -n pg_toast"
"pg_dump -c -f public_file_name.backup -i -n public"

Remove the quotes and you are set.

Melvin Davidson


More information about the Slony1-general mailing list