Обсуждение: [PATCH] Provide option to clients to enable coredump

Поиск
Список
Период
Сортировка

[PATCH] Provide option to clients to enable coredump

От
Martijn van Oosterhout
Дата:
[Please CC any replies]

As per discussion on -hackers.

Here is a patch that adds a -C option to the postgres process which
will cause the server to emit one of the following:

NOTICE:  Core dumps hard disabled by admin
NOTICE:  Core dumps already enabled by admin (size)
NOTICE:  Core limit successfully changed to (size)

There are probably multiple takes on the security of this option, but
if you have a client that can cause the server to dump core, you've got
bigger issues. Patch just emits a warning on a Win32 server.

Intended usage:

$ PGOPTIONS=-C ./psql test
NOTICE:  Core limit successfully changed to (unlimited)
Welcome to psql 8.1beta2, the PostgreSQL interactive terminal.
<snip>
test=#

Although it would work with any libpq client.

I think it would be helpful in situations where the user can't
immediately find out how to change the ulimit of the backend process.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Вложения