Re: Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

Поиск
Список
Период
Сортировка
От Amit kapila
Тема Re: Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]
Дата
Msg-id 6C0B27F7206C9E4CA54AE035729E9C383BEB9D0B@szxeml509-mbx
обсуждение исходный текст
Ответ на Re: Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]  (Boszormenyi Zoltan <zb@cybertec.at>)
Ответы Re: Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]  (Zoltán Böszörményi <zb@cybertec.at>)
Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-hackers
On Saturday, January 19, 2013 2:37 AM Boszormenyi Zoltan wrote:
2013-01-18 21:48 keltezéssel, Boszormenyi Zoltan írta:
> 2013-01-18 21:32 keltezéssel, Tom Lane írta:
>> Boszormenyi Zoltan <zb@cybertec.at> writes:
>>> 2013-01-18 11:05 keltezéssel, Amit kapila írta:
>>>>> On using mktemp, linux compilation gives below warning
>>>>> warning: the use of `mktemp' is dangerous, better use `mkstemp'
>>>>


>>
>>> Everywhere else that we need to do something like this, we just use our
>>> own PID to disambiguate, ie
>>>     sprintf(tempfilename, "/path/to/file.%d", (int) getpid());
>>> There is no need to deviate from that pattern or introduce portability
>>> issues, since we can reasonably assume that no non-Postgres programs are
>>> creating files in this directory.
>
>> Thanks for the enlightenment, I will post a new version soon.

> Here it is.

The patch sent by you works fine.
It needs small modification as below:

The "auto.conf.d" directory should follow the postgresql.conf file directory not the data_directory.
The same is validated while parsing the postgresql.conf configuration file.

Patch is changed to use the postgresql.conf file directory as below.

StrNCpy(ConfigFileDir, ConfigFileName, sizeof(ConfigFileDir));
get_parent_directory(ConfigFileDir);
/* Frame auto conf name and auto conf sample temp file name */
snprintf(AutoConfFileName, sizeof(AutoConfFileName), "%s/%s/%s",
                                        ConfigFileDir,
                                        PG_AUTOCONF_DIR,
                                        PG_AUTOCONF_FILENAME);

This closes all comments raised till now for this patch.
Kindly let me know if you feel something is missing?

With Regards,
Amit Kapila.
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dimitri Fontaine
Дата:
Сообщение: Re: Event Triggers: adding information
Следующее
От: Ashutosh Bapat
Дата:
Сообщение: Re: pg_ctl idempotent option