From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | Kevin Grittner <kgrittn(at)ymail(dot)com>, Abelard Hoffman <abelardhoffman(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: pg_dump does not include database-level user-defined GUC variables? |
Date: | 2014-09-16 17:33:38 |
Message-ID: | CAB7nPqS+TpBwgn6G1ukbyn1e8Y7C9WUrFBcpSKV1RabvA2+8xg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Sep 16, 2014 at 8:43 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
> 2014-09-16 17:39 GMT+02:00 Kevin Grittner <kgrittn(at)ymail(dot)com>:
>> Abelard Hoffman <abelardhoffman(at)gmail(dot)com> wrote:
>> > I have a user-defined GUC variable that was set at the db level. e.g.,
>> >
>> > ALTER DATABASE mydb SET myapp.user_id TO '1'
>> >
>> > Works fine. When I do a pg_dump, however, that variable isn't included.
>> > Is that expected? It's not really an attribute of the database?
>>
>> That sort of information *about the database* is stored at the
>> cluster level, not in the database itself. Take a look at
>> pg_dumpall.
>
>
> aha, I though it is bug
That's a feature :)
> I don't think so this design is well - this settings is strictly related to
> database. So there should be some option for dumping these options too.
It would be tempting to include parameters of pg_db_role_setting where
role setrole = 0 by default and I recall that there have been some
debate about that as well (this would roughly need to move
dumpDatabaseConfig out of pg_dumpall.c in a more generic place), but
nothing has actually been done. Note that this information is included
in pg_dumpall without -g either way.
Regards,
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2014-09-16 17:39:52 | Re: BDR DML Only |
Previous Message | pba@mailme.dk | 2014-09-16 17:32:38 | Re: BDR DML Only |