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 1nsIOX-0007j2-L5 for pgsql-hackers@arkaria.postgresql.org; Sat, 21 May 2022 06:15:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nsIOV-0006sm-9x for pgsql-hackers@arkaria.postgresql.org; Sat, 21 May 2022 06:15:19 +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 1nsIOU-0006sd-Oy for pgsql-hackers@lists.postgresql.org; Sat, 21 May 2022 06:15:19 +0000 Received: from mail-oi1-x229.google.com ([2607:f8b0:4864:20::229]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nsIOQ-00026y-Ll for pgsql-hackers@lists.postgresql.org; Sat, 21 May 2022 06:15:17 +0000 Received: by mail-oi1-x229.google.com with SMTP id y66so6165331oia.1 for ; Fri, 20 May 2022 23:15:14 -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=i8G9rwOlmPBWrjcKll5K9p+ytTB5AsETS+12ozRmKfo=; b=Z/rtOEGRZ2LkVUHNWFg43xR1ycqOhA5purGwsf7d0jnigVbHD02Piihe1ud8eMFsUV 5MrIs0cScJaSpzagaaz5pFsmunU+ZK805/+dXqK9JXgOX43oLkMW0BU5NfmdYJojO5I6 6CTA0JbQI7WZ7eGqhbmR7DApaXYzo7BxqH2Ok= 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=i8G9rwOlmPBWrjcKll5K9p+ytTB5AsETS+12ozRmKfo=; b=idEuDP44dcCLddQ6WTht+TEV58fH86rclOC3TcDwa1yVIBEn+epc1XP6Dqu2SCqXoh 83LvDrHsyiON22cwExlnPydnJ3heyz9yYXCyiT6CLclt0zVkioTj4hxhZ7UWihqhMysF dwaw8pGSc10woGJDXeET6FKR7xTkiltsElOPBevsdDjtCTGkXkWU0EBq8iiVh6rl34Yk cUoYVwTj5DK+VUK4FEeKIwsB8CuElZRI5xskDMb5mmecsntYopA5LmX6KOpAFTpba12/ TtMOpqQ1rQZ2+HLVb0wfjUpsuc1rWTKuCb3veChb6addqi0d2oS5Fc+I84nQxHShYKN1 IwZg== X-Gm-Message-State: AOAM530YutDe2rYV6CRm/gwns9945OR4Q1HwG6Q+lF1wq+TAC2CNmE2X AkiyBSHso5D7ZD1RSmCyXzWLVA== X-Google-Smtp-Source: ABdhPJxy+witxb74gpRM/lCv/cwKx4/MznJg2NjoVlM2uEoJlgAgFwbv8yOUDTD2OjWha0pnkW0vzw== X-Received: by 2002:a05:6808:bcf:b0:329:867:a994 with SMTP id o15-20020a0568080bcf00b003290867a994mr6826055oik.249.1653113713925; Fri, 20 May 2022 23:15:13 -0700 (PDT) Received: from rfd.leadboat.com ([2600:1702:a20:5750::2e]) by smtp.gmail.com with ESMTPSA id k2-20020a056870350200b000e92295f8acsm1767210oah.2.2022.05.20.23.15.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 May 2022 23:15:12 -0700 (PDT) Date: Fri, 20 May 2022 23:15:09 -0700 From: Noah Misch To: Tom Lane Cc: Alvaro Herrera , Amul Sul , PostgreSQL Hackers Subject: Re: tweak to a few index tests to hits ambuildempty() routine. Message-ID: <20220521061509.GA2980571@rfd.leadboat.com> References: <202204251353.vgkpgcy3szt2@alvherre.pgsql> <39945.1650895508@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="tKW2IUtsqtDRztdT" Content-Disposition: inline In-Reply-To: <39945.1650895508@sss.pgh.pa.us> 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 --tKW2IUtsqtDRztdT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Apr 25, 2022 at 10:05:08AM -0400, Tom Lane wrote: > Alvaro Herrera writes: > > Hmm, so 027_stream_regress.pl is not prepared to deal with any unlogged > > tables that may be left in the regression database (which is what my > > spgist addition did). I first tried doing a TRUNCATE of the unlogged > > table, but that doesn't work either, and it turns out that the > > regression database does not have any UNLOGGED relations. Maybe that's > > something we need to cater for, eventually, but for now dropping the > > table suffices. I have pushed that. > > It does seem like the onus should be on 027_stream_regress.pl to > deal with that, rather than restricting what the core tests can > leave behind. Yeah. Using "pg_dumpall --no-unlogged-table-data", as attached, suffices. > Maybe we could have it look for unlogged tables and drop them > before making the dumps? Although I don't understand why > TRUNCATE wouldn't do the job equally well. After TRUNCATE, one still gets a setval for sequences and a zero-row COPY for tables. When dumping a standby or using --no-unlogged-table-data, those commands are absent. --tKW2IUtsqtDRztdT Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="stream-regress-unlogged-v1.patch" Author: Noah Misch Commit: Noah Misch Use --no-unlogged-table-data in t/027_stream_regress.pl. This removes the need to drop unlogged relations in the src/test/regress suite, like commit dec8ad367e46180f826d5b6dc820fbecba1b71d2 did. Reviewed by FIXME. Discussion: https://postgr.es/m/39945.1650895508@sss.pgh.pa.us diff --git a/src/test/recovery/t/027_stream_regress.pl b/src/test/recovery/t/027_stream_regress.pl index fdb4ea0..7982ac0 100644 --- a/src/test/recovery/t/027_stream_regress.pl +++ b/src/test/recovery/t/027_stream_regress.pl @@ -100,7 +100,8 @@ $node_primary->wait_for_catchup($node_standby_1, 'replay', command_ok( [ 'pg_dumpall', '-f', $outputdir . '/primary.dump', - '--no-sync', '-p', $node_primary->port + '--no-sync', '-p', $node_primary->port, + '--no-unlogged-table-data' # if unlogged, standby has schema only ], 'dump primary server'); command_ok( --tKW2IUtsqtDRztdT--