pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: yavuzselimsertoglu@gmail.com
Subject: BUG #17369: tmp files didn't deleted after oom killer killed process
Date: Tue, 18 Jan 2022 09:31:25 +0000
Message-ID: <17369-e0cc600e035868c8@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      17369
Logged by:          yavuz selim sertoğlu
Email address:      yavuzselimsertoglu@gmail.com
PostgreSQL version: 13.5
Operating system:   Red Hat Enterprise Linux Server release 7.9 (Maipo
Description:        

Hi,

This morning oom killer killed a process.
/var/log/messages
Jan 18 07:44:32 dbserver kernel: [  28935]    26 28935 56024594 55931594
448675840      278             0 postgres
Jan 18 07:44:32 dbserver kernel:
oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0-2,global_oom,task_memcg=/,task=postgres,pid=28935,uid=26
Jan 18 07:44:32 dbserver kernel: Out of memory: Killed process 28935
(postgres) total-vm:224098376kB, anon-rss:210894304kB, file-rss:0kB,
shmem-rss:12832072kB, UID:26 pgtables:438160kB oom_score_adj:0
Jan 18 07:44:44 dbserver kernel: oom_reaper: reaped process 28935
(postgres), now anon-rss:0kB, file-rss:0kB, shmem-rss:12832072kB

postgresql.log
2022-01-18 07:44:45.492 +03:::[31678]LOG:  server process (PID 28935) was
terminated by signal 9: Killed

The statement is like insert into select ...

The statement also created many tmp files and total size of it is about:
1.9TB (2064 files)
du -csh base/pgsql_tmp/
1.9T    base/pgsql_tmp/


Last temp file created at 07.32 for this process
-rw-------. 1 postgres postgres 972M Jan 18 07:32 pgsql_tmp28935.4635

For another process, it is 07:44 (This process was not killed by Oom Killer,
it killed by PostgreSQL because of corrupted memory when Oom Killer killed
the other process)
-rw-------. 1 postgres postgres 278M Jan 18 07:44 pgsql_tmp28937.2326


PostgreSQL did many checkpoints.
2022-01-18 07:45:04.616 +03:::[11792]LOG:  checkpoint starting:
end-of-recovery immediate
2022-01-18 07:55:12.165 +03:::[11811]LOG:  checkpoint starting: time
2022-01-18 08:05:12.228 +03:::[11811]LOG:  checkpoint starting: time
2022-01-18 08:15:12.229 +03:::[11811]LOG:  checkpoint starting: time
...


It passed about 5 hours but tmp files didn't deleted. I searched online but
everyone say don't delete temp files manually, submit a bug report.
Is it a bug? Do I need to delete them manually? or Did I misconfigure
PostgreSQL?

Best regards,

Yavuz Selim Sertoğlu



view thread (2+ messages)  latest in thread

Message-ID: <17369-e0cc600e035868c8@postgresql.org>
Permalink:  ../17369-e0cc600e035868c8@postgresql.org/
Also on:    postgresql.org/message-id/17369-e0cc600e035868c8@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, yavuzselimsertoglu@gmail.com
  Subject: Re: BUG #17369: tmp files didn't deleted after oom killer killed process
  In-Reply-To: <17369-e0cc600e035868c8@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox