Re: small erreport bug over partitioned table pgrowlocks module

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: small erreport bug over partitioned table pgrowlocks module
Date: 2023-10-31 00:18:17
Message-ID: CAApHDvovZ--CaRs6zHqaKsuoGyXTwg-wVswGxFdBTQb_O=Xj8A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 31 Oct 2023 at 13:00, jian he <jian(dot)universality(at)gmail(dot)com> wrote:
> 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.")));

Yeah. Seems that 4b8266415 didn't look closely enough at the other
error messages and mistakenly put the relam check first instead of
last.

Here's a patch that puts the relam check last.

David

Attachment Content-Type Size
fix_pgrowlocks.patch text/plain 1.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2023-10-31 00:40:08 Re: Requiring recovery.signal or standby.signal when recovering with a backup_label
Previous Message jian he 2023-10-31 00:00:00 small erreport bug over partitioned table pgrowlocks module