Re: Confusing error message in 15.6 - Mailing list pgsql-general

From David G. Johnston
Subject Re: Confusing error message in 15.6
Date
Msg-id CAKFQuwaBvMX671=AUsuukkeU2hv0iSSA9=ixDXzBWM8WLCtRwg@mail.gmail.com
Whole thread Raw
In response to Confusing error message in 15.6  (Dmitry O Litvintsev <litvinse@fnal.gov>)
Responses Re: Confusing error message in 15.6
Re: Confusing error message in 15.6
List pgsql-general


On Tue, May 21, 2024, 17:29 Dmitry O Litvintsev <litvinse@fnal.gov> 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.

pgsql-general by date:

Previous
From: Dmitry O Litvintsev
Date:
Subject: Confusing error message in 15.6
Next
From: "David G. Johnston"
Date:
Subject: Re: Confusing error message in 15.6