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

Add support for PostgreSQL backend #55

Closed
wants to merge 2 commits into from
Closed

Conversation

jmole
Copy link

@jmole jmole commented Jan 13, 2024

linuxserver.io


  • I have read the contributing guideline and understand that I have made the correct modifications

Description:

This PR adds support for the PostgreSQL backend to the minetest server build.

Benefits of this PR and context:

PostgreSQL is a more performant database backend for minetest servers. The default database backend is sqlite3, which can bottleneck your server under high client load.

To use the PostgreSQL backend, you must modify world.mt. This will be created in the worlds/world directory by default when the container is started.

A sample configuration might be as follows:

# Commented out defaults
# mod_storage_backend = sqlite3
# auth_backend = sqlite3
# player_backend = sqlite3
# backend = sqlite3
mod_storage_backend = postgresql
auth_backend = postgresql
player_backend = postgresql
backend = postgresql
pgsql_connection =             host=your-db-hostname port=5432 user=postgres password=hunter2 dbname=minetest
pgsql_player_connection =      host=your-db-hostname port=5432 user=postgres password=hunter2 dbname=minetest
pgsql_auth_connection =        host=your-db-hostname port=5432 user=postgres password=hunter2 dbname=minetest
pgsql_mod_storage_connection = host=your-db-hostname port=5432 user=postgres password=hunter2 dbname=minetest

In this example, you would be running a PostgreSQL server at "your-db-hostname", with admin user/password postgres/hunter2. The database "minetest" doesn't have to exist, provided that the user "postgres" has sufficient rights to create a database.

How Has This Been Tested?

Image has been tested on x86_64 Ubuntu 22.04, and PostgreSQL support has been verified both in the build logs, and in the final server binary.

Source / References:

https://wiki.minetest.net/Database_backends#PostgreSQL

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening this pull request! Be sure to follow the pull request template!

@LinuxServer-CI
Copy link
Contributor

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/minetest/5.8.0-pkg-3c317f08-dev-3185dfdf749ee229dc9a7e0b4e1eb9e228fa511f-pr-55/index.html
https://ci-tests.linuxserver.io/lspipepr/minetest/5.8.0-pkg-3c317f08-dev-3185dfdf749ee229dc9a7e0b4e1eb9e228fa511f-pr-55/shellcheck-result.xml

Tag Passed
amd64-5.8.0-pkg-3c317f08-dev-3185dfdf749ee229dc9a7e0b4e1eb9e228fa511f-pr-55
arm64v8-5.8.0-pkg-3c317f08-dev-3185dfdf749ee229dc9a7e0b4e1eb9e228fa511f-pr-55

@LinuxServer-CI
Copy link
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

Copy link

This pull request is locked due to inactivity

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants