postgres.git / summary / log / commit / refs
commit a630000c59c5ffbee6a48c918f29e3d3f0a3ce24
Author: Etsuro Fujita <efujita@postgresql.org>
Date: Sat Sep 26 11:40:01 2026 +0000
First released in: 19.0
postgres_fdw: Improve comment in fetch_remote_statistics().
Mention that the relpages value fetched from a remote server is stored
as-is, regardless of any difference between the remote and local block
sizes.
Follow-up to commit 6a8571568.
Reported-by: Fujii Masao <masao.fujii@gmail.com>
Reported-by: Osama Abdul Qader <osamaabdulqader.cs@gmail.com>
Author: Etsuro Fujita <etsuro.fujita@gmail.com>
Discussion: https://postgr.es/m/CAPmGK14OBMkMEkanHdA9%2BJdrZLGzfNRcEVmb6K4DtDe_CTTTqw%40mail.gmail.com
Backpatch-through: 19
contrib/postgres_fdw/postgres_fdw.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c
index 8043792cb28..7796a4144a5 100644
--- a/contrib/postgres_fdw/postgres_fdw.c
+++ b/contrib/postgres_fdw/postgres_fdw.c
@@ -5723,7 +5723,10 @@ fetch_remote_statistics(Relation relation,
/*
* If the remote table is partitioned, import relpages = 0, to match the
- * sampling case.
+ * sampling path. Otherwise, import the relpages value as-is, regardless
+ * of any difference between the remote and local block sizes. Note that
+ * this is fine because it's only used for costing remote operations on
+ * the foreign table.
*/
if (relkind == RELKIND_PARTITIONED_TABLE)
remstats->relpages = 0;
[parent: 18c04668f781]