Re: Using ProcSignal to get memory context stats from a running backend - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Using ProcSignal to get memory context stats from a running backend
Date
Msg-id CAM-w4HN1LBkn=eWhXm21MfDEmu=HSidNn7WS5ehNAYk=OcAi1Q@mail.gmail.com
Whole thread Raw
In response to Re: Using ProcSignal to get memory context stats from a runningbackend  (Andres Freund <andres@anarazel.de>)
Responses Re: Using ProcSignal to get memory context stats from a running backend
List pgsql-hackers
Another simpler option would be to open up a new file in the log
directory something like "debug_dump.<pid>.txt" and print whatever you
want there. Then print out a reasonable size log entry saying "Debug
dump output to file 'debug_dump.<pid>.txt'". You could provide a
function that reads such files out of the log directory or just
document how to access them using the pg_read_file().

It's not perfect but it's got most of the advantages of communicating
with the requesting process without the complexities of a DSM segment
and it's a bit more flexible too. Users can have automated monitoring
tools watch for dumps for example. And regular tools can be used to
back up and clean out old files.


pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Top-N sorts verses parallelism
Next
From: Jordan Deitch
Date:
Subject: pearltidy source code has been removed (pgindent)