Re:Pg_later: Asynchronous Queries for Postgres
by zekenie on Friday August 18, 2023 @08:48AM
(#37174923)
Interesting! I’ve used materialized reviews for this in the past. I’m curious what the advantages to pg_later are over that.
[ Parent
| on HN ]
Re:Pg_later: Asynchronous Queries for Postgres
by chuckhend on Friday August 18, 2023 @09:27AM
(#37175314)
I don't think you'd replace a materialized view with pg_later, but it might help you populate or update your materialized view if you are trying to do that asynchronously. pglater.exec() works with DDL too!
I use it a lot for long running queries when doing data science and machine learning work, and a lot of times when executing queries from a jupyter notebook or CLI. That way if my jupyter kernel dies, my query execution continues even if the network or my environment has an issue. I've started using it a bit more with https://github.com/postgresml/postgresml for model training tasks too, since those can be quite long running depending on the situation.
Re:Pg_later: Asynchronous Queries for Postgres
by magden on Friday August 18, 2023 @12:39PM
(#37178217)
It should be helpful for maintenance and DDL tasks. Such as I need to build a secondary index over a large table and do something once the index is ready. Start the index creation with pg_later, check the status later and do what you need to do next. Probably, they can support triggers so that once a task is completed I can be notified.
Re:Pg_later: Asynchronous Queries for Postgres
by samaysharma on Friday August 18, 2023 @03:31PM
(#37180911)
We are planning to add support for "Push notifications for completed and failed jobs". That's in our roadmap listed here: https://tembo.io/blog/introducing-pg-later/#up-next