Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p5rNv-0001Se-Gh for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Dec 2022 16:47:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p5rNt-0007rW-Gn for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Dec 2022 16:47:01 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p5rNt-0007rN-7l for pgsql-hackers@lists.postgresql.org; Thu, 15 Dec 2022 16:47:01 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p5rNr-0002ZL-4A for pgsql-hackers@lists.postgresql.org; Thu, 15 Dec 2022 16:47:00 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 2BFGkunw3377009; Thu, 15 Dec 2022 11:46:56 -0500 From: Tom Lane To: James Finnerty cc: pgsql-hackers@lists.postgresql.org, Tomas Vondra Subject: Re: postgres_fdw: using TABLESAMPLE to collect remote sample In-reply-to: <167112207543.1120.12195641719862911275.pgcf@coridan.postgresql.org> References: <151e835f-55d6-ddbc-b5b4-07ee606aba44@enterprisedb.com> <03182011-10a4-97b4-7c70-d99aa1c11eed@enterprisedb.com> <167112207543.1120.12195641719862911275.pgcf@coridan.postgresql.org> Comments: In-reply-to James Finnerty message dated "Thu, 15 Dec 2022 16:34:35 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3377007.1671122816.1@sss.pgh.pa.us> Date: Thu, 15 Dec 2022 11:46:56 -0500 Message-ID: <3377008.1671122816@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk James Finnerty writes: > This patch looks good to me. I have two very minor nits: The inflation > of the sample size by 10% is arbitrary but it doesn't seem unreasonable > or concerning. It just makes me curious if there are any known cases > that motivated adding this logic. I wondered why, too. > Secondly, if the earliest non-deprecated version of PostgreSQL supports > sampling, then you could optionally remove the logic that tests for > that. The affected lines should be unreachable. We've tried to keep postgres_fdw compatible with quite ancient remote servers (I think the manual claims back to 8.3, though it's unlikely anyone's tested that far back lately). This patch should not move those goalposts, especially if it's easy not to. regards, tom lane