Re: Postgres 15 SELECT query doesn't use index under RLS - Mailing list pgsql-performance

From Tom Lane
Subject Re: Postgres 15 SELECT query doesn't use index under RLS
Date
Msg-id 3153246.1697661350@sss.pgh.pa.us
Whole thread Raw
In response to Re: Postgres 15 SELECT query doesn't use index under RLS  (Alexander Okulovich <aokulovich@stiltsoft.com>)
Responses Re: Postgres 15 SELECT query doesn't use index under RLS  (Alexander Okulovich <aokulovich@stiltsoft.com>)
List pgsql-performance
Alexander Okulovich <aokulovich@stiltsoft.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



pgsql-performance by date:

Previous
From: Alexander Okulovich
Date:
Subject: Re: Postgres 15 SELECT query doesn't use index under RLS
Next
From: Tomek
Date:
Subject: Re: Postgres 15 SELECT query doesn't use index under RLS