Re: logfile subprocess and Fancy File Functions

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: logfile subprocess and Fancy File Functions
Дата
Msg-id 20040723141948.I55662@megazone.bigpanda.com
обсуждение исходный текст
Ответ на Re: logfile subprocess and Fancy File Functions  (Andreas Pflug <pgadmin@pse-consulting.de>)
Ответы Re: logfile subprocess and Fancy File Functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
On Fri, 23 Jul 2004, Andreas Pflug wrote:

> > What we probably want instead is a separate
> > redirect_stderr_to_files boolean (I'm sure a better name could be
> > thought of).
> >
> > Also, while I'm aware that a superuser can persuade the backend to write
> > on anything, it doesn't follow that we should invent pg_file_write(),
> > pg_file_rename(), or pg_file_unlink().  Those are not needed for the
> > originally intended purpose of this patch
>
> I proposed to separate them, they're indeed non-related.
> What I'd like is
>
> SELECT pg_file_unlink('postgresql.conf.bak');
> SELECT pg_file_write('postgresql.conf.tmp', 'listen_addresses=...');
> SELECT pg_file_rename('postgresql.conf.tmp', 'postgresql.conf',
>                        'postgresql.conf.bak');
> SELECT pg_reload_conf();

I personally don't think the above is the correct approach to allowing
configuration editing from remote. It seems like the wrong level for the
interface, and the file rename isn't atomic and pretending that it is may
prove to be dangerous.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Updated logging config (was: Initial eventlog support on win32 )
Следующее
От: Tom Lane
Дата:
Сообщение: Re: logfile subprocess and Fancy File Functions