pgsql: Prevent assertion failure in contrib/pg_freespacemap.

Started by Tom Laneabout 1 year ago1 messagescomitters
Jump to latest
#1Tom Lane
tgl@sss.pgh.pa.us

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: /messages/by-id/18866-d68926d0f1c72d44@postgresql.org
Backpatch-through: 13

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/db8238da4265a1e381c0b5499cac2518580bb463

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