Suddenly my postgresql service started crashing for some reason.
I wanted to generate coredump file but file is not generating.
I set: "ulimit -S -c unlimited", also added line "*soft core unlimited" to /etc/security/limits.conf.
Also set my destination dir to kernel.core_pattern="/coredumps/core-%e-%s-%u-%g-%p-%t". Also executed "chmod 777" to destination path to eliminate permission issues. I was able to generate test coredump file by executing "perl -MPOSIX -e '$0="ttt"; pause' &" and then running "kill -ABRT " and file got saved to /coredumps with correct filename.
When my postgres crashes i can see in logs:
Resource limits disable core dumping for process 3607766 (postmaster).
Process 3607766 (postmaster) of user 26 dumped core.
[email protected]: Succeeded.
Also i noticed difference between outputs of "cat /proc/pid/limits" between my test process and postgres. Test process has "Max core file size" set to "unlimited" and postgresql value "0"