Re: Using ProcSignal to get memory context stats from a running backend

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Using ProcSignal to get memory context stats from a running backend
Date: 2017-12-13 04:10:01
Message-ID: CAB7nPqTZirgwtxHPk_b3_zSPnnfy8FJAZK7KsYppO_yr+Q-tEQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Dec 11, 2017 at 10:07 PM, Craig Ringer <craig(at)2ndquadrant(dot)com> wrote:
> On 12 December 2017 at 12:43, Andres Freund <andres(at)anarazel(dot)de> wrote:
>> On 2017-12-12 11:57:41 +0800, Craig Ringer wrote:
>> But that'd have
>> the disadvanatage that it possibly would take a while till the
>> MemoryContextStats() is executed. Not sure if that's still good enough
>> for you?
>
> Definitely. Sure, it won't be perfect, but it'd be a big improvement on what
> we have.

If this would be fine enough, why not giving a shot then? Having to
use gdb now on production systems is something sometimes hard to
justify to customers. There are also the Windows problems...

>> Another question is whether printing to stderr, bypassing proper
>> logging!, is good enough for something like this.
>
> I think the reason it prints to stderr now is that it's intended to run in
> OOM situations.

Yep. I am on board with Tom here that this property should not be thrown away.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2017-12-13 04:17:25 Re: Add %r substitution for psql prompts to show recovery status
Previous Message Thomas Munro 2017-12-13 04:01:09 Re: pg_ctl on windows can't open postmaster.pid: Permission denied