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 1pFgFK-0004Z7-3X for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Jan 2023 18:54:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pFgFH-0000yh-Ju for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Jan 2023 18:54:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pFgFH-0000wC-7p for pgsql-hackers@lists.postgresql.org; Wed, 11 Jan 2023 18:54:43 +0000 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pFgFC-0000ni-PM for pgsql-hackers@postgresql.org; Wed, 11 Jan 2023 18:54:42 +0000 Received: by mail-pl1-x62f.google.com with SMTP id b17so10239200pld.7 for ; Wed, 11 Jan 2023 10:54:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=IbvhqLaihMkB2WUaTprlgrVOisZveT5cxgnpDNejqyw=; b=W42ZgKiPsGmyhXnTTN73H+a6LdxoPwyTdD50iX3YU3h4B/OJB1EPdf1kwUhfGxrb77 kz0dEoAohe5R62AFol8cl22mkukPNT6PfewMpkvW2v5gYfvbaRwTLv35cayMBshspz4z k0BwqXc4mRC7waR2gfiGj6tn7i1LbkWBW3WMLBF7fDUnr9sfJSrymNHxxMGaD1ff10Kj q0xrVpvwTg+SYNKE38F8TjE5xInxjAWnnS9DTj+LkKKkvhfhtmZkLP7fwfOOiMND0uhO P144akGKPr1ZvQSjKlAbXJAMvk8GpEY+6HK05fP5XXw70TFFyUIP7yweKsYwG8Y6Ler0 SQ4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=IbvhqLaihMkB2WUaTprlgrVOisZveT5cxgnpDNejqyw=; b=4YeUDCHKYnaGnvJNdBGNcfJbxlrYP+qNrLVy2yzT5a+59Oz0zSjyf6pfll0NcCfzma eDW4MacA1eWuWsRpfH/T/GRaT91lEtCFTZI5hcaUKg0cq0ah7gkgj7TQS04iMqJDdc/K ovdvyayqfuR453LXfD1reMlVXC89axnsCG3uMm7zxgWEP8TZntaak4LJCXj6p+eFr+yV TzDAUNCXKKm2KGmRBcND14VDgr4J4w7nYq3Dw9fxp8DjgZ4lNy2d3IKoZw/2IFbRaydn fNtgY0RhKrmj+9orofFAvHp57DNfFH+C0f6WokeNjYQ1PZmIEJHCvxDhhL/zpcc9Qmxy Gwfg== X-Gm-Message-State: AFqh2krnvqXc8UCRvDVbgHn0mAqT5e3Si01n+TkfSfOgOHtX72/whbDa P87iMXGcE9A7mbVRI/l+Opg= X-Google-Smtp-Source: AMrXdXstvZP4KwYJM4XVGKQxQFUrhlecEmhC2KpecjyFCTfaAxdvndQjQ7CYYf2zHvIl7GkXQalX1A== X-Received: by 2002:a17:903:40c9:b0:194:45d0:3b21 with SMTP id t9-20020a17090340c900b0019445d03b21mr5758782pld.4.1673463276691; Wed, 11 Jan 2023 10:54:36 -0800 (PST) Received: from nathanxps13 ([50.47.162.83]) by smtp.gmail.com with ESMTPSA id n9-20020a170903110900b00178b6ccc8a0sm10632114plh.51.2023.01.11.10.54.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jan 2023 10:54:36 -0800 (PST) Date: Wed, 11 Jan 2023 10:54:34 -0800 From: Nathan Bossart To: Peter Eisentraut Cc: Alvaro Herrera , Justin Pryzby , pgsql-hackers@postgresql.org Subject: Re: Common function for percent placeholder replacement Message-ID: <20230111185434.GA1912982@nathanxps13> References: <20221219095114.m4nlp4fb3owmsu65@alvherre.pgsql> <8228593d-1ebc-e061-2c61-3815bb364385@enterprisedb.com> <20230104003700.GB289060@nathanxps13> <1c2204c9-a38e-3075-56dc-eef9a103a645@enterprisedb.com> <20230109175357.GB1112921@nathanxps13> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="6TrnltStXW4iwmi0" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --6TrnltStXW4iwmi0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Jan 11, 2023 at 11:09:01AM +0100, Peter Eisentraut wrote: > committed with that fixed While rebasing my recovery modules patch set, I noticed a couple of small things that might be worth cleaning up. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com --6TrnltStXW4iwmi0 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="percentrepl_nitpicks.patch" diff --git a/src/backend/access/transam/xlogarchive.c b/src/backend/access/transam/xlogarchive.c index f911e8c3a6..fcc87ff44f 100644 --- a/src/backend/access/transam/xlogarchive.c +++ b/src/backend/access/transam/xlogarchive.c @@ -154,9 +154,6 @@ RestoreArchivedFile(char *path, const char *xlogfname, xlogRestoreCmd = BuildRestoreCommand(recoveryRestoreCommand, xlogpath, xlogfname, lastRestartPointFname); - if (xlogRestoreCmd == NULL) - elog(ERROR, "could not build restore command \"%s\"", - recoveryRestoreCommand); ereport(DEBUG3, (errmsg_internal("executing restore command \"%s\"", diff --git a/src/common/archive.c b/src/common/archive.c index de42e914f7..641a58ee88 100644 --- a/src/common/archive.c +++ b/src/common/archive.c @@ -33,7 +33,7 @@ * The result is a palloc'd string for the restore command built. The * caller is responsible for freeing it. If any of the required arguments * is NULL and that the corresponding alias is found in the command given - * by the caller, then NULL is returned. + * by the caller, then an error is thrown. */ char * BuildRestoreCommand(const char *restoreCommand, --6TrnltStXW4iwmi0--