From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Andy Fan <zhihuifan1213(at)163(dot)com> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Thomas Munro <tmunro(at)postgresql(dot)org>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: the s_lock_stuck on perform_spin_delay |
Date: | 2024-01-09 15:44:49 |
Message-ID: | CA+TgmobMJLKnsR_pLnOmRdb7+AzCLdNPFOqG4TAatU1F_4gyaQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jan 8, 2024 at 9:40 PM Andy Fan <zhihuifan1213(at)163(dot)com> wrote:
> The singler handler I was refering to is 'CHECK_FOR_INTERRUPTS', Based
> on this, spin_lock and lwlock are acted pretty differently.
CHECK_FOR_INTERRUPTS() is not a signal handler, and it's OK to acquire
and release spin locks or lwlocks there. We have had (and I think
still do have) cases where signal handlers do non-trivial work,
resulting in serious problems in some cases. A bunch of that stuff has
been rewritten to just set a flag and then let the calling code sort
it out, but not everything has been rewritten that way (I think) and
there's always a danger of future hackers introducing new problem
cases.
--
Robert Haas
EDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Melanie Plageman | 2024-01-09 15:56:46 | Re: Emit fewer vacuum records by reaping removable tuples during pruning |
Previous Message | Tom Lane | 2024-01-09 15:27:42 | Re: pg_dump: Remove obsolete trigger support |