[patch] Cache invalidation for I/O Workers - Mailing list pgsql-hackers

From Alexandre Felipe
Subject [patch] Cache invalidation for I/O Workers
Date
Msg-id CAE8JnxOivqBrwGz8jwnKnXJ5tBe6EU=71P31MBStY37MDZ=jng@mail.gmail.com
Whole thread
Responses Re: [patch] Cache invalidation for I/O Workers
List pgsql-hackers
This solves BUG #19622, from pgsql-bugs [1]

With io_method=worker I/O worker processes retain open file descriptors on
relation files that have been dropped.

When dropping a relation, an invalidation message is posted, backends handle it
this patch implements the same pattern in I/O worker, and prevents holding
invalid relations.

That said,

This issue doesn't have observable consequences to the user, and is
currently bound
by `max_files_per_process` (default 1000), after which it forces
closing the least
recently used files, if that parameter does its job, we wouldn't have a crash.

In the theoretical scenario of a relation number being reused it could
attempt to read
from a stale file.

https://www.postgresql.org/message-id/19622-639a4ba94c5a53d7%40postgresql.org



pgsql-hackers by date:

Previous
From: Jacob Champion
Date:
Subject: Re: Proposal: Supporting URI SAN in Certificate Authentication
Next
From: Marko Grujic
Date:
Subject: Temp schema drop leaves an inconsistent state behind