Subject: small erreport bug over partitioned table pgrowlocks module

From: jian he <[email-masked]>
Date: Tue, 31 Oct 2023 08:00:00 +0800

hi.
erreport bug over partitioned table in pgrowlocks.

BEGIN;
CREATE TABLE fk_parted_pk (a int PRIMARY KEY) PARTITION BY LIST (a);
SELECT * FROM pgrowlocks('fk_parted_pk');
ERROR:  only heap AM is supported

error should be the following part:
if (rel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE)
ereport(ERROR,
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
errmsg("\"%s\" is a partitioned table",
RelationGetRelationName(rel)),
errdetail("Partitioned tables do not contain rows.")));