Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u6cxN-0022V3-8g for pgsql-hackers@arkaria.postgresql.org; Sun, 20 Apr 2025 22:16:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1u6cxL-00Fzdk-33 for pgsql-hackers@arkaria.postgresql.org; Sun, 20 Apr 2025 22:16:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u6cxK-00Fzdc-PH for pgsql-hackers@lists.postgresql.org; Sun, 20 Apr 2025 22:16:07 +0000 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1u6cxH-0017sG-30 for pgsql-hackers@postgresql.org; Sun, 20 Apr 2025 22:16:06 +0000 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-7376e311086so4696191b3a.3 for ; Sun, 20 Apr 2025 15:16:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1745187362; x=1745792162; darn=postgresql.org; 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=MrLF70pTKy8Dg4sSpGd2HlvnO9UHp/4El+JtVKrwnQY=; b=X2Du++3QgxGaCz5/mEMsfnct15rPPCKH5uBoe0WAD2OGAqJA30YUzXEL4vvvMTjJ57 qpCXmsteSDejFYOKPwLcMehB7dWKlHZJF05rCG1rXTnQI0gnc9wm2gOzGNUEgfGpqYBj iDzQWUilC2Ojx642CJIvzzr/NXFfP/cUJpWaw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745187362; x=1745792162; 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=MrLF70pTKy8Dg4sSpGd2HlvnO9UHp/4El+JtVKrwnQY=; b=N4s62FPRpJu1YgyRNofoLbCFed34RJJI55edh7SDm5/dL07sq/5xmEzk6oZYzsDuK+ L9QqFprSa5KW3iBa1B+8MU8GOxXWac3TY11obHAnSI5GssIi6ZIXAL426azj/ZJaXWGF cWAODJdMJ4J2fnX4LvysW6s1LxFjYt7yvUT2aFI021b7S1hrwTQutNby2TzNKU27jSpC JhvptF1P5MZs3R8pZ/ibbUD8oHELrDejrYiIuNgSyvTjP/qiqya5o0u70Q1+p9xYDyf3 CglGptq377X4f+q/853DPCqro91hf8NKcZm+UHUSxogdXiN6u1iCR3X+k6DEusAnxVq4 iYGg== X-Forwarded-Encrypted: i=1; AJvYcCWwh4WBPS5E3/wH9nr9KEjtKW8tydsauTQSmDV0HDr+jzIC1HDGmSrTMlCoqWwaZpo14R6Lfuohw1Fvl7JK@postgresql.org X-Gm-Message-State: AOJu0YyxGBPZNo1yhjle+cCFH5EHahhJbHMTaMut/FV34Y8HqwIcYWxX KL8JPgmydjTYSL0p/QWtqJinUjSdiyBNggAjEJ0JWPjDfH1mGsgBGlaO2NfuFQ== X-Gm-Gg: ASbGncszWIVcLEhzKj+mrIB4nMLKqjQz78K44/+8NHe99K8U3ZVwc0VH4iyQorsdJdJ SO78mgE2HnQLoaN6cCuovAdpmlcxJW2PpQAA+jM6XixBEup1JOZ+KL3myeDX9UEV+REVccJ/QTT 3b0aSI9Ft3TXApbBnCEOLZCnMjjhkmyXwg2mKSiyla3Gz+f+JSCa8Bpq/NzGaXDeklj9yUvGXMB 4z/7C/+hUenyt3oPaMrk1kJPou+BHnmdHURmP0GtfAWo3dDc3IyYPNZIll+9sED43yL3w28b2T5 LrxVs25iG0QG+E871iLwReHhrT8FXU9UqEbBvg== X-Google-Smtp-Source: AGHT+IHEK31K6XmUQzpVN9jjbLGoUIiiasNiz/6MZj5vmoxbVSLWqU+btrx0iOgVp6vcocInLHK0YA== X-Received: by 2002:a05:6a00:4648:b0:736:4704:d5da with SMTP id d2e1a72fcca58-73dc15c68a2mr10409337b3a.22.1745187362407; Sun, 20 Apr 2025 15:16:02 -0700 (PDT) Received: from google.com ([2601:647:5600:80d0::31cd]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73dbfae939dsm5169718b3a.157.2025.04.20.15.16.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Apr 2025 15:16:01 -0700 (PDT) Date: Sun, 20 Apr 2025 15:15:59 -0700 From: Noah Misch To: Andres Freund Cc: Tom Lane , Nathan Bossart , Michael Paquier , Robert Pang , Kyotaro Horiguchi , robertmhaas@gmail.com, pgsql-hackers@postgresql.org Subject: Re: Back-patch of: avoid multiple hard links to same WAL file after a crash Message-ID: <20250420221559.ea.nmisch@google.com> References: <20250403002900.5d.nmisch@google.com> <2461391.1743865633@sss.pgh.pa.us> <20250405191339.8d.nmisch@google.com> <20250406020958.95.nmisch@google.com> <20250413153312.12.nmisch@google.com> <850092.1744559517@sss.pgh.pa.us> <20250420215339.e8.nmisch@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250420215339.e8.nmisch@google.com> User-Agent: Mutt/2.2.12 (2023-09-09) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, Apr 20, 2025 at 02:53:39PM -0700, Noah Misch wrote: > On Mon, Apr 14, 2025 at 09:19:35AM +0900, Michael Paquier wrote: > > On Sun, Apr 13, 2025 at 11:51:57AM -0400, Tom Lane wrote: > > > Noah Misch writes: > > > > Tom and Michael, do you still object to the test addition, or not? If there > > > > are no new or renewed objections by 2025-04-20, I'll proceed to add the test. > > Pushed as commit 714bd9e. The failure so far is > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=skink&dt=2025-04-20%2015%3A36%3A35 > with these highlights: > > pg_ctl: server does not shut down > > 2025-04-20 17:27:35.735 UTC [1576688][postmaster][:0] LOG: received immediate shutdown request > 2025-04-20 17:27:35.969 UTC [1577386][archiver][:0] FATAL: archive command was terminated by signal 3: Quit > 2025-04-20 17:27:35.969 UTC [1577386][archiver][:0] DETAIL: The failed archive command was: cp "pg_wal/00000001000000000000006D" "/home/bf/bf-build/skink-master/HEAD/pgsql.build/testrun/recovery/045_archive_restartpoint/data/t_045_archive_restartpoint_primary_data/archives/00000001000000000000006D" > > The checkpoints and WAL creation took 30s, but archiving was only 20% done > (based on file name 00000001000000000000006D) at the 360s PGCTLTIMEOUT. I can > reproduce this if I test with valgrind --trace-children=yes. With my normal > valgrind settings, the whole test file takes only 18s. I recommend one of > these changes to skink: > > - Add --trace-children-skip='/bin/*,/usr/bin/*' so valgrind doesn't instrument > "sh" and "cp" commands. > - Remove --trace-children=yes I gave that more thought. One can be more surgical than that, via --trace-children-skip-by-arg='*cp "*' or similar. My previous message's two options stop valgrind instrumentation at boundaries like pg_dumpall calling system(pg_dump ...), since that execs /bin/sh to run pg_dump. If we wanted to make it even more explicit and surgical, skink could use --trace-children-skip-by-arg='*valgrind-ignore-child*' combined with: --- a/src/test/perl/PostgreSQL/Test/Cluster.pm +++ b/src/test/perl/PostgreSQL/Test/Cluster.pm @@ -1404 +1404 @@ sub enable_restoring - : qq{cp "$path/%f" "%p"}; + : qq{cp "$path/%f" "%p" # valgrind-ignore-child}; @@ -1474 +1474 @@ sub enable_archiving - : qq{cp "%p" "$path/%f"}; + : qq{cp "%p" "$path/%f" # valgrind-ignore-child}; What's your preference? > Andres, what do you think about making one of those skink configuration > changes? Alternatively, I could make the test poll until archiving catches > up. However, that would take skink about 30min, and I expect little value > from 30min of valgrind instrumenting the "cp" command.