Thread: pgsql: Prevent assertion failure in contrib/pg_freespacemap.

pgsql: Prevent assertion failure in contrib/pg_freespacemap.

From
Tom Lane
Date:
Prevent assertion failure in contrib/pg_freespacemap.

Applying pg_freespacemap() to a relation lacking storage (such as a
view) caused an assertion failure, although there was no ill effect
in non-assert builds.  Add an error check for that case.

Bug: #18866
Reported-by: Robins Tharakan <tharakan@gmail.com>
Author: Tender Wang <tndrwang@gmail.com>
Reviewed-by: Euler Taveira <euler@eulerto.com>
Discussion: https://postgr.es/m/18866-d68926d0f1c72d44@postgresql.org
Backpatch-through: 13

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4623d71443de40781135a7040079ab4538974a6f

Modified Files
--------------
contrib/pg_freespacemap/pg_freespacemap.c | 8 ++++++++
1 file changed, 8 insertions(+)