1
0
mirror of https://github.com/postgres/postgres.git synced 2026-10-23 13:29:09 +03:00

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
This commit is contained in:
Etsuro Fujita
2026-09-26 20:40:00 +09:00
parent 7d47e41238
commit f25c50fd8f

View File

@@ -5954,7 +5954,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;