Re: rare avl shutdown slowness (related to signal handling)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Qingqing Zhou <zhouqq(dot)postgres(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: rare avl shutdown slowness (related to signal handling)
Date: 2015-04-07 22:13:13
Message-ID: 13820.1428444793@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> Tom Lane wrote:
>> I think changing the outer "for(;;)" to "while (!got_SIGTERM)" would
>> be a much safer fix.

> Ah, yeah. I was thinking in changing PG_exception_stack once shutdown
> was requested, but this is much simpler.

Your proposed patch seems to be doing both of those, which is probably
unnecessary. I don't object to the SIGHUP test and goto in the error
path, but I'd put it a lot further down, like after the existing
RESUME_INTERRUPTS. I doubt it's a good idea to skip the transaction
cleanup steps.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2015-04-07 22:36:31 Re: Support UPDATE table SET(*)=...
Previous Message Alvaro Herrera 2015-04-07 21:56:29 Re: rare avl shutdown slowness (related to signal handling)