[PATCH] Provide option to clients to enable coredump

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: pgsql-patches(at)postgresql(dot)org
Subject: [PATCH] Provide option to clients to enable coredump
Date: 2005-10-28 08:00:07
Message-ID: 20051028080007.GA26190@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

[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(at)svana(dot)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.

Attachment Content-Type Size
postgres-ulimit.diff text/plain 3.2 KB

Browse pgsql-patches by date

  From Date Subject
Next Message Simon Riggs 2005-10-28 10:24:31 Re: TODO Item - Add system view to show free space map
Previous Message Mark Kirkwood 2005-10-28 02:28:01 Re: TODO Item - Add system view to show free space map