Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Does this work on hosted providers? #205

Open
dwelch2344 opened this issue May 9, 2024 · 10 comments
Open

Question: Does this work on hosted providers? #205

dwelch2344 opened this issue May 9, 2024 · 10 comments

Comments

@dwelch2344
Copy link

I'm just discovering the awesomeness that is Tembo via this project, so forgive me if this is a stupid question.

Is this something that can run on top of any "standard" PG instance out there? ie AWS RDS, GCP CloudSQL, Heroku, etc.

@ChuckHend
Copy link
Contributor

ChuckHend commented May 9, 2024

If the cloud providers add it to their supported extensions, then there is no reason it cannot. I think it requires filing a support ticket to get a new extension added. The work discussed in #199 would make it a bit more portable (re-writing certain parts from Rust into pl/pgsql).

I would say it is generally very difficult to get new extension added to most Postgres providers out there. Its available now on our free/hobby tier at https://cloud.tembo.io/ though. You can install it via UI/API into any Tembo instance, or create the "MessageQueue Stack" and have it pre-installed.

@ConProgramming
Copy link

Could this run as Pl/rust for a trusted language extension? https://aws.amazon.com/blogs/database/build-high-performance-functions-in-rust-on-amazon-rds-for-postgresql/

@ChuckHend
Copy link
Contributor

@ConProgramming, I have not built with PL/Rust so I cannot say for sure. Partitioned queue's depend on pg_partman, which I am almost certain will not run as PL/Rust, however most cloud providers already provide that extension.

@dwelch2344
Copy link
Author

Oooo ive used a number of other pl/X langs before, but haven't yet dabbled in rust. Happy to take a stab at this. If anyone wants to collaborate, lmk

@ChuckHend
Copy link
Contributor

Oooo ive used a number of other pl/X langs before, but haven't yet dabbled in rust. Happy to take a stab at this. If anyone wants to collaborate, lmk

All the extension functions are now in pl/pgsql . The build/packaging system is still in Rust though. We will most likely be moving that over to pgxs soon.

@ConProgramming
Copy link

Oooo ive used a number of other pl/X langs before, but haven't yet dabbled in rust. Happy to take a stab at this. If anyone wants to collaborate, lmk

All the extension functions are now in pl/pgsql . The build/packaging system is still in Rust though. We will most likely be moving that over to pgxs soon.

Ah wasn't aware extensions functions are now in pl/pgsql, that means this should work on hosted providers without a problem yes? Just running the pl/pgsql on a server?

@ChuckHend
Copy link
Contributor

ChuckHend commented May 23, 2024

Ah wasn't aware extensions functions are now in pl/pgsql, that means this should work on hosted providers without a problem yes? Just running the pl/pgsql on a server?

I think you might currently be able to copy/paste the functions into any postgres that has pl/pgsql installed, but it will not show up to Postgres as an extension. For example, if you ran cargo pgrx schema today, that will give you all the function and object definitions, but create extension pgmq will not work unless a hosted provided installs the SQL files/control file onto the Postgres server.

@ConProgramming
Copy link

Ah wasn't aware extensions functions are now in pl/pgsql, that means this should work on hosted providers without a problem yes? Just running the pl/pgsql on a server?

I think you might currently be able to copy/paste the functions into any postgres that has pl/pgsql installed, but it will not show up to Postgres as an extension. For example, if you ran cargo pgrx schema today, that will give you all the function and object definitions, but create extension pgmq will not work unless a hosted provided installs the SQL files/control file onto the Postgres server.

I'm not well versed in postgres extensions - will it matter if its shows up as an extension? Will any functionality be impacted?

@ChuckHend
Copy link
Contributor

Will any functionality be impacted?

I'm not really sure how the functionality would be impacted since the way they are currently written, its assumed all the objects are members of the pgmq extension (but maybe that doesn't matter). You certainly would not be able to do thing like alter extension pgmq update to upgrade the version, or drop extension pgmq to remove all the objects from the database.

That being said, I would not recommend copy/pasting the code around for production use cases. The idea with packaging pgmq up as a TLE is so it could be installed anywhere that TLE is supported.

@ConProgramming
Copy link

ConProgramming commented May 24, 2024

Will any functionality be impacted?

I'm not really sure how the functionality would be impacted since the way they are currently written, its assumed all the objects are members of the pgmq extension (but maybe that doesn't matter). You certainly would not be able to do thing like alter extension pgmq update to upgrade the version, or drop extension pgmq to remove all the objects from the database.

That being said, I would not recommend copy/pasting the code around for production use cases. The idea with packaging pgmq up as a TLE is so it could be installed anywhere that TLE is supported.

It would be great to have as a TLE, for Aurora support and Supabase support!

What's the difficulty to implement that / what's blocking that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants