readyset
readyset copied to clipboard
Support create cache from postgres queryid
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.
Change in user-visible behavior yes
Requires documentation change
yes
seems like it should be pretty easy and high ROI
Hi @lukoktonos I'd like to take this up, can you assign this to me?
@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.
Currently in development.
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.