On Thu, Sep 14, 2023, at 4:29 PM, Robert Sanford wrote:
And now it's happening again...
I'm trying to get a core dump but I can't seem to actually generate one.
When I try to set ulimit -c from the command line, I get a message that I'm not allowed to do that. So I went in and updated /etc/security/limits.conf for the postgres user as follows.
postgres hard core unlimited
postgres soft core unlimited
I then restarted the postgres server. When I look at the limits in the pid folder I see...
Limit Soft Limit Hard Limit Units
Max cpu time unlimited unlimited seconds
Max file size unlimited unlimited bytes
Max data size unlimited unlimited bytes
Max stack size 8388608 unlimited bytes
Max core file size 0 unlimited bytes
Are you using systemd? If so, execute
(Replace service name accordingly.)
If it is not showing infinity as value, you need to edit the service file using
the following command:
and add
[Service]
LimitCORE=infinity
Restart the service after it and check again with systemctl show command.
You should also check where the operating system is saving the core files.
cat /proc/sys/kernel/core_pattern
If it says core, it means it is storing it in PGDATA directory. Some OSes can
use a command/script to send the core files to another location.