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 1tuBNv-004fOA-4w for pgsql-hackers@arkaria.postgresql.org; Mon, 17 Mar 2025 14:24:07 +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 1tuBNr-00DTXr-TH for pgsql-hackers@arkaria.postgresql.org; Mon, 17 Mar 2025 14:24:03 +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 1tuBNr-00DTXi-Io for pgsql-hackers@lists.postgresql.org; Mon, 17 Mar 2025 14:24:03 +0000 Received: from mail-yw1-x112a.google.com ([2607:f8b0:4864:20::112a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tuBNo-003Nul-01 for pgsql-hackers@lists.postgresql.org; Mon, 17 Mar 2025 14:24:03 +0000 Received: by mail-yw1-x112a.google.com with SMTP id 00721157ae682-6fee63b9139so37203567b3.1 for ; Mon, 17 Mar 2025 07:24:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742221440; x=1742826240; 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=B3WzJXylVh5npspgFEr5gnwwtna2ehcHWjQ/Mq+e+os=; b=dGO42W9o0dr5pqqa6ZornsZY0FJZl+rAHDbr0CdzTA5Foty2wxRy2D1epjtMTNs5hW x9RcxnSyj3/iyuC0ehCqr8tqAf4xPzP1qBwkSJiQycUvZtQzoHB1Y65MMqAaERkKXXif 6Dc7MvKoLUnAZ2Z/GgdEc8fz+Kv8xdNiodg/nnTOAAQ1dKqzY7s7ahi+cG+aV6oDpg38 GG1Pi/P84wFZgQESuHrKgmmZGNoY3OR3CvJPrcC8OGODbw+SnyUdakLFCGKUuO/ZsGkd ksgAr9ygz9sTQbw7SMLg0CbIeuNMeJGSA+uGyR7B7znoeszoka9iVpIxQ+fQxp75Z87T hPIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742221440; x=1742826240; 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=B3WzJXylVh5npspgFEr5gnwwtna2ehcHWjQ/Mq+e+os=; b=VZ5V5L46uCZPWmg9T26lcMkU4ZH+PQq4bN3dc/Wrtw0qjmEJgDVAJjJxEA6RtharJf ULsptAJKBlQwXf3suzbDJk5vRBQ3y/qtDaUUL3xrkh2AKU85ED9tDpjAfZi37hlbsi32 LxgASDid0y5k94VkIbvLJPX8cMfLIo9a5eFJ6az9rbzDLaz9ExErUAAMQAuXMLWq/0J8 +bUUdOUa+D3LHcv5A2waTCSfjVlY4Kz8HZDUlcVBtb1T19hh4E7FLsUwr4kGuAcMF8vo +v3wG2RfdpGy9ibrcG8GS4eywV8P+wJQ2y4JV/bKUksBtqJwM9N11REAxD4tzWKeEhsE b3pA== X-Forwarded-Encrypted: i=1; AJvYcCXgiEJJAy2RaQwpIjk60MXCnU1Jf3+h42gEwht3nH3xz4oovErxCwgOxKa9qi+dVlvzj7yygUCPF6O6KfZ+@lists.postgresql.org X-Gm-Message-State: AOJu0YxOEoFFRwo9sZqNo+QHlUHWCOMPdR/ZHIaevijc2+PhrJu19Ul+ Mrl8ytm0Ylo9CEqRKQY9TT/TjAxzGoQRqY5FH+sNa6AbSg9p3ajQ X-Gm-Gg: ASbGnctUF1vm5qgxdyJHTwx+COVE/O5TBtqUBBE8/jGAD/Tgg3pWOXA79yo3iifye0z RbQgTHdVEBYpPoW/1aWpFvFKdSddVTv02LRoNsmoLtBhH/hxwQmbbJezksYSUzfoZ8D6hNIa1jx 4xuP4JOJ9qnBCxdZENTx/AGHLaUPMk1q8tebO0eYE2tWDu2NKebBYkGGh+vy2SStUUqWpH0suJ+ 2vS/rG+g1p8ftZOieKqOlWGxdY3hCHJRdedYS3C0/YHF3x4NKq3Kqwcx3Bvnhs8eukNPHtkSAfb lrPEM1YPabVzCHMKIGAxZPLfsUYtDEvvmjTPryfwESLlR5+sngfp9dBXJtUxXRShWlY0vlB4Bxp /TFNCHqrM/GpAFF3yhs/cbS/a+DMRDx5Sy+yqT5/RDzunXA== X-Google-Smtp-Source: AGHT+IE5XZeQb+EE+O+Zpu61tc+V0mNezw0Vr6+TFBWPaYi1mxgaPttwpMFsm7yJKZ9RQRI7yECRaw== X-Received: by 2002:a05:690c:d1c:b0:6fe:d004:e2a3 with SMTP id 00721157ae682-6ff46427906mr168115147b3.16.1742221439802; Mon, 17 Mar 2025 07:23:59 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 00721157ae682-6ff32c80f5asm21671297b3.91.2025.03.17.07.23.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Mar 2025 07:23:59 -0700 (PDT) Date: Mon, 17 Mar 2025 09:23:56 -0500 From: Nathan Bossart To: Corey Huinker Cc: Jeff Davis , Robert Treat , Robert Haas , Andres Freund , Tom Lane , Michael Paquier , jian he , Bruce Momjian , Matthias van de Meent , Magnus Hagander , Stephen Frost , Ashutosh Bapat , Peter Smith , PostgreSQL Hackers , alvherre@alvh.no-ip.org Subject: Re: Statistics Import and Export Message-ID: References: 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 Sun, Mar 16, 2025 at 05:32:15PM -0400, Corey Huinker wrote: >> >> * The custom format actually does two WriteToc() calls, and since these >> patches move the queries to this part of pg_dump, it means we'll run all >> the queries twice. The comments around this code suggest that the second >> pass isn't strictly necessary and that it is really only useful for >> data/parallel restore, so we could probably skip it for no-data dumps. >> > > Is there any reason we couldn't have stats objects remove themselves from > the list after completion? I'm assuming that writing a completely different TOC on the second pass would corrupt the dump file. Perhaps we could teach it to skip stats entries on the second pass or something, but I'm not too wild about adding to the list of invasive changes we're making last-minute for v18. -- nathan