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 1rx8Uw-006aB5-6A for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Apr 2024 16:51:02 +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 1rx8Uu-00CykR-1a for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Apr 2024 16:51:00 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rx8Ut-00Cyj8-O1 for pgsql-hackers@lists.postgresql.org; Wed, 17 Apr 2024 16:50:59 +0000 Received: from mail-io1-xd2c.google.com ([2607:f8b0:4864:20::d2c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rx8Uq-003K1R-KU for pgsql-hackers@lists.postgresql.org; Wed, 17 Apr 2024 16:50:58 +0000 Received: by mail-io1-xd2c.google.com with SMTP id ca18e2360f4ac-7d9b1465f3eso103997139f.1 for ; Wed, 17 Apr 2024 09:50:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713372656; x=1713977456; darn=lists.postgresql.org; h=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=sIsSpIGjoSDYIpMBVbcAXlOzRxR97oUK6rblUPawemk=; b=fcKNGFGV23IaKmex+CtI2VS/mi/AcXMfY1k9Op9sV/3nU8LhWD5/OMnImXz4oq5yrA Ab0nvprXAl/eMaAdsYV2vPgb9dtYAYP+98GX3+9uZ1IO5BTB30TJG7PJiCy7KAwoNmD1 QjGUo2TNeO2zXODJ7OKv/N9oCxAme8C/NYKe0zS/oEsD13G8SmUMSHQFeWqg8Zfe5ywK 4RQ/lf0xfZcy1YcsjX62OtOmCa4z/G8HU+LY347ItGlvP+sjHX9UbWtTFjKs3QQSMh8W EVLnh51GdP3TirSvmODRrdwWcaq1cClaoEzLO1/4sEeQWfY02V9wq1ErcF81MDAXWKc+ i9fA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713372656; x=1713977456; h=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=sIsSpIGjoSDYIpMBVbcAXlOzRxR97oUK6rblUPawemk=; b=IhiXcPdkqfYRcC3k4b9+7d/mlYrwX+3BzBj5fmgQcCfANWlHsDTKh5UwwAm2msqDT3 nWOZKCHYvLU7b45wTCE1+kVPSroE74xDEbtHqaUyVVQdzg+JzTmPbUGB9x+L+q5hF0DI zBQlrroeT6vpauYN7FknLOIW3OOXu9Mb3Pd0tpW1m7j8HHMDvJLspieaJTVmZy0lMXOb oXql+HZNWIlfWkkalhL5mVbT8X0MdLf/L40J7+tYmx0e02XDiYUWmhNeh6/8VYcMFSud smpii2ptd4SCbAYXLVtKarc5UP2RH3XqcRfZVNiWq3IUlSFucc4Xygk7h6cqx6uiCV3z 5FNQ== X-Forwarded-Encrypted: i=1; AJvYcCUyNjaVLocXkhuagFj1Q4oeEhezSPs+P4aHoqqQt1CMkYG9b+Ti8/qVFOVvAArRKVC1iB6vDI5UMqJQd/bonfy/V90YjiVQclkS8974A8WCVsIu X-Gm-Message-State: AOJu0YzDStnx6Wgpe4lBPWNSUoevbt3/1b3a7yFlH7R3696GIQqwM1s9 wjFIozuksS3dItGg8eNHGbIxm5NUQUh6AE/kkVieJVZ/fxPslrio X-Google-Smtp-Source: AGHT+IHvlfq22SJlVnNwk4XWfWvm7KErl3PxezofU8A69BrtX9Y87TcARL8wgCj2AHWc4Fv3ZTC+xw== X-Received: by 2002:a5e:c64c:0:b0:7d5:f931:c48e with SMTP id s12-20020a5ec64c000000b007d5f931c48emr226839ioo.17.1713372655731; Wed, 17 Apr 2024 09:50:55 -0700 (PDT) Received: from nathanxps13 (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id m38-20020a05663840a600b0047ecdebb896sm4690557jam.16.2024.04.17.09.50.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 09:50:55 -0700 (PDT) Date: Wed, 17 Apr 2024 11:50:53 -0500 From: Nathan Bossart To: Corey Huinker Cc: Tom Lane , Jeff Davis , Magnus Hagander , Stephen Frost , Ashutosh Bapat , Matthias van de Meent , Peter Smith , PostgreSQL Hackers , Tomas Vondra Subject: Re: Statistics Import and Export Message-ID: <20240417165053.GA3253364@nathanxps13> References: <1841621.1712093467@sss.pgh.pa.us> <06286ee47fa4b06b6e7f08da21958d7e35525ed4.camel@j-davis.com> <149855.1712164687@sss.pgh.pa.us> <261289.1712174567@sss.pgh.pa.us> <1798867.1712376328@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Apr 11, 2024 at 03:54:07PM -0400, Corey Huinker wrote: > At the request of a few people, attached is an attempt to move stats to > DATA/POST-DATA, and the TAP test failure that results from that. > > The relevant errors are confusing, in that they all concern GRANT/REVOKE, > and the fact that I made no changes to the TAP test itself. > > $ grep 'not ok' build/meson-logs/testlog.txt > not ok 9347 - section_data: should not dump GRANT INSERT(col1) ON TABLE > test_second_table It looks like the problem is that the ACLs are getting dumped in the data section when we are also dumping stats. I'm able to get the tests to pass by moving the call to dumpRelationStats() that's in dumpTableSchema() to dumpTableData(). I'm not entirely sure why that fixes it yet, but if we're treating stats as data, then it intuitively makes sense for us to dump it in dumpTableData(). However, that seems to prevent the stats from getting exported in the --schema-only/--binary-upgrade scenario, which presents a problem for pg_upgrade. ISTM we'll need some extra hacks to get this to work as desired. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com