Re: missing indexes in indexlist with partitioned tables

From: Arne Roland <A(dot)Roland(at)index(dot)de>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: David Rowley <dgrowleyml(at)gmail(dot)com>, Amit Langote <amitlangote09(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Zhihong Yu <zyu(at)yugabyte(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Julien Rouhaud <rjuju123(at)gmail(dot)com>
Subject: Re: missing indexes in indexlist with partitioned tables
Date: 2022-12-06 00:43:30
Message-ID: 07eacfbceec74ee6b48e3ce14bc7f274@index.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thank you!

Sadly I didn't manage how to reproduce that locally. check-world doesn't seem to fail at my end.

That being said, attached patch should fix the issue reported below.

I'll have another look at the log later this week.

Regards

Arne

________________________________
From: Andres Freund <andres(at)anarazel(dot)de>
Sent: Tuesday, November 22, 2022 2:36:59 AM
To: Arne Roland
Cc: David Rowley; Amit Langote; pgsql-hackers; Zhihong Yu; Alvaro Herrera; Julien Rouhaud
Subject: Re: missing indexes in indexlist with partitioned tables

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
Cirrus CI<https://cirrus-ci.com/github/postgresql-cfbot/postgresql/commitfest/40/3452>
cirrus-ci.com
Cirrus CI makes your development cycle fast, efficient, and secure by leveraging modern cloud technologies.

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

#2 0x00005645dff192f6 in ExceptionalCondition (conditionName=conditionName(at)entry=0x5645e014b167 "false", fileName=fileName(at)entry=0x5645e0196b08 "../src/backend/storage/buffer/bufmgr.c", lineNumber=lineNumber(at)entry=2971) at ../src/backend/utils/error/assert.c:66
No locals.
#3 0x00005645dfc13823 in RelationGetNumberOfBlocksInFork (relation=relation(at)entry=0x7fb54d54e470, forkNum=forkNum(at)entry=MAIN_FORKNUM) at ../src/backend/storage/buffer/bufmgr.c:2971
No locals.
#4 0x00005645dfa9ac5e in get_relation_info (root=root(at)entry=0x5645e1ed9840, relationObjectId=16660, inhparent=<optimized out>, rel=rel(at)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(at)entry=0x0) at ../src/backend/optimizer/util/relnode.c:293
rel = 0x5645e2086b38
rte = 0x5645e1ed8fc8
__func__ = "build_simple_rel"
...

Greetings,

Andres Freund

Attachment Content-Type Size
v10-0001-indexlist.patch text/x-patch 24.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2022-12-06 00:44:01 Re: Transaction timeout
Previous Message Alexander Korotkov 2022-12-06 00:31:04 Re: [PATCH] Check snapshot argument of index_beginscan and family