Subject: Re: Basebackup fails without useful error message

From: Koen De Groote <[email-masked]>
Date: Mon, 21 Oct 2024 22:49:44 +0200

See, I'm reading that, and my conclusion is "Ah great, it will try again,
everything will be fine."

There's a link between the archive_command, pg_basebackup and
wal_sender_timeout, but that link isn't clear from just reading all these
documentation pages when learning about their concepts separately.

It's just too much information to read and then "just know" in your head
that these must be the relations. Especially if you have dozens of other
things to do.

That's my 2 cents.

Regards,
Koen De Groote

On Sun, Oct 20, 2024 at 11:12 PM Adrian Klaver <[email-masked]>
wrote:

> On 10/20/24 14:03, Koen De Groote wrote:
>
> > So I'm assuming the process of writing WAL files, if there is an
> > archive_command set, is only considered to be finished after the archive
> > is written, not just when the WAL file is written in pg_wal.
>
>
> https://www.postgresql.org/docs/current/continuous-archiving.html#BACKUP-ARCHIVING-WAL
>
> "It is important that the archive command return zero exit status if and
> only if it succeeds. Upon getting a zero result, PostgreSQL will assume
> that the file has been successfully archived, and will remove or recycle
> it. However, a nonzero status tells PostgreSQL that the file was not
> archived; it will try again periodically until it succeeds."
>
>
> > Regards,
> > Koen De Groote
> >
> >
>
> --
> Adrian Klaver
> [email-masked]
>
>

---

From: Adrian Klaver <[email-masked]>
Date: Mon, 21 Oct 2024 15:08:03 -0700

On 10/21/24 13:49, Koen De Groote wrote:
> See, I'm reading that, and my conclusion is "Ah great, it will try 
> again, everything will be fine."

Unless it never completes and you hit the timeout.

> wal_sender_timeout, but that link isn't clear from just reading all 
> these documentation pages when learning about their concepts separately.
>