On Thu, Feb 28, 2019 at 04:09:32PM -0500, Joe Conway wrote: > Committed and push that way.
Thanks for committing a fix. > By the way, while looking at this, I noted at least a couple of places > where OpenTransientFile() is being passed O_RDWR when the usage is > pretty clearly intended to be read-only. For example at least two > instances in slru.c -- SlruPhysicalReadPage() and > SimpleLruDoesPhysicalPageExist(). Is it worth while searching for and > fixing those instances? There are roughly 40~42 callers of OpenTransientFile(). Looking at them I can see that RestoreSlotFromDisk() could also switch to RDONLY instead of RDWR. I am also a bit tired of the lack error handling around CloseTransientFile(). While in some code paths the file descriptors are closed for an error, in some others we should report something. I am going to send a patch after a lookup. Let's see all that on a separate thread. -- Michael
signature.asc
Description: PGP signature