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 1ptKDK-0001a7-A1 for pgsql-admin@arkaria.postgresql.org; Mon, 01 May 2023 03:28:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ptKDI-00039U-JY for pgsql-admin@arkaria.postgresql.org; Mon, 01 May 2023 03:28:32 +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 1ptKDI-00039K-8A for pgsql-admin@lists.postgresql.org; Mon, 01 May 2023 03:28:32 +0000 Received: from mail-yb1-xb2d.google.com ([2607:f8b0:4864:20::b2d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1ptKDF-002o79-HM for pgsql-admin@lists.postgresql.org; Mon, 01 May 2023 03:28:31 +0000 Received: by mail-yb1-xb2d.google.com with SMTP id 3f1490d57ef6-b9a6f17f2b6so17860835276.1 for ; Sun, 30 Apr 2023 20:28:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682911708; x=1685503708; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=2Vbf+sPM/66DdOXBhdmFG2XEI+KAk8itm5AebIt/9As=; b=janP966sNmvYkqSD65rp3EzxZkGRNfMN8YMlzgU9FZX5J0ukUHcychjjInvgPSd0Ig XNmK23B3qKDZtpxTF7RTjmypVdYDbos4dRnBII8bjr/93sM6jqhI3cucOO5+EQ7+mTel OISc/uVBB9ERaQXbEr2hhqh0x7XQoR61qw8SFLC3iC2NBPyX7oaaYqR/htSyJn+1qH6t rzr8LP/ROUDre6WOemtjdFOk/Hs8MpjHMDKSJVnKwH1alQdaJAHEG2u7IWl8T8aF5PFy IaLdUvDOSTCMEtT/7dNOlhQkeOYAwkHBjkyMEGA8nE8XTPVWeqT8y2CR5pdjdBVnHsRu 4uhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682911708; x=1685503708; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=2Vbf+sPM/66DdOXBhdmFG2XEI+KAk8itm5AebIt/9As=; b=kkf1Lg4OsbUJ2l/MOCrA6dVs+E/kA9ZicgssVdqlOHKyjPpPiG8FcIyB7JSnDyUts2 lkxh/ooL6B2ocfAGFa497tzg3zWRvaNH3aED0ycicz3hQdkeniwf7LwFwjD6oIg7cDUg rmsodRYW+WbtNrRfR3ja5z4V0fWQLfwrlHGwTEbpbuCiB4Isklh1JHD64QFU755GjxbJ snA7o+d42/aogVNJdWtoMmovH5/Q4UI4gdWt30yhMbZ3gB7qK16/QQQbDY966ysK3+as UgXfFTYM/2ImO4rt0C1mBR/XMRT2m6ZPGzLcyEa9xwj7Xm0gzAeJ9ljLIRS/qOf/4UdY ikeQ== X-Gm-Message-State: AC+VfDyN9ulpiTIWrOboqYFi8FMv7qqaSXqsu5tZzD3erAaHl+JAMuu5 aWvCADo429fM73VRIeb+ugBMLMheBeE= X-Google-Smtp-Source: ACHHUZ5mrOfCtwMPtRoKzbyj5+9us3qCo7g7JerTJa8hb82+smMwfGtZoey2rj5nRTkCOI0vaSmvFg== X-Received: by 2002:a81:ec2:0:b0:559:d992:405c with SMTP id 185-20020a810ec2000000b00559d992405cmr6486418ywo.5.1682911708092; Sun, 30 Apr 2023 20:28:28 -0700 (PDT) Received: from ?IPV6:2600:1700:bd2c:b810:edd6:19bb:e3ec:a4c2? ([2600:1700:bd2c:b810:edd6:19bb:e3ec:a4c2]) by smtp.googlemail.com with ESMTPSA id x3-20020a816303000000b00559fb950d9fsm1042703ywb.45.2023.04.30.20.28.27 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 30 Apr 2023 20:28:27 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------91Ep8ldw3tNYK9dS1F5JowUI" Message-ID: Date: Sun, 30 Apr 2023 22:28:27 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: pg_dump why no indicator of completion Content-Language: en-US To: pgsql-admin@lists.postgresql.org References: From: Ron In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------91Ep8ldw3tNYK9dS1F5JowUI Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 4/30/23 19:18, richard coleman wrote: > Hi all, > > I've been working with pg_dump and one thing that's always struck me as > strange is that there never seems to be an indication in the log that the > pg_dump process completed successfully. > > For example, I've been running a bunch of backups with pg_dump in > directory mode with multiple jobs.  When I come back several hours later > there are no pg_dump processes running.  The log is filled with: > > dumping contents of foo > finished item 123456 of TABLE DATA bar > etc. > > > Other than trying to restore the multi terabyte database somewhere else is > there any way to know that it actually finished successfully? > > Why doesn't pg_dump add a line in the output like: > > pg_backup finished > > when it's completed successfully? > > This seems like a terrible oversight. > > Am I missing something obvious? "They" expect you to do the Unix Thing and check $?. Thus, that's what I do; any non-zero value generates an email with a scary subject line, the specifics of which are based on the exact code value.  I'm not near my work computer; otherwise I'd share them with you. -- Born in Arizona, moved to Babylonia. --------------91Ep8ldw3tNYK9dS1F5JowUI Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit On 4/30/23 19:18, richard coleman wrote:
Hi all, 

I've been working with pg_dump and one thing that's always struck me as strange is that there never seems to be an indication in the log that the pg_dump process completed successfully.

For example, I've been running a bunch of backups with pg_dump in directory mode with multiple jobs.  When I come back several hours later there are no pg_dump processes running.  The log is filled with:
dumping contents of foo
finished item 123456 of TABLE DATA bar
etc.

Other than trying to restore the multi terabyte database somewhere else is there any way to know that it actually finished successfully?

Why doesn't pg_dump add a line in the output like:
pg_backup finished
when it's completed successfully? 

This seems like a terrible oversight.

Am I missing something obvious?

"They" expect you to do the Unix Thing and check $?. Thus, that's what I do; any non-zero value generates an email with a scary subject line, the specifics of which are based on the exact code value.  I'm not near my work computer; otherwise I'd share them with you.

--
Born in Arizona, moved to Babylonia.
--------------91Ep8ldw3tNYK9dS1F5JowUI--