Skip to content

Conversation

@7ttp
Copy link
Contributor

@7ttp 7ttp commented Dec 3, 2025

What kind of change does this PR introduce?

Bug fix for backwards compatibility with existing config volumes after CLI upgrade.

What is the current behavior?

After upgrading to CLI v2.65.2 (which uses postgres image 17.6.1.058), supabase start fails with:

could not open configuration directory "/etc/postgresql-custom/conf.d": No such file or directory FATAL: configuration file "/etc/postgresql/postgresql.conf" contains error

What is the new behavior?

The CLI now creates the conf.d directory before starting postgres, ensuring backwards compatibility with existing volumes.

Root cause

The new postgres image includes include_dir = '/etc/postgresql-custom/conf.d' in postgresql.conf. When an existing config volume (from older CLI versions) is mounted, Docker does not copy image contents to the volume, so the conf.d directory is missing.

Fix

Added mkdir -p /etc/postgresql-custom/conf.d to the entrypoint script before postgres starts. This is idempotent and safe for both new and existing volumes.

Closes #4571

The new postgres image (17.6.1.058) includes an include_dir directive
in postgresql.conf that requires /etc/postgresql-custom/conf.d to exist.

When upgrading from older CLI versions, existing config volumes do not
contain this directory. Docker does not copy image contents when mounting
a volume that already has data, causing postgres to fail with:

  could not open configuration directory /etc/postgresql-custom/conf.d

This fix adds mkdir -p to create the directory before postgres starts,
ensuring backwards compatibility with existing volumes.

Closes supabase/supabase#41012
@7ttp 7ttp requested a review from a team as a code owner December 3, 2025 09:52
@coveralls
Copy link

Pull Request Test Coverage Report for Build 19889610058

Details

  • 1 of 2 (50.0%) changed or added relevant lines in 1 file are covered.
  • 5 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.03%) to 56.158%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/db/start/start.go 1 2 50.0%
Files with Coverage Reduction New Missed Lines %
internal/gen/keys/keys.go 5 12.9%
Totals Coverage Status
Change from base Build 19887353385: -0.03%
Covered Lines: 6817
Relevant Lines: 12139

💛 - Coveralls

@7ttp
Copy link
Contributor Author

7ttp commented Dec 3, 2025

@sweatybridge Please review, when available!

@sweatybridge
Copy link
Contributor

closing for a different fix

@7ttp 7ttp deleted the patch99 branch December 4, 2025 06:47
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.

supabase start fails after CLI upgrade - missing /etc/postgresql-custom/conf.d directory

3 participants