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 1oslqy-0000tB-9u for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Nov 2022 14:14:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oslqv-0007fp-Nr for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Nov 2022 14:14:53 +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 1oslqv-0007ff-AI for pgsql-hackers@lists.postgresql.org; Wed, 09 Nov 2022 14:14:53 +0000 Received: from mail-qt1-x834.google.com ([2607:f8b0:4864:20::834]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oslqs-0005eH-BK for pgsql-hackers@postgresql.org; Wed, 09 Nov 2022 14:14:52 +0000 Received: by mail-qt1-x834.google.com with SMTP id s4so10387191qtx.6 for ; Wed, 09 Nov 2022 06:14:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=user-agent: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=0qbHs2xOiRwmKFiTdDAfB+kOJcuvUE34rWK1Zyf/55E=; b=7Cj/onA+7ERFa8E7/FuPiTm8PGHY1Aab1dJyULXcd/+LsKdVP/9AG9RbqxDLLaiuQu SWjs/Q7zPsZfW1qEE7xIw/jqkz5IIr1LEcJeOUjFOvGZSRbJoyL84lGz59HrbvLqJ8Em LAqn+bcr7TnVbU+qSvNtQlR+33trCdRtTgpxN5ZFKOtOByCq74G/omP3g0638pmj/pO4 Sj2/0oNBzuHMiOb6MrAE5Fz92VjHbnp2DsZHLgZvSceCLmYjFC0vPvIf0BTBeu+Ba9Z2 ox8PMtlHw535dLpUB/KCJwhm1uAK6M+UAYWB77WTR+ooVJRvrV0RmUwmg9Huwam6RKDu Okyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=user-agent: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=0qbHs2xOiRwmKFiTdDAfB+kOJcuvUE34rWK1Zyf/55E=; b=cKSSjZ8mRx0VRbPXkJpJzqVgFYb3VDEsr7ogAZvSSI7CwKEsAGiJBpepjBZoVS+od1 gZJnSwfc3/9Q45UHJBmuDcj9ZOo64v4fWmPRmX4a9vGmeFH7vJrH8GmhuwPQfBrRCk4Z 0QUfVwJYSz/OLSH/YryGeoMLSkBqBKT+peStYACxBUD7l0QaKgH+1bj4YRPpQJ0p1/+a f4Nu+bl4cScMkb/uipTeoexqifSSaRuUi4W0xvBdiKlclSGYPyNIholFxe1jfFdi1Umu sFgwLZsCSHopY2GqQUzmfXaTYcIjz+RFhQSucZ0XkmpYbd8MxSUhCCElwWEqwRl01D7I Fy5w== X-Gm-Message-State: ACrzQf2rMndTKGMOORxAObXlw57SkMphPOUPS3yr0yCruTJxio7hMdu3 B+Mv2MjmuHjmjx20hXDmX2kbUQ== X-Google-Smtp-Source: AMsMyM4qjLJbXheeOB4XtEl613SKBfK76H7lVQfBLrMticjd0ElldzetyHFylhTjs2XW+oH3yV1xGA== X-Received: by 2002:ac8:5712:0:b0:3a5:636d:6d67 with SMTP id 18-20020ac85712000000b003a5636d6d67mr22369280qtw.674.1668003288594; Wed, 09 Nov 2022 06:14:48 -0800 (PST) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id fg26-20020a05622a581a00b00399b73d06f0sm9735973qtb.38.2022.11.09.06.14.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Nov 2022 06:14:47 -0800 (PST) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 2B768800E68; Wed, 9 Nov 2022 08:14:47 -0600 (CST) Date: Wed, 9 Nov 2022 08:14:47 -0600 From: Justin Pryzby To: Bharath Rupireddy Cc: David Christensen , Ian Lawrence Barwick , Michael Paquier , Matthias van de Meent , pgsql-hackers@postgresql.org Subject: Re: [PATCH] Teach pg_waldump to extract FPIs from the WAL Message-ID: <20221109141446.GN3775@telsasoft.com> References: <20221104140238.GA16921@telsasoft.com> <4E379ADE-1FC3-4D53-BE46-562BDC77C5FE@crunchydata.com> <20221104183838.GD16921@telsasoft.com> <20221108224519.GH3775@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Nov 09, 2022 at 06:00:40PM +0530, Bharath Rupireddy wrote: > On Wed, Nov 9, 2022 at 5:08 AM David Christensen wrote: > > > > Enclosed is v6, which squashes your refactor and adds the additional > > recent suggestions. > > Thanks for working on this feature. Here are some comments for now. I > haven't looked at the tests, I will take another look at the code and > tests after these and all other comments are addressed. > > 1. For ease of review, please split the test patch to 0002. This is just my opinion, but .. why ? Since it's easy to filter/skip/display a file, I don't think it's usually useful to have separate patches for tests or docs. > 6. > + if (dir_status == 0 && mkdir(config.save_fpw_path, 0700) < 0) > Use pg_dir_create_mode instead of hard-coded 0007? I think I thought of that when I first looked at the patch ... but, I'm not sure, since it says: src/include/common/file_perm.h-/* Modes for creating directories and files IN THE DATA DIRECTORY */ src/include/common/file_perm.h:extern PGDLLIMPORT int pg_dir_create_mode; I was wondering if there's any reason to do "CREATE DATABASE". The vast majority of TAP tests don't. $ git grep -ho 'safe_psql[^ ]*' '*pl' |sort |uniq -c |sort -nr |head 1435 safe_psql('postgres', 335 safe_psql( 23 safe_psql($connect_db, -- Justin