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

Support PostgreSQL event-listener plugin #23281

Open
nqvuong1998 opened this issue Sep 4, 2024 · 8 comments
Open

Support PostgreSQL event-listener plugin #23281

nqvuong1998 opened this issue Sep 4, 2024 · 8 comments

Comments

@nqvuong1998
Copy link

PostgreSQL is widely used, but Trino only has MySQL and HTTP event listener plugins. It is essential to add support for PostgreSQL.

@nqvuong1998
Copy link
Author

cc @mosabua

@hashhar
Copy link
Member

hashhar commented Sep 4, 2024

IMO the MySQL, Kafka and HTTP event listeners should also live out-of-tree. the SPI is there and community can build and maintain various event listener implementations.

At this rate we'll have one for SQLServer, Oracle, Pulsar and maybe more.

@mosabua
Copy link
Member

mosabua commented Sep 6, 2024

If there is anyone willing to contribute a PostgreSQL event listener .. thats fair game. Feel free to send a PR @nqvuong1998 .. it might even be worth to look at a similar approach as we have for connectors with the BaseJdbcConnector to make implementation easier.

In terms of in the main repo or elsewhere as suggested by @hashhar .. for now we would want to go with in the main repo since we are not set up for release process and more with external separate repos and the same reasoning of getting plugins out would apply for connectors.

Note that we are trying to improve all that with smarter packaging as well - details in #22597

@harksin
Copy link
Contributor

harksin commented Sep 9, 2024

so there is a kafka event listener already ?
interesting to know where :)

@mosabua
Copy link
Member

mosabua commented Sep 9, 2024

i am just about to merge the docs pr .. has been in the last two releases

@mosabua
Copy link
Member

mosabua commented Sep 9, 2024

#23158

@posulliv
Copy link
Contributor

I wrote a simple one for MYSQL in the past - https://github.com/posulliv/trino-simple-db-logger

It uses flyway for creating the necessary table in MySQL so you could easily add the SQL for PostgreSQL if you wanted.

@mosabua
Copy link
Member

mosabua commented Sep 20, 2024

Note that the version from @posulliv is great since it uses flyway .. but is out of date with trino. So if someone starts new .. use the trino project mysql event listener as base and then maybe add the flyway stuff

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

No branches or pull requests

5 participants