public inbox for [email protected]
help / color / mirror / Atom feedFrom: Achilleas Mantzios <[email protected]>
To: [email protected]
Subject: Re: Can a long running procedure detect when smart shutdown is pending?
Date: Fri, 5 Jul 2024 23:57:31 +0300
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAE=rie-ZcNzzt_8bKrN-7fnnbYL-ofbne4jNurd3HjjW2j9Yaw@mail.gmail.com>
References: <CAE=rie-ZcNzzt_8bKrN-7fnnbYL-ofbne4jNurd3HjjW2j9Yaw@mail.gmail.com>
Στις 5/7/24 21:12, ο/η Dennis White έγραψε:
> My project's DB has a mutli-step stored procedure using Transaction
> Control that may take 30 minutes or more to complete.
> I am curious if there is a way to make it more smart shutdown friendly
> so it can stop between steps?
>
> We are using both PG 14 and PG 16 on Rhel 8.
> Pardon me if it's obvious but is there a function to call or a table
> that could be checked after a commit within the procedure to determine
> a shutdown is pending?
Maybe somehow checking the log for a message like :
received smart shutdown request
Or use tail_n_mail against the log and then implement some logic using
NOTIFY , ideally you want your procedure to be interrupted rather than
do polling.
>
> Thanks,
> Dennis
--
Achilleas Mantzios
IT DEV - HEAD
IT DEPT
Dynacom Tankers Mgmt (as agents only)
view thread (5+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Can a long running procedure detect when smart shutdown is pending?
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox