rjuju / pg_shared_plans

Shared cache plans for PostgreSQL
Other
14 stars 2 forks source link

PG16: invalidation problem #6

Open marco44 opened 6 months ago

marco44 commented 6 months ago

With PG16, after a reindex concurrently, I get

2024-04-22 16:59:09.876 CEST [2537007] owncloud@nextcloud ERROR:  could not open relation with OID 2316174
2024-04-22 16:59:09.876 CEST [2537007] owncloud@nextcloud STATEMENT:  SELECT * FROM "oc_authtoken" WHERE ("token" = $1) AND ("version" = $2)
rjuju commented 6 months ago

Thanks for the report!

I didn't have a lot of time to look at it (and I haven't touch this project for a long time so my memories are a bit fuzzy unfortunately), but as far as I can see I don't have any code related to REINDEX CONCURRENTLY (or CREATE INDEX CONCURRENTLY, which arguably would also need to discard a shared plan).

I will take care of it as soon as possible.

rjuju commented 1 month ago

I just fixed it in 4cd59f71f9c117c23d47603fbf4b18e90409ad0d (and also added support for pg17 while at it).

Sorry for the time to fix it, things have unfortunately been quite busy :(

marco44 commented 1 month ago

doesn't seem to accept reindex database:

nextcloud=# reindex database nextcloud ;
ERROR:  pg_shared_plans bug, unexpected reindex kind 4

Reindex table and reindex index seem ok though I'll see if this crashes in the next few days