Re: missing indexes in indexlist with partitioned tables

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Arne Roland <A.Roland@index.de>
Cc: David Rowley <dgrowleyml@gmail.com>, Amit Langote <amitlangote09@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>, Zhihong Yu <zyu@yugabyte.com>, Alvaro Herrera <alvherre@alvh.no-ip.org>, Julien Rouhaud <rjuju123@gmail.com>
Date: 2022-11-22T01:36:59Z
Lists: pgsql-hackers
Hi,

On 2022-11-02 01:50:38 +0000, Arne Roland wrote:
> I mainly changed the comments, the Assert and some casing.

The tests have been failing for a while
https://cirrus-ci.com/github/postgresql-cfbot/postgresql/commitfest/40/3452

https://api.cirrus-ci.com/v1/task/6190372803051520/logs/cores.log

#2  0x00005645dff192f6 in ExceptionalCondition (conditionName=conditionName@entry=0x5645e014b167 "false", fileName=fileName@entry=0x5645e0196b08 "../src/backend/storage/buffer/bufmgr.c", lineNumber=lineNumber@entry=2971) at ../src/backend/utils/error/assert.c:66
No locals.
#3  0x00005645dfc13823 in RelationGetNumberOfBlocksInFork (relation=relation@entry=0x7fb54d54e470, forkNum=forkNum@entry=MAIN_FORKNUM) at ../src/backend/storage/buffer/bufmgr.c:2971
No locals.
#4  0x00005645dfa9ac5e in get_relation_info (root=root@entry=0x5645e1ed9840, relationObjectId=16660, inhparent=<optimized out>, rel=rel@entry=0x5645e2086b38) at ../src/backend/optimizer/util/plancat.c:442
        indexoid = <optimized out>
        info = 0x5645e2083b28
        i = <optimized out>
        indexRelation = 0x7fb54d54e470
        index = 0x7fb54d548c48
        amroutine = <optimized out>
        ncolumns = 1
        nkeycolumns = 1
        l__state = {l = <optimized out>, i = <optimized out>}
        indexoidlist = 0x5645e2088a98
        lmode = 1
        l = <optimized out>
        varno = 1
        relation = 0x7fb54d54e680
        hasindex = <optimized out>
        indexinfos = 0x0
        __func__ = "get_relation_info"
#5  0x00005645dfaa5e25 in build_simple_rel (root=0x5645e1ed9840, relid=1, parent=parent@entry=0x0) at ../src/backend/optimizer/util/relnode.c:293
        rel = 0x5645e2086b38
        rte = 0x5645e1ed8fc8
        __func__ = "build_simple_rel"
...

Greetings,

Andres Freund



Commits

  1. Allow left join removals and unique joins on partitioned tables

  2. Add index on pg_publication_rel.prpubid