pg_dump VS alter database ... set search_path ...

From: "Nikolay Samokhvalov" <samokhvalov(at)gmail(dot)com>
To: PostgreSQL-general <pgsql-general(at)postgresql(dot)org>
Subject: pg_dump VS alter database ... set search_path ...
Date: 2006-10-09 08:45:16
Message-ID: e431ff4c0610090145u61283a08h9af408e81f39ff20@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Hi,

What is the best practice for following case:
In my database I have a set (~10) of schemas; my database periodically
is being backed up and restored at another machine. I have set up
search_path via "ALTER DATABASE ... SET search_path TO ..." to make
all needed schemas visible to any user who has appropriate rights. The
problem is that I cannot use pg_dumpall and pg_dump DOES NOT dump this
ALTER command, even being executed with "-C" option.

Using additional restoration script with list of schemas seems not the
best solution, because a set of schemas can be changed and I have not
only one database.

Search in mail archives gives me understanding that this issue is
among not resolved ones (there are pros and cons for including such
ALTER in pg_dump-ing).

Is there any common practice for this [probably very frequent] issue?

--
Best regards,
Nikolay

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tjibbe Rijpma 2006-10-09 09:51:49 column privileges
Previous Message David Fetter 2006-10-09 02:53:43 Re: PL/SQL: function call like $1($2)

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Page 2006-10-09 09:10:13 Re: Casting to money
Previous Message Csaba Nagy 2006-10-09 08:33:01 Re: pg_dump exclusion switches and functions/types