Re: The same 2PC data maybe recovered twice - Mailing list pgsql-hackers

From CAI, Mengjuan
Subject Re: The same 2PC data maybe recovered twice
Date
Msg-id 012f3c16-1641-48be-b0b7-fbf194dc39e9.mengjuan.cmj@alibaba-inc.com
Whole thread Raw
In response to The same 2PC data maybe recovered twice  ("蔡梦娟(玊于)" <mengjuan.cmj@alibaba-inc.com>)
Responses Re: The same 2PC data maybe recovered twice
List pgsql-hackers

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

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: comment in index_create "text_eq" should be "texteq"
Next
From: Masahiko Sawada
Date:
Subject: Re: POC: Parallel processing of indexes in autovacuum