Re: Postgres 15 SELECT query doesn't use index under RLS

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alexander Okulovich <aokulovich(at)stiltsoft(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Postgres 15 SELECT query doesn't use index under RLS
Date: 2023-10-18 20:35:50
Message-ID: 3153246.1697661350@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Alexander Okulovich <aokulovich(at)stiltsoft(dot)com> writes:
> We used the product with the default settings. The requests are simple.
> We didn't change the hardware (actually, we use even more performant
> hardware because of that issue) and DDL. I've checked the request on old
> and new databases. Requests that rely on this index execute more than 10
> times longer. Planner indeed used Index Scan before, but now it doesn't.

> So, from my perspective, the only reason we experience that is database
> logic change.

[ shrug... ] Maybe, but it's still not clear if it's a bug, or an
intentional change, or just a cost estimate that was on the hairy
edge before and your luck ran out.

If you could provide a self-contained test case that performs 10x worse
under v15 than v12, we'd surely take a look at it. But with the
information you've given so far, little is possible beyond speculation.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tomek 2023-10-19 07:43:44 Re: Postgres 15 SELECT query doesn't use index under RLS
Previous Message Alexander Okulovich 2023-10-18 14:07:38 Re: Postgres 15 SELECT query doesn't use index under RLS