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 1toTl4-00BJci-2p for pgsql-hackers@arkaria.postgresql.org; Sat, 01 Mar 2025 20:48:27 +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 1toTl5-004MvO-4d for pgsql-hackers@arkaria.postgresql.org; Sat, 01 Mar 2025 20:48:25 +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 1toTl4-004MuD-Mr for pgsql-hackers@lists.postgresql.org; Sat, 01 Mar 2025 20:48:25 +0000 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1toTl1-000PAo-0x for pgsql-hackers@lists.postgresql.org; Sat, 01 Mar 2025 20:48:24 +0000 Received: by mail-pj1-x102f.google.com with SMTP id 98e67ed59e1d1-2feb1d7a68fso5222783a91.1 for ; Sat, 01 Mar 2025 12:48:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20230601.gappssmtp.com; s=20230601; t=1740862102; x=1741466902; 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=Zge59FTAV0LA5KDR8nEKE3ZB0kZFIU6SmcZhgb+fIik=; b=o72+q74q71f57w+Hn27hNVC12r6GRViQ1WPVzXjMnaB2Hjc3ZYNCY5brCBhAQBFYL/ sMOueoYY863dhnRe3/BIpvDfj5T5batR8VyNGRgGRtQZK+lltWSObIqmpAtUUkqtWzCw YouzgwecFU9xUQO7gFGvOjNa7hDoJva52MY9qpQcudet2Rom3kVbZvcYGji1r5DaEVG5 ssy4M1iatDwOFRrfHUziWXnB0ypProx4kIKie57N1K00e/I7Gj0qkrFCYafzhuoWMAN3 z5YGJ7+HkUNINeCt2xO51Vatj3NwMDFmrH4oQzgD0gdRl4zwk742OwsgBIC+tvg00zwv Sv5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740862102; x=1741466902; 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=Zge59FTAV0LA5KDR8nEKE3ZB0kZFIU6SmcZhgb+fIik=; b=D4HUpDZCqqyDmCAiGEiIa6vrlnAot5m/XqP8NY3C3hCDlUCm1ii8WLCIzI1Mm9kZI5 aCgYZPwPZAgs2hPYrxm1Pob47p0khEvCxq6jn9Qy7aEoVwvVWmzBarX6ZI1mReUEzkDM iSXtk2QeCgJyeDpKbJCoF8nSBk762gSBMFy3/beRQr+UwlD1IuteZuWo7nxOIxeb6aiy QIVPTlZ5QNkWyRrwuCXrHjR8vs5p7m+oDpxxYFmhD3EH8hDw+jnKOCJf7DtUdZVIhRH4 wXH9Fc9RZrgGZF3Kb6ixZ0rg1yUjmvSMeJNuGu74TAGh+7mh2K7t5EB/fY7i6J0e0X11 nRDA== X-Forwarded-Encrypted: i=1; AJvYcCVXkkElu45g332yd8y4i5mpEvxYDMYKn64ISxnoHBq+8zwXJRX51Ub1hsDBovqb3K4hLZQAg+GCg5khliuX@lists.postgresql.org X-Gm-Message-State: AOJu0YxsfIfjChi7NTEhkY1+6O3ML0UpeTC6TQLY+RdvIs/A5VkynciO Cd+Hc50sJ4ucCuW98v5bJtCkzCTIQI8b3FpjyPAFVQH2lQZCnh8fuVLGeIeAIQ== X-Gm-Gg: ASbGncue2+MKQP0jAHaAbKf1WaC+AfpCBfqPvxHoMgpsXY157q8MYFws8kJq/gnxDQe PmcEwin97P8KESbSG64nJbFljeX+ePfErVDzOsaMFtEFUYlvY1Ku+OZEp93X7eszQRmE74ybjkc JzM5QWdGTxgTrKoeoWk5/1nJ5hBVp/uaC8/+32Mqf/v+ioZTdpwX2tU7tzRDUFMMfL/1xvGF3ra NqsRLK4UC0rcEFTTu82P9copLTyLw9rIoJh3infIr6pr/jPk+kpcR9AImtt08jx7coaQvtRn/o0 G7PI9fqwaUZCTcdd+gE/NKrk3qGJyV2HDRDhtEEN87p+P3nNW503Mbl1b4yAWHvS5kf0QiXKD6U SQ/amfv0tXSc= X-Google-Smtp-Source: AGHT+IEZHcJbHxmbWifrksRIEjcg4lCbr4IGJyBa3ZlGS1n5aFAsPYGCb8649Anj+KXXphkH4dpMDA== X-Received: by 2002:a05:6a20:1596:b0:1ee:63d7:1d32 with SMTP id adf61e73a8af0-1f2f4b04c28mr14994432637.0.1740862102395; Sat, 01 Mar 2025 12:48:22 -0800 (PST) Received: from jeff-laptop.lan (c-76-102-242-158.hsd1.ca.comcast.net. [76.102.242.158]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-aee7de19c14sm5449925a12.20.2025.03.01.12.48.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Mar 2025 12:48:21 -0800 (PST) Message-ID: <948dd810f942016c22ffe9bb4500677299553c59.camel@j-davis.com> Subject: Re: Statistics Import and Export From: Jeff Davis To: Greg Sabino Mullane Cc: Ashutosh Bapat , Corey Huinker , Andres Freund , Tom Lane , Michael Paquier , Nathan Bossart , Bruce Momjian , Matthias van de Meent , Magnus Hagander , Stephen Frost , Peter Smith , PostgreSQL Hackers , alvherre@alvh.no-ip.org, jian he Date: Sat, 01 Mar 2025 12:48:18 -0800 In-Reply-To: References: <97b451228227c555be1a4f79c4a62ddec9a74f06.camel@j-davis.com> <1457469.1740419458@sss.pgh.pa.us> <8d13e4296408c53a93390525d0bcb906cbd13df4.camel@j-davis.com> <768b2a237e892bf1334bdcbb066cdc1bd1368cb2.camel@j-davis.com> <41c193c31d9144a658525b6a861e2e5d3117d88e.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 Sat, 2025-03-01 at 13:52 -0500, Greg Sabino Mullane wrote: > > Can you expand on some of those cases? >=20 > Certainly. I think one of the problems is that because this patch is > solving a pg_upgrade issue, the focus is on the "dump and restore" > scenarios. But pg_dump is used for much more than that, especially > "dump and examine". Thank you for going through these examples. > I just don't think it should be enabled by default for everything > using pg_dump. For the record, I would not strongly object to having > stats on by default for binary dumps, although I would prefer them > off. I am open to that idea, I just want to get it right, because probably whatever the default is in 18 will stay that way. Also, we will need to think through the set of pg_dump options again. A lot of our tools seem to assume that "if it's the default, we don't need a way to ask for it explicitly", which makes it a lot harder to ever change the default and keep a coherent set of options. > So why not just expect people to modify their programs to use --no- > statistics for cases like this? That's certainly an option, but it's > going to break a lot of existing things, and create branching code: I suggest that we wait a bit to see what additional feedback we get early in beta. > Also, anything trained to parse pg_dump output will have to learn > about the new SELECT pg_restore_ calls with their multi-line formats > (not 100% sure we don't have that anywhere, as things like "SELECT > setval" and "SELECT set_config" are single line, but there may be > existing things) That's an interesting point. What tools are currrently trying to parse pg_dump output? Regards, Jeff Davis