From: | Amit kapila <amit(dot)kapila(at)huawei(dot)com> |
---|---|
To: | Boszormenyi Zoltan <zb(at)cybertec(dot)at>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "'Robert Haas'" <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Re: Proposal for Allow postgresql.conf values to be changed via SQL [review] |
Date: | 2013-01-22 12:32:07 |
Message-ID: | 6C0B27F7206C9E4CA54AE035729E9C383BEB9D0B@szxeml509-mbx |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)cybertec(dot)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.
Attachment | Content-Type | Size |
---|---|---|
set_persistent_v8.patch | application/octet-stream | 56.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Ashutosh Bapat | 2013-01-22 12:33:28 | Re: pg_ctl idempotent option |
Previous Message | Dimitri Fontaine | 2013-01-22 12:29:26 | Re: Event Triggers: adding information |