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 1o6mKq-0000iN-If for pgsql-hackers@arkaria.postgresql.org; Thu, 30 Jun 2022 05:03:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o6mKo-0006d5-5x for pgsql-hackers@arkaria.postgresql.org; Thu, 30 Jun 2022 05:03:22 +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 1o6mKn-0006cw-TC for pgsql-hackers@lists.postgresql.org; Thu, 30 Jun 2022 05:03:21 +0000 Received: from mail-qk1-x729.google.com ([2607:f8b0:4864:20::729]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1o6mKh-0005k1-Ew for pgsql-hackers@postgresql.org; Thu, 30 Jun 2022 05:03:20 +0000 Received: by mail-qk1-x729.google.com with SMTP id g1so776856qkl.9 for ; Wed, 29 Jun 2022 22:03:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=xO956Wig5+1It4D8MWL54jmzlN6cYCSiHKbzvVCvc4w=; b=RAkIWpgQ+PbdS/jSyHtzeYLZ0u3n8Z5gpQvR090BtFMY8BS8wbotnjeb4/NUvNJG5p KsJXkCFpDAzq+5ZT7sEs2Ljh0GLQ2rmAi0vkpBMXZABogXMb4RupMREAbdiMF5hv6hYe sN/FCM1gIDYhFm1N4vcVuXN8VqFN+bNyXxgjQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=xO956Wig5+1It4D8MWL54jmzlN6cYCSiHKbzvVCvc4w=; b=3CNNsIlPtFLtrkByXiCuJl4jae9KuUz9pl4A+aeoDd70sV/MB/TE0ZeT8gczBKf69N YZ2wuD6o2feC11TTa7Wa/wu59FdEkhxSQPxiErwlXnpzdxlxfGXwXmParwvV+qcav7Jh XQSUJHIex7v2Q9GQf8yIZjlkMmG24weSFfkQ/EhaMcmsZiKXjLSqLFmQn7bXYGCbuAtI jJBG3CEf7gGssFUMolc3jrLIn6yUyeYyBavpTelRq2XyrsBMp15QRHg8KmbS7Ynp2NOG ESxF4uX9f6NbUsHU0qVq9mtV5GkU48lDDv9OG2JnRRw64xkRLgo+1ibzDdTTtVudeKg/ gmZQ== X-Gm-Message-State: AJIora8B/G+yE+Pcn5D6/04GGVATznctuOO3QoAFfSDOb4RXm9t6ZpWC RNzPnqv5PTqE1oB2DYYuwZbic8cljXq6lQ== X-Google-Smtp-Source: AGRyM1tJTaRMnvX8D+BaRbvcOEkp/gkcFSwuYmX65nUAfrgO6DDoiYHxnj7nXIppvwX9n9DHlaPpYg== X-Received: by 2002:a05:620a:3c3:b0:6af:9933:7cb3 with SMTP id r3-20020a05620a03c300b006af99337cb3mr4936302qkm.508.1656565394191; Wed, 29 Jun 2022 22:03:14 -0700 (PDT) Received: from rfd.leadboat.com ([2600:1702:a20:5750::2e]) by smtp.gmail.com with ESMTPSA id c21-20020ac87d95000000b003172da668desm13132843qtd.50.2022.06.29.22.03.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Jun 2022 22:03:13 -0700 (PDT) Date: Wed, 29 Jun 2022 22:03:10 -0700 From: Noah Misch To: Michael Paquier Cc: Heikki Linnakangas , Tom Lane , pgsql-hackers Subject: Re: last_archived_wal is not necessary the latest WAL file (was Re: pgsql: Add test case for an archive recovery corner case.) Message-ID: <20220630050310.GB2257984@rfd.leadboat.com> References: <2842251.1644849700@sss.pgh.pa.us> <8f15e602-337e-fbb2-4b2e-e83a01ef9088@iki.fi> <831b6ab9-45d6-7ab0-ea9c-6efd4383afb8@iki.fi> <3186114.1644960507@sss.pgh.pa.us> <40de25aa-2e20-08ad-e014-edb731594a74@iki.fi> <20220627070457.GA2176699@rfd.leadboat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Jun 27, 2022 at 07:32:08PM +0900, Michael Paquier wrote: > On Mon, Jun 27, 2022 at 12:04:57AM -0700, Noah Misch wrote: > > One can adapt the test to the server behavior by having the test wait for the > > archiver to start, as attached. This is sufficient to make check-world pass > > with the above sleep in place. I think we should also modify the PostgresNode > > archive_command to log a message. That lack of logging was a obstacle > > upthread (as seen in commit 3279cef) and again here. > > ? qq{copy "%p" "$path\\\\%f"} > - : qq{cp "%p" "$path/%f"}; > + : qq{echo >&2 "ARCHIVE_COMMAND %p"; cp "%p" "$path/%f"}; > > This is a bit inelegant. Perhaps it would be better through a perl > wrapper like cp_history_files? I see it the other way. Replacing a 49-character compound command with a wrapper script would gain no particular advantage, and it would give readers of the test code one more file to open and understand.