pg18: leaks io-uring FDs during restart_after_crash - Mailing list pgsql-hackers

From Justin Pryzby
Subject pg18: leaks io-uring FDs during restart_after_crash
Date
Msg-id aPKnQQggfNPsInWA@pryzbyj2023
Whole thread Raw
List pgsql-hackers
If a backend crashes/killed due to OOM, then the FDs opened in the
postmaster aren't closed, so after a few crashes you can end up with a
multiple as many FDs opened.  Which can then lead to queries failing
with "too many opened files".

$ postgres -c io_method=io_uring &
$ lsof -p 3732231 2>/dev/null |grep -c io_uring
284
$ kill -9 3732232
$ lsof -p 3732231 2>/dev/null |grep -c io_uring
568

I'm not sure, but that might be related to these other errors.

error_severity         | ERROR
sql_state_code         | XX000
message                | could not read blocks 122..126 in file "base/246942/132857974": Operation canceled
query                  | SELECT DISTINCT attrelid FROM pg_attribute WHERE attacl IS NOT NULL
application_name       | pg_dump

-- 
Justin



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: abi-compliance-check failure due to recent changes to pg_{clear,restore}_{attribute,relation}_stats()
Next
From: Arseniy Mukhin
Date:
Subject: Re: LISTEN/NOTIFY bug: VACUUM sets frozenxid past a xid in async queue