From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Koen De Groote <kdg.dev@gmail.com>
To: PostgreSQL General <pgsql-general@lists.postgresql.org>
Subject: Re: In case of network issues, how long before archive_command does retries
Date: Thu, 19 May 2022 09:10:04 +0200
Message-ID: <83b1f99e797754fa8f5589d458c5d3aa674479c8.camel@cybertec.at> (raw)
In-Reply-To: <CAGbX52FM_aYSmjs1a2fZW6Mt7RUQxXds-=uFedQuNu9AzamXRQ@mail.gmail.com>
References: <CAGbX52FM_aYSmjs1a2fZW6Mt7RUQxXds-=uFedQuNu9AzamXRQ@mail.gmail.com>
On Wed, 2022-05-18 at 22:51 +0200, Koen De Groote wrote:
> I've got a setup where archive_command will gzip the wal archive to a directory that is itself an NFS mount.
>
> When connection is gone or blocked, archive_command fails after the timeout specified by the NFS mount, as expected. (for a soft mount. hard mount hangs, as expected)
>
> However, on restoring connection, it's not clear to me how long it takes before the command is retried.
>
> Experience says "a few minutes", but I can't find documentation on an exact algorithm.
>
> To be clear, the question is: if archive_command fails, what are the specifics of retrying? Is there a timeout? How is that timeout defined?
>
> Is this detailed somewhere? Perhaps in the source code? I couldn't find it in the documentation.
>
> For detail, I'm using postgres 11, running on Ubuntu 20.
You can find the details in "src/backend/postmaster/pgarch.c".
The archiver will try to archive three times (NUM_ARCHIVE_RETRIES) in an interval
of one second, then back off until it receives a signal, PostgreSQL shutd down
or a minute has passed.
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: laurenz.albe@cybertec.at, kdg.dev@gmail.com
Subject: Re: In case of network issues, how long before archive_command does retries
In-Reply-To: <83b1f99e797754fa8f5589d458c5d3aa674479c8.camel@cybertec.at>
References: <CAGbX52FM_aYSmjs1a2fZW6Mt7RUQxXds-=uFedQuNu9AzamXRQ@mail.gmail.com> <83b1f99e797754fa8f5589d458c5d3aa674479c8.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox