Re: Queries that should be canceled will get stuck on secure_write function

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, 蔡梦娟(玊于) <mengjuan(dot)cmj(at)alibaba-inc(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: Queries that should be canceled will get stuck on secure_write function
Date: 2021-08-24 17:30:08
Message-ID: CA+TgmoZRk3h=880nfacuv-tbtMoopW8wk7BFX_p6g=Z+WN-ChQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Aug 24, 2021 at 1:15 AM Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> wrote:
> > Oh, you're right. But I guess a similar problem could also occur in
> > response to pg_terminate_backend(), no?
>
> There seems no problem in that case because pg_terminate_backend() causes
> a backend to set ProcDiePending to true in die() signal hander and
> ProcessClientWriteInterrupt() called by secure_write() handles ProcDiePending.
> No?

Hmm, maybe you're right. What about pg_cancel_backend()?

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2021-08-24 17:46:28 Re: preserving db/ts/relfilenode OIDs across pg_upgrade (was Re: storing an explicit nonce)
Previous Message Bossart, Nathan 2021-08-24 17:26:20 Re: .ready and .done files considered harmful