Re: pgsql: Improve nbtree skip scan primitive scan scheduling.

From: Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Improve nbtree skip scan primitive scan scheduling.
Date: 2025-04-30 20:10:55
Message-ID: CAHgHdKsn2W=gPBmj7p6MjQFvxB+zZDBkwTSg0o3f5Hh8rkRrsA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Mon, Apr 28, 2025 at 9:12 AM Peter Geoghegan <pg(at)bowt(dot)ie> wrote:

> On Sun, Apr 27, 2025 at 1:06 PM Mark Dilger
> <mark(dot)dilger(at)enterprisedb(dot)com> wrote:
> > I can confirm that your patch fixes the problem, having spent some four
> hours trying to find other test cases which still fail, finding none.
>
> Great.
>
> I pushed essentially the same patch to HEAD just now.
>

A similar assertion can still be reached on HEAD using the attached (rather
contrived) regression test as of f60420cff66a9089a9b431f9c07f4a29aae4990a:

TRAP: failed Assert("sktrig_required"), File: "nbtutils.c", Line: 1861,
PID: 93648
0 postgres 0x0000000100d1b0e0
ExceptionalCondition + 108
1 postgres 0x00000001008b7658
_bt_advance_array_keys + 3828
2 postgres 0x00000001008b5dc0
_bt_check_compare + 372
3 postgres 0x00000001008b58ac _bt_checkkeys +
200
4 postgres 0x00000001008b1400 _bt_readpage +
764
5 postgres 0x00000001008b0454 _bt_readnextpage
+ 1260
6 postgres 0x00000001008b0ab0 _bt_next + 76
7 postgres 0x00000001008ac644 btgettuple + 136
8 postgres 0x000000010089dcdc
index_getnext_tid + 68
9 postgres 0x0000000100a297a0 IndexOnlyNext +
228
10 postgres 0x0000000100a0db2c ExecScan + 228
11 postgres 0x0000000100a39088 ExecSort + 536
12 postgres 0x0000000100a03c68
standard_ExecutorRun + 312
13 postgres 0x0000000100be5fb8 PortalRunSelect
+ 236
14 postgres 0x0000000100be5bd4 PortalRun + 492
15 postgres 0x0000000100be4b18
exec_simple_query + 1292
16 postgres 0x0000000100be1d1c PostgresMain +
1388
17 postgres 0x0000000100bdd9a8
BackendInitialize + 0
18 postgres 0x0000000100b36dd8
postmaster_child_launch + 372
19 postgres 0x0000000100b3b03c ServerLoop + 4948
20 postgres 0x0000000100b39360
InitProcessGlobals + 0
21 postgres 0x0000000100a58c00 help + 0
22 dyld 0x000000018eb17154 start + 2476


Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Attachment Content-Type Size
_skipscan.sql application/octet-stream 7.7 KB

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2025-04-30 20:17:43 Re: pgsql: Add function to get memory context stats for processes
Previous Message Nathan Bossart 2025-04-30 19:46:07 pgsql: doc: Add missing reference to track_cost_delay_timing.