From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Yambu <hyambu@gmail.com>
To: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: Clean Postgres shutdown
Date: Tue, 19 Jan 2021 12:00:59 +0100
Message-ID: <97a174024075f2cef97b626bd792bfe0ceae7e08.camel@cybertec.at> (raw)
In-Reply-To: <CALhHtcAGLdoh5EOtO=rK8kxuz39FuU6CMuhQCd=xaXGz4ZM7yw@mail.gmail.com>
References: <CALhHtcAGLdoh5EOtO=rK8kxuz39FuU6CMuhQCd=xaXGz4ZM7yw@mail.gmail.com>
On Tue, 2021-01-19 at 12:10 +0200, Yambu wrote:
> Is there a clean way to shutdown postgres which completes transactions and does not abort them.
>
> I ran #systemctl stop postgresql-10
>
> 2021-01-18 14:31:28.600 GMT [10594] LOG: received fast shutdown request
> 2021-01-18 14:31:28.603 GMT [10594] LOG: aborting any active transactions
> 2021-01-18 14:31:28.607 GMT [10594] LOG: worker process: logical replication launcher (PID 10604) exited with exit code 1
> 2021-01-18 14:31:28.613 GMT [10598] LOG: shutting down
> 2021-01-18 14:31:28.634 GMT [23850] FATAL: the database system is shutting down
> 2021-01-18 14:31:29.119 GMT [10594] LOG: database system is shut down
Yes, that is the "smart" shutdown mode that will wait for all sessions to finish.
Admitted, that's not the same as waiting for the end of the *transaction*, but
it is the closest thing we have.
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
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: pgsql-admin@postgresql.org
Cc: laurenz.albe@cybertec.at, hyambu@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: Clean Postgres shutdown
In-Reply-To: <97a174024075f2cef97b626bd792bfe0ceae7e08.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox