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 1uIBi6-00HOgr-PR for pgsql-hackers@arkaria.postgresql.org; Thu, 22 May 2025 19:36:10 +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 1uIBi4-007Wly-QY for pgsql-hackers@arkaria.postgresql.org; Thu, 22 May 2025 19:36:08 +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 1uIBi4-007Wlq-H6 for pgsql-hackers@lists.postgresql.org; Thu, 22 May 2025 19:36:08 +0000 Received: from mail-io1-xd30.google.com ([2607:f8b0:4864:20::d30]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uIBi2-000MQt-0s for pgsql-hackers@lists.postgresql.org; Thu, 22 May 2025 19:36:07 +0000 Received: by mail-io1-xd30.google.com with SMTP id ca18e2360f4ac-8613f456960so250351039f.1 for ; Thu, 22 May 2025 12:36:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747942566; x=1748547366; darn=lists.postgresql.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=v68WZ1KrxTR2nK0556JHucrGayBVgpVJ7ktXdk/4MkI=; b=mAvD9s1Hk+OtI2iTH9HVLcvG7u2CDtA7xt27QvIgZoVh9WLIMQoFj9gvxSyWDyli0y NRsGsa4dxM25SolSq1t9/3t59Q3kh3cPwqHPOIZ/govoaLxUyx8w/bsNgGL+YWjmxtue INPLqMqb8I4KmZ3uD7t1RPoTO7VsK4ULeEN1pJJkIt/SZsTJa5oiLGQGFlbE4PUXnra6 AOsQnqVh24eDEq0YUBrvUz6zP2cHCuSbgzj4wdDAioBLpRqj2XApxXQ0Zws701DTkr1g EW/hTTT4q5dnoTDkqj7H6L/EHdTjVQjD0/aXGjuhR43ThnW3uZZBq4MkCpxcUwpNl4Hi 9smw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747942566; x=1748547366; h=in-reply-to:content-transfer-encoding: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=v68WZ1KrxTR2nK0556JHucrGayBVgpVJ7ktXdk/4MkI=; b=hz7iQBjwgYIQg3PW9PFVT38ciPNhPYG9eIDZ64XfSNpKnECeZaCOafdbekrVe34bvK RMlH8zbgsJYJdxXZlfW3uDjNtWMsFfAoMKSHI87iz3CZn/GOz2mOb50WGeoJDyEqqCRS SJhQkAfVGi1MIJ/jtCtVnZs+I6ArG75NUs/5n317EYtW5u3fd1JF6HClGN7fvuKb29pt 61c7V+Gkpnqqccdx7EQnugBGYqWiuHWQEQADTw/KoHLDy2DxTxoQsgZWPzfpvrIgV86F rvUH+okLcmQqgFAU1tl7yxJDak3qMmKjDc7jlnFuZyCAYbLUNv2QR2Lh/LaG2ITCCaGI TOQQ== X-Forwarded-Encrypted: i=1; AJvYcCUleyZt8+mcsdS9D5/0oZEmNLzELP0h8w57xyAsVXXVbZrnW9WRFTnBH0gNku8WGvVYFlqe51OtMqWKL5bi@lists.postgresql.org X-Gm-Message-State: AOJu0Yxc5gITTtw9jQr3AyPGbX0+UMozcVbXxFs4GUPcmynOCoeSRyxq ELgh/5g77j2ZCp493UQnt9/bVzlGYuLMsgLJGXQyf1xbEZMvBlvF8Cvy X-Gm-Gg: ASbGncvIct4OL6Sc2oW2+xVMzDf7qU6lnyZ2u/i5VMfIW+pyYCp/D1mdILPmHeEH+VB oUjpNWMLQyRu63fHgrCN3uVm4DjQ8/4E/eWdDqNRnRcYDE9MBVYp8ST2gsnXmA9rehaLP02xb+r OOUYVApZOurDkdorvbQ6wA6k9UzAhY1oi8I1EvcoNZlIQjR2aqBkWElvoAGUtsiZkorY030+Cuz 8sFe2xNq1DZvZiYwDMrhdz/NokJNEfItKeL37OoPkApTkQRRdM5VwrVdliMXIqwJ3t7MQyd0Kqg QU3QdYlNWFbvbRJOS3OApSzD76vZjakVjTwWBtNqrNI5o27NC7VYiYbQNl5IKD+waHbk/qiclf1 9u8F2xgpUjqRh9qxPeFDsMdVwFdTYSvz0Iyog4CFW2TVD8cE= X-Google-Smtp-Source: AGHT+IH8guD1jgKZfwceeLzkQbAiqinFPKUFVxcFqVtqe9jQPAW4loctl6QWDTTiZgr+X6hNYWHCnw== X-Received: by 2002:a05:6e02:17c7:b0:3dc:8273:8c81 with SMTP id e9e14a558f8ab-3dc933f989dmr4590375ab.22.1747942565640; Thu, 22 May 2025 12:36:05 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4fbcc3b19aasm3304221173.52.2025.05.22.12.36.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 May 2025 12:36:05 -0700 (PDT) Date: Thu, 22 May 2025 14:36:03 -0500 From: Nathan Bossart To: Greg Sabino Mullane Cc: Jeff Davis , Robert Haas , Ashutosh Bapat , Corey Huinker , Andres Freund , Tom Lane , Michael Paquier , Bruce Momjian , Matthias van de Meent , Magnus Hagander , Stephen Frost , Peter Smith , PostgreSQL Hackers , alvherre@alvh.no-ip.org, jian he Subject: Re: Statistics Import and Export Message-ID: References: <78dd61cf971436c22c8e7522a4868492b09d1194.camel@j-davis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, May 22, 2025 at 03:29:38PM -0400, Greg Sabino Mullane wrote: > On Thu, May 22, 2025 at 2:52 PM Jeff Davis wrote: >> * The default for pg_restore is --no-statistics. That could cause a minor >> surprise if the user specifies --with-statistics for pg_dump and >> not for pg_restore. An argument could be made that "if the stats are >> there, restore them", and I don't have a strong opinion about this point, >> but defaulting to --no-statistics seems more consistent with pg_dump. > > Hm...somewhat to my own surprise, I don't like this. If it's in the dump, > restore it. +1, I think defaulting to restoring everything in the dump file is much less surprising than the alternative. -- nathan