readyset icon indicating copy to clipboard operation
readyset copied to clipboard

Support create cache from postgres queryid

Open lukoktonos opened this issue 2 years ago • 5 comments

Description

pg_stat_statements has a queryid field and a query field, we could support

CREATE CACHE FROM PGQUERY <queryid> and do a lookup into that to find the SELECT statement--this may be an ergonomic way of creating caches for postgres.

image.png

Change in user-visible behavior yes

Requires documentation change

yes

lukoktonos avatar Nov 07 '23 01:11 lukoktonos

seems like it should be pretty easy and high ROI

lukoktonos avatar Nov 07 '23 01:11 lukoktonos

Hi @lukoktonos I'd like to take this up, can you assign this to me?

neeleshbisht99 avatar Nov 08 '23 21:11 neeleshbisht99

@neeBis Absolutely! 🙌🏻

Note for this one: to query pg_stat_statements, the upstream database will have to have run CREATE EXTENSION pg_stat_statement at some point, or it will return an error. So part of the implementation here will be detecting that error and providing some context to the caller that they need to run that command first to use this feature.

lukoktonos avatar Nov 08 '23 22:11 lukoktonos

Currently in development.

gvsg-rs avatar Dec 08 '23 18:12 gvsg-rs

I reached out to @neeBis about the status of this and haven't heard back, so I'll move this back into the backlog for now.

lukoktonos avatar Jan 04 '24 14:01 lukoktonos