Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nraIV-0005Fx-4l for pgsql-general@arkaria.postgresql.org; Thu, 19 May 2022 07:10:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nraIT-0003Yv-W7 for pgsql-general@arkaria.postgresql.org; Thu, 19 May 2022 07:10:09 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nraIT-0003Yl-LP for pgsql-general@lists.postgresql.org; Thu, 19 May 2022 07:10:09 +0000 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nraIR-0005PS-HY for pgsql-general@lists.postgresql.org; Thu, 19 May 2022 07:10:08 +0000 Received: by mail-ej1-x62a.google.com with SMTP id ck4so3830897ejb.8 for ; Thu, 19 May 2022 00:10:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20210112.gappssmtp.com; s=20210112; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=fRvNodfY1FKeXdu++fohwbUfTSAKUP2rx4HINvU/yLA=; b=cETJ10nOE/+ro5xIE6IcZxG0io1Ky9sAhK0Z+cQiwbpvwzlvcxeppdPbcye5/anQ7u 52teccFocNlKIp8+qrGapz9C/LoX3PPuHmLPHl2TF1or6X7w89ci8qz1U16TjibY8Etx MU3p6SSv68G/a4g+cYVFtGGsovpXOw3dBtoz0dB8+Lar16/LWPd3q89JsUObUt84EQsS Y2qynLNRBUFgMltPq8aGpxzFIUJgeLuOHDC87FZnOpAzTIPoGPxRdmTt+g1it236+3S6 +wwLvOGKf3Zxthq6dxSidNfvtUKbYXx3mtbv6L470pPPY8QZTE+efc1MRszza5VOtyHZ awug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=fRvNodfY1FKeXdu++fohwbUfTSAKUP2rx4HINvU/yLA=; b=pD2Z8A8Z28rBkJ/pRdNUkgtTTaoF16UD4MHazP8sfew+eIEa/q3CbN6sglkhPCKYIx 5GMpmjTWNCZGGqMC7xDEAw0/xAojvTyQzo3itEKOzt8DyPcQdUw/IFUtzf8daZNaSmUf 4ESLCg7FTaQiE7iBWenVsSvjiFg1xtQEh/PhM5vcYxhz8OPzipaCYPaPdnyqp49y6NZx EmUI2pmUOBTNS08P/FgdiyKBNhr7usOTecXOyool58zTN3iZoZ+uh0Fy8xYhlnlWufQE dhMVQPIiEpOBPGHc/0TpiMNCx7I5TaMOpF1Mk34+I7r71+67yeIyGzGgk/ZVYgGU6SvR 4GUQ== X-Gm-Message-State: AOAM532f+ckONFqEzF+4phYk0OW4ESQh6T9BEXkm4+/pG+PV/HVxAA/v pjQoRLcpHCFpz7ZNeYco6uJzfQifDJxGEg== X-Google-Smtp-Source: ABdhPJz8XVdCdv92eHq6SD4bHZxgcHMhdtkfPQ3g58Q5veRH1gI7SRKVamLa5YPm7gLBpMznspZV4w== X-Received: by 2002:a17:907:3e97:b0:6f4:a160:3983 with SMTP id hs23-20020a1709073e9700b006f4a1603983mr2838899ejc.283.1652944205926; Thu, 19 May 2022 00:10:05 -0700 (PDT) Received: from dynamic-pd01.res.v6.highway.a1.net ([2001:871:5e:1f41:c34f:9eb1:7394:db5a]) by smtp.gmail.com with ESMTPSA id n19-20020a056402061300b0042617ba63cdsm2463967edv.87.2022.05.19.00.10.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 May 2022 00:10:05 -0700 (PDT) Message-ID: <83b1f99e797754fa8f5589d458c5d3aa674479c8.camel@cybertec.at> Subject: Re: In case of network issues, how long before archive_command does retries From: Laurenz Albe To: Koen De Groote , PostgreSQL General Date: Thu, 19 May 2022 09:10:04 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-2.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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