Re: Default connection parameters for postgres_fdw and dblink - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Default connection parameters for postgres_fdw and dblink
Date
Msg-id 11357.1364395666@sss.pgh.pa.us
Whole thread Raw
In response to Re: Default connection parameters for postgres_fdw and dblink  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Default connection parameters for postgres_fdw and dblink  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Wed, Mar 27, 2013 at 10:20 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> It's arguable that we should unsetenv all of these inside the postmaster
>> (once it's absorbed the values from the ones it historically pays
>> attention to), so that the postmaster environment does not impinge on
>> the behavior of libpq inside a server process.  This would cause a
>> non-backwards-compatible change in the behavior of dblink, though.
>> Are we okay with that?

> I feel like unsetting all of these (or whatever the canonical list is)
> in the postmaster is a bit like trying to bail out the ocean with a
> bucket, but since a bucket appears to be the only instrument at hand,
> sure, why not?

> As far as breaking backward incompatibility goes, it doesn't strike me
> as likely that anyone is relying on the current behavior, but on the
> off chance that they are, do we have some other way for them to set
> defaults?  What I'm worried about with the current behavior is that
> people will accidentally absorb behavior changes they don't want (or
> that are insecure).  But if there's no other way to set defaults
> explicitly then you could we'd be ripping out a feature without
> providing a replacement, something I am loathe to do.

Use a service file maybe?  But you can't have it both ways: either we
like the behavior of libpq absorbing defaults from the postmaster
environment, or we don't.  You were just arguing this was a bug, and
now you're calling it a feature.

(I guess we could have a switch to control whether the environment gets
cleared, so that anybody who really needs the old behavior could still
get it.  But ugh.)
        regards, tom lane



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [COMMITTERS] pgsql: Allow external recovery_config_directory
Next
From: Robert Haas
Date:
Subject: Re: [COMMITTERS] pgsql: sepgsql: Support for new post-ALTER access hook.