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 1tK0TB-006IsN-4q for pgsql-hackers@arkaria.postgresql.org; Sat, 07 Dec 2024 19:28:01 +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 1tK0T8-00Gd0h-7r for pgsql-hackers@arkaria.postgresql.org; Sat, 07 Dec 2024 19:27:59 +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 1tK0T7-00Gd0Z-Pa for pgsql-hackers@lists.postgresql.org; Sat, 07 Dec 2024 19:27:59 +0000 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tK0T6-001Y3v-CI for pgsql-hackers@lists.postgresql.org; Sat, 07 Dec 2024 19:27:57 +0000 Received: by mail-pg1-x529.google.com with SMTP id 41be03b00d2f7-7fd35b301bdso512332a12.2 for ; Sat, 07 Dec 2024 11:27:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20230601.gappssmtp.com; s=20230601; t=1733599675; x=1734204475; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=Qgs5B/zP21v7yGdunqQxUH9Um4w1NRnuFIPM39xctkc=; b=KcnL80iFhfwTTAmQGCQsbcFEfbSZPwASBB+dn09kBZTNTjVdL9w0CGbhBlIATZizcx J+Ty+ozO0EGHf/aCMfKliFTWHgC9L6Q8jJPAI76rKgFPNdxbbvVAd0HKOTQkQJsr5/Db Gl8SazvkKVv7OWtaKOq6KG9RxkJx+kp+XZOCJauMaRxFJN8vm3Irph6dDM8lPG5tKhCd vddOAtIqQHSOSIKk3AXHot7gX5ZNKQTwUetMXdd8fdzqhJiliNTSnOcbq9PZHruhVei/ dvItscY5umhLCYrBfIh6zEK9KPGDbsltYXaCbE3Pqf3Al9RvGvRx/zBzYHTivWnuuq2u cr8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733599675; x=1734204475; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Qgs5B/zP21v7yGdunqQxUH9Um4w1NRnuFIPM39xctkc=; b=YOXyq7fQ6POXjK43zdl1wqoWOS4dOsVlzvEMzzU7RhWP19PuCD+EcYOZZU8oHzzF/o plPYZiHbsD7oeBF6edqIBXqNUrDi9cKzz8+ItEY2Pd+P5U+DYaWP65jP5uqswWjL2/E4 9yTtDldUhmjSbjzfn7rE1703q1x5ohRtH6cfKEj4NnpeKcpYdaPdKTEufeOsUynGuLpR h7jmxIv5fsvgSagTMMHVHCTv2wkVU5rQDekfEUjAAjmbdoDK8NwBiROm1a79yiDzceiJ oayHbQ+9lGKd82txnV/Gax/P5TfxUCo/pWiVDUmSk2KTWlU5qMj7BTMxQVcT+V0dHwMb KHsw== X-Forwarded-Encrypted: i=1; AJvYcCX5KmceYVWZ752LPUEAujHCG5dR83KsJYV3l+hD9paOPbghuWPYchbRNAglhrNipdWq4GC2LP+EmU3OB3V7@lists.postgresql.org X-Gm-Message-State: AOJu0Yz5MFtig6oOTEPUY7tBfFdx8rizi/1zRz2Gazz+0+/DDrocxQYM nkyCEs3tRIJRpITDdEo1BSJdhObKs4FP3m6d7MwRoGTmf5kccFZz+KhIu08Urg== X-Gm-Gg: ASbGncusggAcGbOi951l7yDL6Q8bytzhpV2h4dbaXrz43Fwpmw2Ovmv0xT9k25L9YQh JYZMngaV4JaqW5Kg/dMB5AQmt8vD1HzUP9BINJnY0TYmAN1t12ZdwVqXBBR/hGH3Fo8BoNaN7ab 3em3UDwu4sM+8YKOTe0wNWs4BikVnrPPQepq1kSZdCeUcOafRidPxZ0CQDxKpBDqQT0oENzZJFP GsUGG90126dq82VPJpIp568oKhrM0IWiUgadqUw78ETpItEo1xN7i4PLxLFCfbqS6zAJdDl5JaH DCIUjISp5WD/V7m2GA== X-Google-Smtp-Source: AGHT+IF+eDWwQdaCb9GD2XAWtNkMp4Nwtm6oN6z9AnJUyX3XqKUYiCAVvMBXUZC7nTGZ/v9DkXqFug== X-Received: by 2002:a17:902:db04:b0:215:8695:ef91 with SMTP id d9443c01a7336-21614d1ab92mr93785485ad.6.1733599675168; Sat, 07 Dec 2024 11:27:55 -0800 (PST) Received: from ?IPv6:2607:fb90:378a:b8f:ddc7:40ba:4d13:d411? ([2607:fb90:378a:b8f:ddc7:40ba:4d13:d411]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-215f8e3e956sm46851595ad.8.2024.12.07.11.27.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Dec 2024 11:27:54 -0800 (PST) Message-ID: Subject: Re: Statistics Import and Export From: Jeff Davis To: Corey Huinker Cc: Bruce Momjian , jian he , Matthias van de Meent , Tom Lane , Nathan Bossart , Magnus Hagander , Stephen Frost , Ashutosh Bapat , Peter Smith , PostgreSQL Hackers , alvherre@alvh.no-ip.org Date: Sat, 07 Dec 2024 11:27:51 -0800 In-Reply-To: References: <11bb2c7403d4a7421fe8b09df6737aa83976266e.camel@j-davis.com> <5d3a24216d15ce8a50d0fc085a13a410202014ca.camel@j-davis.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu2 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 2024-11-26 at 17:11 -0500, Corey Huinker wrote: >=20 > > * Why does binary upgrade cause statistics to be dumped? Can you > > just > > make pg_upgrade specify the appropriate set of flags? > >=20 >=20 >=20 > That decision goes back a ways, I tried to dig in the archives last > night but I was getting a Server Error on postgresql.org. I suggest that pg_upgrade be changed to pass --no-data to pg_dump, rather than --schema-only. That way, you don't need to create a special case for the pg_dump default that depends on whether it's a binary upgrade or not. If wanted, there could also be a new option to pg_upgrade to specify -- with-statistics (default, passes --no-data to pg_dump) or --no- statistics (passes --schema-only to pg_dump). But that option is probably not necessary; everyone upgrading probably wants the stats. Regards, Jeff Davis