Re: Fwd: pg_dump VS alter database ... set search_path ...

From: "Ivan Zolotukhin" <ivan(dot)zolotukhin(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: nikolay(at)samokhvalov(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Fwd: pg_dump VS alter database ... set search_path ...
Date: 2006-10-13 05:37:20
Message-ID: 751e56400610122237o2a2ca5c7o37a591a741df5b1@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Tom,

Can you please suggest a good practice how to propagate such DB
settings into dumps?

I also suffer from this: my DB currently have 5 schemas and
application strongly depends on the search_path. I cannot dump whole
cluster, I need only 1 specific database. At this moment I use ugly
solution and store search_path setting as per-user settings in my
secondary databases.

Solution of Nikolay, being improved for backward compatibility
(additional switch for pg_dump to include alter database statements
with these settings into sql dump generated) would fit me perfectly.

But unfortunately you're not constructive in your critics here and do
not propose a way to solve the problem, only saying that this (very
useful and awaited option!) is ugly. With approach like this the
community will wait for the solution for ages.

:-(

On 10/9/06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "Nikolay Samokhvalov" <samokhvalov(at)gmail(dot)com> writes:
> > What is the reason to not include database settings (like search_path)
> > to database dump created with "pg_dump -C"?
>
> Duplication of code and functionality with pg_dumpall. I'd want to see
> some thought about how to resolve that, not just a quick copy-some-code-
> from-pg_dumpall-into-pg_dump. You also need to explain why this issue
> should be treated differently from users and groups ... a dump won't
> restore correctly without that supporting context either.
>
> I have no objection to rethinking the division of labor between the two
> programs, but let's end up with something that's cleaner not uglier.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter 2006-10-13 06:10:38 Re: Override system-defined cast?
Previous Message roopa perumalraja 2006-10-13 05:26:28 Performance Problem

Browse pgsql-hackers by date

  From Date Subject
Next Message Albe Laurenz 2006-10-13 06:58:50 Re: [PATCHES] Documentation fix for --with-ldap
Previous Message Christopher Browne 2006-10-13 03:15:58 Re: more anti-postgresql FUD