Live data from Hacker News

Dbdev – A database package manager for PostgreSQL trusted language extensions

database.dev

1–10 of 57 posts

Re: Dbdev – A database package manager for PostgreSQL trusted language extensions

#4

How does `index_advisor` work?

index_advisor is a project that almost made the cut for LW7. We decided to launch it as a pgtle instead to get some feedback before we (spoiler) probably release it in LW8

It uses the hypopg package to very quickly generate an index for each column referenced in the query and then re-run's an explain plan to measure the estimated "total cost".

If the expected "total_cost" reduces, we add the indexes to the list of recommendations and continue testing the remaining columns.

Its currently limited to single column indexes only but in a later update we'll enhance that to do more comprehensive searches with multiple columns in a single index

Re: Dbdev – A database package manager for PostgreSQL trusted language extensions

#7
From https://supabase.com/blog/dbdev

> dbdev fills the same role for PostgreSQL as npm for JavaScript, pip for Python and cargo for Rust in that it enables publishing libraries and applications for repeatable deployment. We'll be releasing the tooling necessary for third-parties to publish pglets to the registry once we’ve collected some community feedback and incorporate any great new ideas. Our goal is to create an open ecosystem for packaging and discovering SQL.

How does https://pgxn.org/ fit in this ecosystem?

Re: Dbdev – A database package manager for PostgreSQL trusted language extensions

#9

Can I use this on AWS RDS?

No. RDS has a strict list of approved extensions. (Since AWS is on the hook for the system stability, security, replication, etc.)

RDS for Postgres 14+ does come with pg_tle, but it does not come with pgsql-http, so you cannot use the dbdev installer. But, you can still install TLEs, you just have to do so "by hand" by calling `pgtle.install_extension()` yourself, probably from a migration script depending on your tooling.

See the RDS docs here: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Postg...

Re: Dbdev – A database package manager for PostgreSQL trusted language extensions

#10
What's stopping me from adding an extension to this repository that adds something valuable while simultaneously exfiltrating entire databases back to me?

It's a cool idea, but I won't be the first to try it. You're placing an awful lot of trust in these modules.

Post reply on HN