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 1osOF8-0002eg-TT for pgsql-general@arkaria.postgresql.org; Tue, 08 Nov 2022 13:02:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1osOF6-0003Vj-OG for pgsql-general@arkaria.postgresql.org; Tue, 08 Nov 2022 13:02:16 +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 1osOF6-0003Va-CC for pgsql-general@lists.postgresql.org; Tue, 08 Nov 2022 13:02:16 +0000 Received: from mail-oa1-x2f.google.com ([2001:4860:4864:20::2f]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1osOF2-0004Kl-32 for pgsql-general@lists.postgresql.org; Tue, 08 Nov 2022 13:02:15 +0000 Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-13bd19c3b68so16127331fac.7 for ; Tue, 08 Nov 2022 05:02:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=OCVhfvTPk4zZikZXDghrm/ntuJFT3MlQWsQ/9T0PSEI=; b=S3+YegVv46MeDEMxQlujS8Mi+V1nlw8we80t7zMmKsuTnrB29HEBFdjRpsXXsdy0yk wvhcXhO54qWrlBpo32NwDt5KYtpAMP4/K6UmcEAfQPNETg29XuIJxo4sXkBr2h8T1kV0 uDrl1EqhcqaTyAvYyHC4um607OBxOcRv5Ueko/Oy2V4x2/YoQS2AM5gkv9Ari4SXYwaU q9TzmwxMuX9NTNkiEOjpSiYLtQATHDiGHPkWAeUz7L6amNmOHPcRw3MjRJolsGFn+KEs ATLu16aWnXbMYTbEQDQWYdx3AFTaM/AHgjfFMimfEdhxLwnaYXJINsk8rKy5LH64kVq0 1XuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=OCVhfvTPk4zZikZXDghrm/ntuJFT3MlQWsQ/9T0PSEI=; b=GtxSGcZ6JlXDHUmxCULCU0++KC7ve1ACL9ZolFg7yiQlFjiXWCiaADRnSUTH0/CsWc BeBFvpWTKTwCeOkJENb+zT9iAj04hzKuwXQKypiAt+nX8Bq1Rt05kE9goL92xBYSkiwp e1B3j7RxxbR63g4+kWsWbK3XDapg7tWv97aPJw+5C3q8qpvJ0HM1Me3AqyYqsKTLhGP0 SLy/dRwE5TYl57lxb+gch0dYWLMZ6C+ksfZNut1LdsA04krSy+83sfSeakUGuacyFwTJ 51j55a+f25nOdHemJcXx77MjnesMWjb+XAEKNVHTrdW7MvlJZ0bIJMVgcce9cmv08ucd MeJA== X-Gm-Message-State: ACrzQf0MiDbNx+EeHBP4NsBPwM51gc9/xJtsC+T/XjgLJaZfXaZAkS6t HlGUi14BxkQvA+9JTY1qWdjeBGL+Pvk= X-Google-Smtp-Source: AMsMyM4jTSjuZS2uJl0i7858NfisIXSN+2VRRW1KJYQOlJRBpPuOMOZpyW8ai1/87twZ6ShzpsQhHg== X-Received: by 2002:a05:6870:3289:b0:13c:6ef9:a54c with SMTP id q9-20020a056870328900b0013c6ef9a54cmr34106081oac.255.1667912530756; Tue, 08 Nov 2022 05:02:10 -0800 (PST) Received: from [192.168.88.10] (ip68-11-68-85.no.no.cox.net. [68.11.68.85]) by smtp.googlemail.com with ESMTPSA id n18-20020a0568300a9200b0066a7424da0esm4012292otu.50.2022.11.08.05.02.09 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Nov 2022 05:02:10 -0800 (PST) Content-Type: multipart/alternative; boundary="------------WayvE1PCQ6dyuRet4sk87gyU" Message-ID: <90638847-49ea-d245-2035-dc53a2a47a61@gmail.com> Date: Tue, 8 Nov 2022 07:02:09 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: Feature suggestions for backup and replication Content-Language: en-US To: pgsql-general@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. --------------WayvE1PCQ6dyuRet4sk87gyU Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/7/22 16:03, da avory wrote: > Hi all, > > not sure whether this is the right list to ask. I do have two (small!?) > feature suggestions, both regarding backup and replication, which might > appeal to a wider audience. > > 1) it would be very great to have the option to add a timestamp to all > lines of output of pg_dump and pg_restore. We regularly do dump/restores > that take multiple days Are you using "--jobs=X --format=directory", or old school plain text dumps? > and this would help immensely to see bottlenecks, time distribution and > get an overall feel for which steps take how long. While timestamps would definitely be useful, the --verbose option with stdout *and* stderr redirected to a file plus some manual effort will answer your questions. > > 2) It would be equally great to be able to retrieve the actual value of > recovery_min_apply_delay config parameter that is configured on a > streaming client as a value on the primary (as a field in > pg_stat_replication). Ideally in a consistent form, i.e. converted to > seconds or interval. We currently have our ops team monitoring our > streaming clients in various monitoring views and while we can of course > see pending transfer and replay volume there is no way to see the intended > apply_delay without storing it somewhere on the primary (where it will get > inevitably out of sync with the used value). > > Many thanks > > Dean -- Angular momentum makes the world go 'round. --------------WayvE1PCQ6dyuRet4sk87gyU Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit On 11/7/22 16:03, da avory wrote:
Hi all,

not sure whether this is the right list to ask. I do have two (small!?) feature suggestions, both regarding backup and replication, which might appeal to a wider audience.

1) it would be very great to have the option to add a timestamp to all lines of output of pg_dump and pg_restore. We regularly do dump/restores that take multiple days

Are you using "--jobs=X --format=directory", or old school plain text dumps?

and this would help immensely to see bottlenecks, time distribution and get an overall feel for which steps take how long.

While timestamps would definitely be useful, the --verbose option with stdout and stderr redirected to a file plus some manual effort will answer your questions.




2) It would be equally great to be able to retrieve the actual value of recovery_min_apply_delay config parameter that is configured on a streaming client as a value on the primary (as a field in pg_stat_replication). Ideally in a consistent form, i.e. converted to seconds or interval. We currently have our ops team monitoring our streaming clients in various monitoring views and while we can of course see pending transfer and replay volume there is no way to see the intended apply_delay without storing it somewhere on the primary (where it will get inevitably out of sync with the used value).

Many thanks

Dean

--
Angular momentum makes the world go 'round.
--------------WayvE1PCQ6dyuRet4sk87gyU--