Re: postgresql.auto.conf read from wrong directory

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Christoph Berg <cb(at)df7cb(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: postgresql.auto.conf read from wrong directory
Date: 2014-05-11 22:26:16
Message-ID: CA+TgmoaG7LF4ZREcMQMk2ibug6NR8ELDNAdtRJNMH46z=V3mXQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, May 11, 2014 at 3:20 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> I wrote:
>> I think what probably has to happen is that ProcessConfigFile shouldn't
>> be internally responsible for reading the auto file at all, but that we
>> do that via two separate calls to ProcessConfigFile, one for the main
>> file and then one for the auto file; and during initial startup,
>> SelectConfigFiles doesn't make the call for the auto file until after
>> it's established the final value of data_directory.
>
> Since this bug would block testing of ALTER SYSTEM by a nontrivial
> population of users, I felt it was important to get it fixed before beta,
> so I went to try and fix it as above. It turns out that reading the two
> config files separately doesn't work because ProcessConfigFile will think
> all the settings got removed from the file. What we can do for the
> moment, though, is to just run ProcessConfigFile twice during startup,
> skipping the auto file the first time. It might be worth refactoring
> ProcessConfigFile to avoid the overhead of reading postgresql.conf twice,
> but it would be a lot of work and I think the gain would be marginal; in
> any case there's not time to do that today. But I've got the main problem
> fixed in time for beta.

Thanks for dealing with this. I was skeptical of the proposed patch,
but didn't have time to think hard enough about it to say something
intelligent. I'm glad you did.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2014-05-12 00:30:03 [PATCH] empty xml values
Previous Message Andres Freund 2014-05-11 21:42:44 Re: 9.5: UPDATE/DELETE .. ORDER BY .. LIMIT ..