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

Update postgresql instructions for Postgresql 15 #343

Merged
merged 1 commit into from
Nov 6, 2023

Conversation

jarppiko
Copy link
Contributor

@jarppiko jarppiko commented Mar 8, 2023

Postgres 15 does not allow creation of tables in public (default) schema without super-user access rights. crowdsec has to be made the owner of the public schema first. See https://stackoverflow.com/questions/74110708/postgres-15-permission-denied-for-schema-public.

Public schemas are also in version 14 and 13, but the required access rights have been changed in 15.0.

Postgres 15 does not allow creation of tables in `public` (default)  schema without  super-user access rights. `crowdsec` has to be made the owner of the public schema first. See https://stackoverflow.com/questions/74110708/postgres-15-permission-denied-for-schema-public
@jarppiko
Copy link
Contributor Author

jarppiko commented Mar 8, 2023

@aws-amplify-eu-west-1
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-343.d1to60jd2gb6y6.amplifyapp.com

@LaurenceJJones
Copy link
Contributor

LaurenceJJones commented Mar 17, 2023

These instructions backwards compatible? for any pg < 15?

Also thank you! for opening a PR

@jarppiko
Copy link
Contributor Author

jarppiko commented Mar 17, 2023

@LaurenceJJones Apologies, I have not tested this with other than pg 15. The Postgresql docs say:

A user can also be allowed to create objects in someone else's schema. To allow that, the 
CREATE privilege on the schema needs to be granted. In databases upgraded from 
PostgreSQL 14 or earlier, everyone has that privilege on the schema public. 

But, stupid me. I did not check what Postgresql versions Crowdsec supports (PostgreSQL 10, 11 and 12)...

Therefore, maybe this PR should be put on hold until Crowdsec decides to officially support Postgresql versions higher than 12?

PS. I have been running Crowdsec with Postgresql 13 without problems . I am in progress setting up Crowdsec to run inside rootless container and thought using the latest Postgresql without checking the supported versions. I can report back my success rate, but I understand you guys want to run proper integration testing with the Postgresql newer versions before officially supporting those.

@mmetc
Copy link
Contributor

mmetc commented Nov 6, 2023

Thanks! The current version supports PG 15, with tests

@mmetc mmetc merged commit 5c58a5f into crowdsecurity:main Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants