Re: [PATCH] Fix Proposal - Deadlock Issue in Single User Mode When IOFailure Occurs - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: [PATCH] Fix Proposal - Deadlock Issue in Single User Mode When IOFailure Occurs
Date
Msg-id CAA4eK1+QmK_n2VkT-U-xDorZzJaUNyfdRze0H1-aJ2jE0MpW1A@mail.gmail.com
Whole thread Raw
In response to RE: [PATCH] Fix Proposal - Deadlock Issue in Single User Mode When IOFailure Occurs  (Chengchao Yu <chengyu@microsoft.com>)
Responses RE: [PATCH] Fix Proposal - Deadlock Issue in Single User Mode When IOFailure Occurs  (Chengchao Yu <chengyu@microsoft.com>)
List pgsql-hackers
On Sat, Feb 2, 2019 at 4:42 AM Chengchao Yu <chengyu@microsoft.com> wrote:
>
> Hi Amit, Thomas,
>
> Thank you very much for your feedbacks! Apologizes but I just saw both messages.
>
> > We generally reserve the space in a relation before attempting to write, so not sure how you are able to hit the
diskfull situation via mdwrite.  If you see the description of the function, that also indicates same. 
>
> Absolutely agree, this isn’t a PG issue. Issue manifest for us at Microsoft due to our own storage layer which treat
mdextend()actions as setting length of the file only. We have a workaround, and any change isn’t needed for Postgres. 
>
> > I am not telling that mdwrite can never lead to error, but just trying to understand the issue you actually faced.
Ihaven't read your proposed solution yet, let's first try to establish the problem you are facing. 
>
> We see transient IO errors reading a block where PG instance gets dead-lock in single user mode until we kill the
instance.The stack trace below shows the behavior which is when mdread() failed with buffer holding its lw-lock. This
happensbecause in single user mode there is no call back to release the lock and when AbortBufferIO() tries to acquire
thesame lock again, it will wait for the lock indefinitely. 
>

I think you can register your patch for next CF [1] so that we don't
forget about it.

[1] - https://commitfest.postgresql.org/22/

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [Patch] Log10 and hyperbolic functions for SQL:2016 compliance
Next
From: Amit Kapila
Date:
Subject: Re: [HACKERS] Block level parallel vacuum