Hi Michael,
Thank you for your reply. I reviewed the thread you mentioned, and it seems 
that the issue needing to be fixed is not the same as the one I previously 
raised.
I am considering whether the 2PC file check logic in PrepareRedoAdd() can be 
modified. Currently, each time a XLOG_XACT_PREPARE WAL entry is replayed, it 
checks for the corresponding 2PC file using access(). Each access operation 
creates a dentry in the OS, and in most cases, the file being accessed does not 
exist. When there are many 2PC transactions, this logic may lead to an increase 
in OS slab memory. In worse scenarios, it could cause the reference count of 
the parent directory's dentry to overflow, potentially leading to an OS crash. 
Typically, when accessing existing files, the disk will fill up before the 
dentry reference count overflows.
Therefore, I would like to propose a modification. Attached is my patch for 
your review, and I hope you can take a look at it.
Best regards,
suyu.cmj

Attachment: 0001-Fix-2PC-file-check-logic-in-PrepareRedoAdd.patch
Description: Binary data



Reply via email to