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 1tziEb-005ZeW-D5 for pgsql-hackers@arkaria.postgresql.org; Tue, 01 Apr 2025 20:29:21 +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 1tziEa-006N5G-4t for pgsql-hackers@arkaria.postgresql.org; Tue, 01 Apr 2025 20:29:20 +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 1tziEZ-006N58-Ij for pgsql-hackers@lists.postgresql.org; Tue, 01 Apr 2025 20:29:19 +0000 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tziEW-002pD4-1w for pgsql-hackers@postgresql.org; Tue, 01 Apr 2025 20:29:18 +0000 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-227b828de00so105472505ad.1 for ; Tue, 01 Apr 2025 13:29:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1743539354; x=1744144154; 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=dSUBSwnkgT6V5b0OQ/DKEM0XxIA7ZsKHZaS07gG8cso=; b=GD/kUFrKIN/4SSaDxFPz7oH+nJeqEyZkWYzEPd/uVFdtYwD5zWAW8WX7sPxkXStTYB XQUXxe8ANidjjD/9cwCM55gzfK1wilFJdpQmrDU7BAYBieWAmsv8/u31+GnVbGWh5SmX gH02VGfl/LOjp6lrWAOf0dMdGyT96NTgj16Qk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743539354; x=1744144154; 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=dSUBSwnkgT6V5b0OQ/DKEM0XxIA7ZsKHZaS07gG8cso=; b=Qv8P+upxvq9P6oRRDsyvdaDfe9D2VozptE2b4B15qCU43Yl5PJuVQ344l79RKghM9G NCJZMBwryL7SUjRDRP0OgtxLyqrWVemE/43iKLrA2A2DYYG7pjPaO/MTji2dV1Mn4j6d FJ+S0M3+IGV8wmLJdRS60eYQAQJnFqkEaCpo0tjS/hWAdjU/ywnIp3d/JT2zKMoFensS 80RRAQksNaphKFnIYLrovUEgVdh+9ljs/2QowAzQoR2KdsyMUdQ3SFNteU2Y3CgDwsbM ZzRn8Ymiz+xQzf45463Mlo3ChIjZ7t/mVlW4WFF9sXFDsvudlMjm2j42OxKvgvnrQYHC r27Q== X-Gm-Message-State: AOJu0Yy7Gk8M+gyuKgaSVzYh6T28x/ih6f0w6SO9Pb7kn6YwuCvkaBOl nKslrXSo/dv0K0X5+OOWlgBklZ1ejSYfE7D8zVv3i7L8Vt1RlXRC9UvjJY1KmA== X-Gm-Gg: ASbGnctPgXwu6tmqTNru3d2ZAFfFEiwKGKxKxfcpFLDbur+olIN+2X/2KZ3Yiy+wX36 wtJ9w5KP/DtpjXh1XMBP0fUYVIifmYvzZpahPU1G9nhk3XI4ye2kYNgl8kXQE2w7yOA4DSlKmQz 4lHK7skcE1D2I7v6rWdw0VTC7t3EOHa78QsKGOTOZ9rAF7kqrbjrwCmp9chWvwYcUId1VvTPL8F rdXaNSaY6mFFnFGGapAn68QkxSK566OBgHzucGi2bFbr5q7tdmufh4qbMDGgAa+lxZlHOng3seV ja6l6YdJf8CRQ/R4xaohTXSvvjKS78A+6MS2Pa9tfg== X-Google-Smtp-Source: AGHT+IE8j1NCw6ESrIJIh21EUMq0qcoqtVVjKJQaabYf3+D8Y3NCKQdPlfmBLGcQk59g8lCXBMSQAQ== X-Received: by 2002:a05:6a00:3a11:b0:739:4a93:a5df with SMTP id d2e1a72fcca58-739c78b093bmr121383b3a.12.1743539354107; Tue, 01 Apr 2025 13:29:14 -0700 (PDT) Received: from google.com ([2601:647:5600:80d0::31cd]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73970e4cd17sm9436939b3a.75.2025.04.01.13.29.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Apr 2025 13:29:13 -0700 (PDT) Date: Tue, 1 Apr 2025 13:29:11 -0700 From: Noah Misch To: Andres Freund Cc: pgsql-hackers@postgresql.org, cookt@blackduck.com Subject: Re: TEMP_CONFIG vs test_aio Message-ID: <20250401202911.23.nmisch@google.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Tue, Apr 01, 2025 at 03:42:44PM -0400, Andres Freund wrote: > The reason for the failure is simple, the buildfarm animal specifies > io_method=io_uring (thanks to "cookt" for setting that up so quickly, whoever > you are :)) and the test is assuming that the -c io_method=... it passes to > initdb is actually going to be used, but it's overwritten by the TEMP_CONFIG. > The reason that the test passes -c io_method= to initdb is that I want to > ensure initdb passes with all the supported io_methods. That still happens > with TEMP_CONFIG specified, it's just afterwards over-written. > > I could just append io_method=$io_method again after $node->init(), but then I That would be the standard way. Here's the Cluster.pm comment that tries to articulate the vision: # If a setting tends to affect whether tests pass or fail, print it after # TEMP_CONFIG. Otherwise, print it before TEMP_CONFIG, thereby permitting # overrides. Settings that merely improve performance or ease debugging # belong before TEMP_CONFIG. Since anything initdb adds is "before TEMP_CONFIG", we have this outcome. > couldn't verify that initdb actually ran with the to-be-tested io method. > > > Does anybody have a good suggestion for how to fix this? > > > The least bad idea I can think of is for the test to check if > PostgreSQL::Test::Utils::slurp_file($ENV{TEMP_CONFIG}) contains the string > io_method and to append the io_method again to the config if it does. But > that seems rather ugly. > > > Does anybody have a better idea? Options: 1. Append, as you mention above 2. Slurp TEMP_CONFIG, as you mention above 3. Slurp postgresql.conf, and fail a test if it doesn't contain io_method. Then append. If initdb fails to insert io_method, the test will catch it. 4. Run initdb outside of Cluster.pm control, then discard it My preference order would be roughly 1,3,2,4. The fact that initdb creates a data directory configured for a particular io_method doesn't prove that initdb ran with that method, so I don't see 2-4 as testing a lot beyond 1.