Re: BUG #18377: Assert false in "partdesc->nparts >= pinfo->nparts", fileName="execPartition.c", lineNumber=1943 - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: BUG #18377: Assert false in "partdesc->nparts >= pinfo->nparts", fileName="execPartition.c", lineNumber=1943
Date
Msg-id 202406271800.zp735zjeik3t@alvherre.pgsql
Whole thread Raw
In response to Re: BUG #18377: Assert false in "partdesc->nparts >= pinfo->nparts", fileName="execPartition.c", lineNumber=1943  (Tender Wang <tndrwang@gmail.com>)
List pgsql-bugs
On 2024-Apr-23, Tender Wang wrote:

> I found one self-contradiction comments in CreatePartitionPruneState():
> 
> /* For data reading, executor always omits detached partitions */
> if (estate->es_partition_directory == NULL)
> estate->es_partition_directory =
>  CreatePartitionDirectory(estate->es_query_cxt, false);
> 
> Should it be " not omits" if I didn't  misunderstand. Because we pass false
> to the function.

I pushed the fix now, and threw in a correction for another bogus
comment I introduced while developing the bugfix.  Thanks!

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
"Learn about compilers. Then everything looks like either a compiler or
a database, and now you have two problems but one of them is fun."
            https://twitter.com/thingskatedid/status/1456027786158776329



pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: BUG #18500: Detaching a partition with an index manually attached to the parent's index triggers Assert
Next
From: Alvaro Herrera
Date:
Subject: Re: BUG #18500: Detaching a partition with an index manually attached to the parent's index triggers Assert