Skip to content

PGDATA forced to default location #1612

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

Closed
2 tasks done
chevdor opened this issue May 27, 2025 · 1 comment
Closed
2 tasks done

PGDATA forced to default location #1612

chevdor opened this issue May 27, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@chevdor
Copy link

chevdor commented May 27, 2025

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

The image forces PGDATA to be the default location: /var/lib/postgresql/data and fail it is overriden.
If the user defines PGDATA to another location, it is ignored and the container will fail starting.

Here is an output with PGDATA=/var/lib/postgresql/data/pgdata (NOTE the extra non standard /pgdata at the end):

 2025-05-27 09:00:49.140 UTC [1] FATAL:  "/var/lib/postgresql/data" is not a valid data directory

To Reproduce

You can test using docker and:

docker run --rm -it \
    -e PGDATA=/data \
    -e POSTGRES_PASSWORD=password \
     supabase/postgres:17.4.1.036 

It will fail mentioning:

 2025-05-27 09:25:05.745 UTC [49] FATAL:  data directory "/var/lib/postgresql/data" does not exist

which should not be relevant since we want to use /data.

Expected behavior

The user can point to a custom PGDATA and the container starts.
Using the original postgres image works fine:

docker run --rm -it \
    -e PGDATA=/data \
    -e POSTGRES_PASSWORD=password \
     postgres:latest

System information

  • version: supabase-postgres:17.4.1.036
    but the issue is not specific to this version.
@chevdor chevdor added the bug Something isn't working label May 27, 2025
@chevdor
Copy link
Author

chevdor commented May 27, 2025

Sorry for the DUP.
See #1611

@chevdor chevdor closed this as completed May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant