public inbox for [email protected]help / color / mirror / Atom feed
Re: Confusing error message in 15.6 4+ messages / 3 participants [nested] [flat]
* Re: Confusing error message in 15.6 @ 2024-05-21 23:42 David G. Johnston <[email protected]> 0 siblings, 2 replies; 4+ messages in thread From: David G. Johnston @ 2024-05-21 23:42 UTC (permalink / raw) To: Dmitry O Litvintsev <[email protected]>; +Cc: pgsql-generallists.postgresql.org <[email protected]> On Tue, May 21, 2024, 17:29 Dmitry O Litvintsev <[email protected]> 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. > ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Confusing error message in 15.6 @ 2024-05-21 23:50 David G. Johnston <[email protected]> parent: David G. Johnston <[email protected]> 1 sibling, 0 replies; 4+ messages in thread From: David G. Johnston @ 2024-05-21 23:50 UTC (permalink / raw) To: Dmitry O Litvintsev <[email protected]>; +Cc: pgsql-generallists.postgresql.org <[email protected]> On Tuesday, May 21, 2024, David G. Johnston <[email protected]> wrote: > > On Tue, May 21, 2024, 17:29 Dmitry O Litvintsev <[email protected]> wrote: > >> >> 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. > > Right, it’s only the connection, not a transaction. https://www.postgresql.org/docs/current/continuous-archiving.html#BACKUP-LOWLEVEL-BASE-BACKUP And this is why the name changed, because the behavior is so different. David J. ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Confusing error message in 15.6 @ 2024-05-21 23:58 Dmitry O Litvintsev <[email protected]> parent: David G. Johnston <[email protected]> 1 sibling, 1 reply; 4+ messages in thread From: Dmitry O Litvintsev @ 2024-05-21 23:58 UTC (permalink / raw) To: David G. Johnston <[email protected]>; +Cc: pgsql-generallists.postgresql.org <[email protected]> Oops. This means major rewrite of my backup procedure. Thanks for pointing this out. I will likely just switch to pg_basebackup. What I have is something old and gnarly from the days of psql version 8. ________________________________________ From: David G. Johnston <[email protected]> Sent: Tuesday, May 21, 2024 6:42 PM To: Dmitry O Litvintsev Cc: pgsql-generallists.postgresql.org Subject: Re: Confusing error message in 15.6 [EXTERNAL] – This message is from an external sender On Tue, May 21, 2024, 17:29 Dmitry O Litvintsev <[email protected]<mailto:[email protected]>> 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. ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Confusing error message in 15.6 @ 2024-05-22 07:29 Laurenz Albe <[email protected]> parent: Dmitry O Litvintsev <[email protected]> 0 siblings, 0 replies; 4+ messages in thread From: Laurenz Albe @ 2024-05-22 07:29 UTC (permalink / raw) To: Dmitry O Litvintsev <[email protected]>; David G. Johnston <[email protected]>; +Cc: pgsql-generallists.postgresql.org <[email protected]> On Tue, 2024-05-21 at 23:58 +0000, Dmitry O Litvintsev wrote: > > > 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. > > > > 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. > > Oops. This means major rewrite of my backup procedure. Thanks for pointing > this out. I will likely just switch to pg_basebackup. What I have is > something old and gnarly from the days of psql version 8. You could try https://github.com/cybertec-postgresql/safe-backup to make the transition smoother. Yours, Laurenz Albe ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2024-05-22 07:29 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2024-05-21 23:42 Re: Confusing error message in 15.6 David G. Johnston <[email protected]> 2024-05-21 23:50 ` David G. Johnston <[email protected]> 2024-05-21 23:58 ` Dmitry O Litvintsev <[email protected]> 2024-05-22 07:29 ` Laurenz Albe <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox