Thread

Commits

  1. Adjust the order of the prechecks in pgrowlocks()

  1. small erreport bug over partitioned table pgrowlocks module

    jian he <jian.universality@gmail.com> — 2023-10-31T00:00:00Z

    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.")));
    
    
    
    
  2. Re: small erreport bug over partitioned table pgrowlocks module

    David Rowley <dgrowleyml@gmail.com> — 2023-10-31T00:18:17Z

    On Tue, 31 Oct 2023 at 13:00, jian he <jian.universality@gmail.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
    
  3. Re: small erreport bug over partitioned table pgrowlocks module

    David Rowley <dgrowleyml@gmail.com> — 2023-10-31T03:45:36Z

    On Tue, 31 Oct 2023 at 13:18, David Rowley <dgrowleyml@gmail.com> wrote:
    > Here's a patch that puts the relam check last.
    
    I've pushed that patch.
    
    David