Re: POC: GUC option for skipping shared buffers in core dumps

From: "Lepikhov Andrei" <lepikhov(at)fastmail(dot)com>
To: "tsunakawa(dot)takay(at)fujitsu(dot)com" <tsunakawa(dot)takay(at)fujitsu(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Cc: "'Craig Ringer'" <craig(at)2ndquadrant(dot)com>, "'Andres Freund'" <andres(at)anarazel(dot)de>, "Alexander Korotkov" <a(dot)korotkov(at)postgrespro(dot)ru>
Subject: Re: POC: GUC option for skipping shared buffers in core dumps
Date: 2023-09-13 03:48:43
Message-ID: 1d51c572-24b6-4061-92b1-417f4b6bb450@app.fastmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Feb 12, 2020, at 7:55 AM, tsunakawa(dot)takay(at)fujitsu(dot)com wrote:
> From: Craig Ringer <craig(at)2ndquadrant(dot)com>
>> Currently my options are "dump all shmem including shared_buffers" or
>> "dump no shmem". But I usually want "dump all shmem except
>> shared_buffers". It's tolerable to just dump s_b on a test system with
>> a small s_b, but if enabling coredumps to track down some
>> hard-to-repro crash on a production system I really don't want 20GB
>> coredumps...
>
> We have a simple implementation that allows to exclude shared memory.
> That's been working for years.
>
> [postgresql.conf]
> core_directory = 'location of core dumps'
> core_contents = '{none | minimum | full}'
> # none = doesn't dump core, minimum excludes shared memory, and full dumps all
>
> I can provide it. But it simply changes the current directory and
> detaches shared memory when postgres receives signals that dump core.
>
> I made this GUC because Windows also had to be dealt with.

If it's still possible, share your patch here. I don't know what about the core, but during development, especially the bug-fixing process, it is really dull to wait for the core generation process every time, even if you debug a planner issue and are not interested in shared memory blocks ...

--
Regards,
Andrei Lepikhov

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Yugo NAGATA 2023-09-13 03:58:13 Re: Make psql's qeury canceling test simple by using signal() routine of IPC::Run
Previous Message Michael Paquier 2023-09-13 03:04:58 Re: Add 'worker_type' to pg_stat_subscription