Re: Ideas for easier debugging of backend problems

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Ideas for easier debugging of backend problems
Date: 2005-10-28 08:19:51
Message-ID: 20051028081951.GB26190@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Oct 27, 2005 at 11:44:24AM -0500, Jim C. Nasby wrote:
> > The second option would help us where users are stymied by the system
> > trying to change the core size ulimit, why not make it easier?
>
> It would also be very good if there was a way to verify that the backend
> should be able to generate a core, such as being able to see what
> ulimits the backend is running under. This would have saved me some pain
<snip>

Well, I've sent something to -patches that allows you to set an option
so you get one of the following messages:

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

You use it like:

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

I think a GUC would be a waste of space. It's not like you want to skip
the first three segfaults and dump on the fourth. It shouldn't be a
global option. It shouldn't be easy to enable, but the option should be
there. This way doesn't require any changes to clients, as it can be
controlled by the environment.

Bloat, I don't know, maybe. I think the gain outweighs the costs, but
I'll leave it to TPTB to decide that.

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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Grzegorz Jaskiewicz 2005-10-28 10:19:21 Re: SOLVED Re: _penalty gist method invoked with one key
Previous Message Matteo Beccati 2005-10-28 08:19:18 Re: ERROR: invalid memory alloc request size <a_big_number_here>