[postgis-devel] Interrupt on SIGTERM

Paul Ramsey pramsey at cleverelephant.ca
Mon Feb 22 10:36:00 PST 2021


Sold.

On Mon, Feb 22, 2021 at 10:28 AM Darafei "Komяpa" Praliaskouski <
me at komzpa.net> wrote:

> We should follow the signals in the Postgres doc:
> https://www.postgresql.org/docs/13/server-shutdown.html
>
> If someone wants fast shutdown they should issue a fast shutdown command
> which will trigger SIGINT which we handle. Recommended course of action is
> to change the shutdown method to fast rather than hacking postgis to
> support fast shutdown in smart mode.
>
> On Mon, Feb 22, 2021 at 9:18 PM Paul Ramsey <pramsey at cleverelephant.ca>
> wrote:
>
>> So, thanks to Sandro's good works over past years we have reasonable
>> handling of interrupts embedded in PostGIS and back into busy areas of GEOS
>> too. But, the interrupt signal we respect is SIGINT, which is what you can
>> generate with a ctrl-C in psql or hitting the stop button in pgadmin. This
>> is good and works. However, for system SHUTDOWN, the signal the system
>> sends is SIGTERM and we do... nothing with that signal. So a shutdown can
>> be paused until a statement completes, which can be quite a while.
>>
>> I'm not sure if we should interupt on SIGTERM. I am going back and forth
>> just sitting here typing. I'm pretty sure PgSQL in general expects to allow
>> all running statements to complete before shutting down, which implies not
>> interrupting on SIGTERM. On the other hand, PgSQL has this OLTP assumption
>> pretty deeply built in that most statements just aren't expected to last
>> very long.
>>
>> Relevant ticket is here
>> https://trac.osgeo.org/postgis/ticket/4857#comment:5
>>
>> Opinions solicited.
>>
>> _______________________________________________
>> postgis-devel mailing list
>> postgis-devel at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/postgis-devel
>>
>
>
> --
> Darafei "Komяpa" Praliaskouski
> OSM BY Team - http://openstreetmap.by/
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20210222/74b1225a/attachment.html>


More information about the postgis-devel mailing list