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 1s9Z87-003Fpv-Rz for pgsql-general@arkaria.postgresql.org; Tue, 21 May 2024 23:42:53 +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 1s9Z87-00D8oi-N3 for pgsql-general@arkaria.postgresql.org; Tue, 21 May 2024 23:42:51 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s9Z87-00D8oZ-Bs for pgsql-general@lists.postgresql.org; Tue, 21 May 2024 23:42:51 +0000 Received: from mail-oo1-xc33.google.com ([2607:f8b0:4864:20::c33]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1s9Z84-001Mlb-H0 for pgsql-general@lists.postgresql.org; Tue, 21 May 2024 23:42:49 +0000 Received: by mail-oo1-xc33.google.com with SMTP id 006d021491bc7-5b2761611e8so2990032eaf.2 for ; Tue, 21 May 2024 16:42:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716334968; x=1716939768; 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=p8RDXz1pFMWlCBReAnFLYZ157t6YdcE5ZNEvtnC7zgI=; b=YNzN+NagaK8iNK1QKzMbCF95IS8sMki5LnemBsOJB9sQJY3p+rTcXfYxojIv+AzoB0 7nXM52S8/jn+Ams6yY+9pRZ+vXp6VB+S2QjCy+YgNJyBU3P0w7YAP2I48lms4nWWsV2U NUyvk09DV780DrJ1QdM4LlbbfFnDsNtQcXP3UEf5NrmXsSGD5MGxXI+4RATErXWyEhpW 81vpL+Fm75e5DcMGLLvSqxne/WNhsCd/P0TCxNRSWLs4maG998q6uh4vmX27is+mZEQL Gd5ppZfUFzaL4kS0Thn3sP/N8smI5uOi8ZR3N2Pxfn0Bf9dPgG3rwfA2MUPV2zasy6gw cDJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716334968; x=1716939768; 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=p8RDXz1pFMWlCBReAnFLYZ157t6YdcE5ZNEvtnC7zgI=; b=CQDCUxs9F9CmjH8wcLKPYcvL0vINOiwl8a+8id99EL5dzCJTCeTZdGF6Zj8h9cTUmP uwl6z7XC9OqJAmHWVGEnCxL/6lMVLCO8HH5Y/rwsAQJH0fhFBsQhSd9onlr4l6bvYWLt bZT+25WtfDZ3+Io9bHvcf8n4JOL72kVK54nTTwLPDrejY8on80wx9KGxTrI0vOH6/mZD 9vqpnUx9j9xJIPLH5hdQwy+HNrlvan6FhEiJJd3gheLBfxQqWnZUMeGC+8mofSzbyQk0 5dQ1Y9Irj7no3bwHyNhPnf10ywFz5l1hkRhp59AdquzovJpHJjyQgKx3UqvaVQIFVwWB JIpg== X-Gm-Message-State: AOJu0YxgUd4YS3/TFYyHGWa18xIm8SvdTOZHWQnSnDlMv6XEVzKLceLL jKQ6q/7H7K49Vy2pEjJHKCK/OgMEnH22N12JBvp8frUzh2LGgUeIXXPXc1H+N7skjerc2dnqnkD dBP4rm4u5y+JIHODUZTgwCXFSBZM= X-Google-Smtp-Source: AGHT+IGWKP1EPwrP2k4XElhtUEc959s7XNMeuTTeVhKLrOn4xNXCQbhF/bY1QUsBzLHsE1NP9wI7uIBZOelCuo5Pw3I= X-Received: by 2002:a05:6820:1acd:b0:5af:c6bb:319 with SMTP id 006d021491bc7-5b69ddf1209mr629215eaf.0.1716334967937; Tue, 21 May 2024 16:42:47 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "David G. Johnston" Date: Tue, 21 May 2024 17:42:37 -0600 Message-ID: Subject: Re: Confusing error message in 15.6 To: Dmitry O Litvintsev Cc: "pgsql-generallists.postgresql.org" Content-Type: multipart/alternative; boundary="00000000000014652f0618ff60be" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000014652f0618ff60be Content-Type: text/plain; charset="UTF-8" On Tue, May 21, 2024, 17:29 Dmitry O Litvintsev wrote: > Hi, > > I am observing the following error which confuses me: > > # psql -U postgres template1 -c "checkpoint; select > pg_backup_start('${dest}.tar.Z', true)" > CHECKPOINT > pg_backup_start > ----------------- > 17BF7/3009498 > (1 row) > > # psql -U postgres template1 -c "select pg_backup_stop(true)" > ERROR: backup is not in progress > HINT: Did you call pg_backup_start()? > > This is postgresql 15.6 running on RH 7. > > This is not just amusing, it is breaking my backup script after update > from 11 to 15 (and change from pg_{start,stop}_backup to > pg_backup_{start_stop}) > Yep, nowadays you must keep the transaction where you issued backup start open until you issue backup end. Using -c isn't going to cut it. David J. > --00000000000014652f0618ff60be Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Tue, May 21, 2024, 17:29 Dmitry O Litvintsev <litvinse@fnal.gov> wrote:
Hi,

I am observing the following error which confuses me:

#=C2=A0 psql -U postgres template1 -c "checkpoint; select pg_backup_st= art('${dest}.tar.Z', true)"
CHECKPOINT
=C2=A0pg_backup_start
-----------------
=C2=A017BF7/3009498
(1 row)

#=C2=A0 psql -U postgres template1 -c "select pg_backup_stop(true)&quo= t;
ERROR:=C2=A0 backup is not in progress
HINT:=C2=A0 Did you call pg_backup_start()?

This is postgresql 15.6 running on RH 7.

This is not just amusing, it is breaking my backup script after update from= 11 to 15 (and change from pg_{start,stop}_backup to pg_backup_{start_stop}= )


Yep, nowadays you must keep the transaction wh= ere you issued backup start open until you issue backup end.=C2=A0 Using -c= isn't going to cut it.

David J.
--00000000000014652f0618ff60be--