Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rf55o-00FKQM-Mo for pgsql-pkg-yum@arkaria.postgresql.org; Tue, 27 Feb 2024 21:34:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rf55n-006OuI-DB for pgsql-pkg-yum@arkaria.postgresql.org; Tue, 27 Feb 2024 21:34:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rf55n-006OuA-67 for pgsql-pkg-yum@lists.postgresql.org; Tue, 27 Feb 2024 21:34:27 +0000 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rf55k-001ZN3-LV for pgsql-pkg-yum@lists.postgresql.org; Tue, 27 Feb 2024 21:34:27 +0000 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-a36126ee41eso584539766b.2 for ; Tue, 27 Feb 2024 13:34:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709069663; x=1709674463; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=F38K9dfZb1Za1qpv7/K3iNEznUN9tY3s/imIvHfhdNA=; b=DvhCoxM/FDvvNPGcfqWlJDHnOFzUpJXvKDRpWgFZq/RwA1rDdtkiduFdn7VU1gbLlf LWeWG8KHLtAl8OYzNT68LSJl/rayLp9DxHijwgUYBHrOfcGgKS+udKN6z5LDf4gx7byd TMhoF6kMA79Ck/d638x1PVVLT1pQbvon0P5+o/NUNtAsG9arWH57vUykKalriY9UQQ4a zWGHIMSzg2TAnhapfy7N+a65FOeO4a/Bnl3gzKmij7SdZaWUjf8Pv9jNkPLcs9m87U+L l5xDEtKQ3WsjCyKB4oApTymsHmtI/bNK2NUXf8r38IyliaPToqPXITnh68H/3x6+V/yY OyOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709069663; x=1709674463; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=F38K9dfZb1Za1qpv7/K3iNEznUN9tY3s/imIvHfhdNA=; b=rNIGBWuMpycGvGDKp+c+Bq6s7vGbqy8JcmVHnMty2Kb5HCIxODW4Fjl1xO2G62fvPo IIw3Nq3OSxJ4Ggb4DgdnjrY+TdnzCc+Alc1egUM6ACf5hbg4XR/7BIFG0aTOzCbXm/Lr qr07Xt7fYEyfeliiRahL4iIbjn6XQrs6l6VQLbpQuGzwaUlQ1TddIr08NqWDLAaPRKyH upB4/YLKPq4+WQtM3PyFAfgFKigdBeci4Ld9i3TXxccToCxRxwTtwtAn+7d9b6UouwPB UfHBhFO8+JdReejSxd4Ve3/vYc0nZ5I3EuGLqDLQmC7Gm+vV78Gw6V96o4QX0fzQHkhF TeTA== X-Gm-Message-State: AOJu0YxOU5+BRzGUeyOGIhiCW5Iec92CKne6ln23pr6go8S9QYr53OC4 1Ba72jGNpBoDkDBXIYwoj5zVe360d9phrEuAUGY4R8ExXPGEG9ofs5sgFsMf/i2qwjHlpJax4o9 /Zaf1cNxLNDbGeOi3Sy4nuY4awCneSFv/6b1j7w== X-Google-Smtp-Source: AGHT+IFPvWBUxOKzRuPjQQ0wCqyZWzryYysikSGiXQIdAZikDPzD1hAdaV7V4w/ftmykwH5AI9SsXu5awKgZQroKTls= X-Received: by 2002:a17:906:3811:b0:a3f:2ffd:c68b with SMTP id v17-20020a170906381100b00a3f2ffdc68bmr8440006ejc.6.1709069663286; Tue, 27 Feb 2024 13:34:23 -0800 (PST) MIME-Version: 1.0 References: <18361-1a3f843f5f6ce694@postgresql.org> In-Reply-To: From: Gena Makhomed Date: Tue, 27 Feb 2024 23:34:10 +0200 Message-ID: Subject: Re: systemd[1]: postgresql-16.service: Killing process 25992 (postgres) with signal SIGKILL. To: Laurenz Albe Cc: pgsql-pkg-yum@lists.postgresql.org Content-Type: multipart/alternative; boundary="0000000000002d39b0061263ca34" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000002d39b0061263ca34 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Feb 26, 2024 at 11:19=E2=80=AFAM Laurenz Albe wrote: > Bug reference: 18361 > > PostgreSQL version: 16.2 > > Operating system: Rocky Linux release 9.3 > > > > PostgreSQL 16.2 installed on the Rocky Linux release 9.3 server from > > official repository with official instruction from page > > https://www.postgresql.org/download/linux/redhat/ > > > > when I execute command > > > > # systemctl stop postgresql-16.service ; systemctl status > > postgresql-16.service > > > > I see, what PostgreSQL 16.2 was killed by SIGKILL. > > > > this is a bug, as I understand, because database will be corrupted. > > > > Is it possible to fix this bug and stop killing PostgreSQL with signal > > SIGKILL ? > > > > Feb 24 12:47:19 postgres-16.example.net systemd[1]: Stopping PostgreSQL > 16 database server... > > Feb 24 12:47:19 postgres-16.example.net systemd[1]: postgresql-16.servi= ce: > Killing process 26672 (postgres) with signal SIGKILL. > > Feb 24 12:47:19 postgres-16.example.net systemd[1]: > postgresql-16.service: Deactivated successfully. > > Feb 24 12:47:19 postgres-16.example.net systemd[1]: Stopped PostgreSQL > 16 database server. > > Strange. In my "postgresql-16.service", I find > > TimeoutStopSec=3D1h > > which should make systemd wait for an hour after sending SIGTERM before i= t > uses SIGKILL. Is your setting different? > No, I do not change anything in the postgresql-16.service file, I just install Postgres 16.2 on the virtual machine with Rocky Linux 9.3, using detailed step-by step instruction, provided on the page https://www.postgresql.org/download/linux/redhat/ for Rocky Linux 9 and execute: # systemctl start postgresql-16.service ; systemctl status wait some time, and when - execute this command: # systemctl stop postgresql-16.service ; systemctl status and got result: postgresql-16.service: Killing process 26672 (postgres) with signal SIGKILL. Is it possible to avoid this SIGKILL ? --=20 *Please consider the environment before printing* --0000000000002d39b0061263ca34 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Feb 26, 2024 at 11:19=E2=80=AFAM Laurenz Albe <laurenz.albe@cybertec.at> wrote:

> Bug reference:=C2=A0 =C2=A0 =C2=A0 18361 > PostgreSQL version: 16.2
> Operating system:=C2=A0 =C2=A0Rocky Linux release 9.3
>
> PostgreSQL 16.2 installed on the Rocky Linux release 9.3 server from > official repository with official instruction from page
> https://www.postgresql.org/download/linux/redhat/
>
> when I execute command
>
> # syste= mctl stop po= stgresql-16.service ; systemctl status
> postgresql-16.service
>
> I see, what PostgreSQL 16.2 was killed by SIGKILL.
>
> this is a bug, as I understand, because database will be corrupted. >
> Is it possible to fix this bug and stop killing PostgreSQL with signal=
> SIGKILL ?
>
> Feb 24 12:47:19 postgres-16.example.net systemd[1]: Stopping = PostgreSQL 16 database server...
> Feb 24 12:47:19 postgres-16.example.net systemd[1]: postgresql-16.service= : Killing process 26672 (postgres) with signal SIGKILL.
> Feb 24 12:47:19 postgres-16.example.net systemd[1]: postgresq= l-16.service: Deactivated successfully.
> Feb 24 12:47:19 postgres-16.example.net systemd[1]: Stopped P= ostgreSQL 16 database server.

Strange.=C2=A0 In my "postgresql-16.service", I find

=C2=A0 TimeoutStopSec=3D1h

which should make systemd wait for an hour after sending SIGTERM before it<= br> uses SIGKILL.=C2=A0 Is your setting different?

No, I do not= change anything in the=20 postgresql-1= 6.service file, I just install Postgres 16.2 on the virtual machine with Ro= cky Linux 9.3, using detailed step-by step instruction, provided on the pag= e=20 https://www.postgresql.org/download/linux/redhat/ for=20 Rocky Linux 9 and execute:

# systemctl = start postgr= esql-16.service ; systemctl status

wait some time, and when= - execute this command:

# systemctl = stop postgre= sql-16.service ; systemctl status
and got result:

postgresql-1= 6.service: Killing process 26672 (postgres) with signal SIGKILL.

Is it possible to a= void this=20 SIGKILL ?
=

--
<= div dir=3D"ltr">Please consider the environment before printi= ng
--0000000000002d39b0061263ca34--