Postgres 15.8.1.094 not working locally
Bug report
I upgraded my project to use 15.8.1.094 (latest version), but when I link my project locally, that version of postgres will not work.
- [X] 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
I run npx supabase start and get the error below. It will not start.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Link local project on Windows to 15.8.1.094. Try and sync it.
Expected behavior
It fails, no matter what I do. I have deleted all docker instances, reinstalled, and nothing works.
However, when I delete supabase/.temp/posgres-version, and reinstall, everything works.
It seems to be using 15.8.1.085 with no problems.
This means I cannot correctly link versions locally with the server.
System information
- OS: Windows
- Browser (if applies) [e.g. chrome, safari]
- Version of supabase-js: 2.49.8
- Version of Node.js: v22.15.0
- Supabase: 2.23.4
Additional context
Here is error:
PostgreSQL Database directory appears to contain a database; Skipping initialization
pg_ctl: another server might be running; trying to start server anyway
waiting for server to start.... 2025-06-01 16:47:09.297 UTC [36] LOG: pgaudit extension initialized
2025-06-01 16:47:09.303 UTC [36] LOG: pgsodium primary server secret key loaded
2025-06-01 16:47:09.308 UTC [36] LOG: vault primary server secret key loaded
2025-06-01 16:47:09.325 UTC [36] LOG: starting PostgreSQL 15.8 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 13.2.0, 64-bit
2025-06-01 16:47:09.330 UTC [36] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-06-01 16:47:09.338 UTC [45] LOG: database system shutdown was interrupted; last known up at 2025-06-01 16:36:13 UTC
2025-06-01 16:47:09.614 UTC [45] LOG: database system was not properly shut down; automatic recovery in progress
2025-06-01 16:47:09.617 UTC [45] LOG: redo starts at 0/1AFE898
2025-06-01 16:47:09.652 UTC [45] LOG: invalid record length at 0/24272A0: wanted 24, got 0
2025-06-01 16:47:09.652 UTC [45] LOG: redo done at 0/2427270 system usage: CPU: user: 0.02 s, system: 0.00 s, elapsed: 0.03 s
2025-06-01 16:47:09.669 UTC [43] LOG: checkpoint starting: end-of-recovery immediate wait
done
server started
psql: error: connection to server on socket "/run/postgresql/.s.PGSQL.5432" failed: FATAL: the database system is not accepting connections
DETAIL: Hot standby mode is disabled.
[local] 2025-06-01 16:47:09.689 UTC [47] supabase_admin@postgres FATAL: the database system is not accepting connections
[local] 2025-06-01 16:47:09.689 UTC [47] supabase_admin@postgres DETAIL: Hot standby mode is disabled.
PostgreSQL Database directory appears to contain a database; Skipping initialization
pg_ctl: another server might be running; trying to start server anyway
waiting for server to start... done
server started
psql: error: connection to server on socket "/run/postgresql/.s.PGSQL.5432" failed: Connection refused
Is the server running locally and accepting connections on that socket?
PostgreSQL Database directory appears to contain a database; Skipping initialization
pg_ctl: another server might be running; trying to start server anyway
waiting for server to start... done
server started
psql: error: connection to server on socket "/run/postgresql/.s.PGSQL.5432" failed: Connection refused
Is the server running locally and accepting connections on that socket?
PostgreSQL Database directory appears to contain a database; Skipping initialization
pg_ctl: another server might be running; trying to start server anyway
waiting for server to start... done
server started
psql: error: connection to server on socket "/run/postgresql/.s.PGSQL.5432" failed: Connection refused
Is the server running locally and accepting connections on that socket?
PostgreSQL Database directory appears to contain a database; Skipping initialization
pg_ctl: another server might be running; trying to start server anyway
waiting for server to start.... 2025-06-01 16:47:12.868 UTC [36] LOG: pgaudit extension initialized
2025-06-01 16:47:12.875 UTC [36] LOG: pgsodium primary server secret key loaded
2025-06-01 16:47:12.879 UTC [36] LOG: vault primary server secret key loaded
2025-06-01 16:47:12.895 UTC [36] LOG: starting PostgreSQL 15.8 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 13.2.0, 64-bit
2025-06-01 16:47:12.899 UTC [36] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-06-01 16:47:12.909 UTC [45] LOG: database system shutdown was interrupted; last known up at 2025-06-01 16:47:09 UTC
2025-06-01 16:47:13.182 UTC [45] LOG: database system was not properly shut down; automatic recovery in progress
2025-06-01 16:47:13.186 UTC [45] LOG: redo starts at 0/1AFE898
2025-06-01 16:47:13.222 UTC [45] LOG: invalid record length at 0/24272A0: wanted 24, got 0
2025-06-01 16:47:13.222 UTC [45] LOG: redo done at 0/2427270 system usage: CPU: user: 0.01 s, system: 0.01 s, elapsed: 0.03 s
2025-06-01 16:47:13.237 UTC [43] LOG: checkpoint starting: end-of-recovery immediate wait
done
server started
psql: error: connection to server on socket "/run/postgresql/.s.PGSQL.5432" failed: FATAL: the database system is not accepting connections
DETAIL: Hot standby mode is disabled.
[local] 2025-06-01 16:47:13.260 UTC [47] supabase_admin@postgres FATAL: the database system is not accepting connections
[local] 2025-06-01 16:47:13.260 UTC [47] supabase_admin@postgres DETAIL: Hot standby mode is disabled.
PostgreSQL Database directory appears to contain a database; Skipping initialization
pg_ctl: another server might be running; trying to start server anyway
waiting for server to start.... 2025-06-01 16:47:15.142 UTC [36] LOG: pgaudit extension initialized
2025-06-01 16:47:15.149 UTC [36] LOG: pgsodium primary server secret key loaded
2025-06-01 16:47:15.154 UTC [36] LOG: vault primary server secret key loaded
2025-06-01 16:47:15.168 UTC [36] LOG: starting PostgreSQL 15.8 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 13.2.0, 64-bit
2025-06-01 16:47:15.173 UTC [36] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-06-01 16:47:15.182 UTC [45] LOG: database system shutdown was interrupted; last known up at 2025-06-01 16:47:13 UTC
2025-06-01 16:47:15.470 UTC [45] LOG: database system was not properly shut down; automatic recovery in progress
2025-06-01 16:47:15.475 UTC [45] LOG: redo starts at 0/1AFE898
2025-06-01 16:47:15.510 UTC [45] LOG: invalid record length at 0/24272A0: wanted 24, got 0
2025-06-01 16:47:15.510 UTC [45] LOG: redo done at 0/2427270 system usage: CPU: user: 0.03 s, system: 0.00 s, elapsed: 0.03 s
2025-06-01 16:47:15.525 UTC [43] LOG: checkpoint starting: end-of-recovery immediate wait
done
server started
[local] 2025-06-01 16:47:15.534 UTC [47] supabase_admin@postgres FATAL: the database system is not accepting connections
[local] 2025-06-01 16:47:15.534 UTC [47] supabase_admin@postgres DETAIL: Hot standby mode is disabled.
psql: error: connection to server on socket "/run/postgresql/.s.PGSQL.5432" failed: FATAL: the database system is not accepting connections
DETAIL: Hot standby mode is disabled.
PostgreSQL Database directory appears to contain a database; Skipping initialization
pg_ctl: another server might be running; trying to start server anyway
waiting for server to start.... 2025-06-01 16:47:18.998 UTC [36] LOG: pgaudit extension initialized
2025-06-01 16:47:19.005 UTC [36] LOG: pgsodium primary server secret key loaded
2025-06-01 16:47:19.011 UTC [36] LOG: vault primary server secret key loaded
2025-06-01 16:47:19.026 UTC [36] LOG: starting PostgreSQL 15.8 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 13.2.0, 64-bit
2025-06-01 16:47:19.029 UTC [36] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-06-01 16:47:19.039 UTC [45] LOG: database system shutdown was interrupted; last known up at 2025-06-01 16:47:15 UTC
2025-06-01 16:47:19.367 UTC [45] LOG: database system was not properly shut down; automatic recovery in progress
2025-06-01 16:47:19.371 UTC [45] LOG: redo starts at 0/1AFE898
done
server started
psql: error: connection to server on socket "/run/postgresql/.s.PGSQL.5432" failed: FATAL: the database system is not accepting connections
DETAIL: Hot standby mode is disabled.
[local] 2025-06-01 16:47:19.386 UTC [47] supabase_admin@postgres FATAL: the database system is not accepting connections
[local] 2025-06-01 16:47:19.386 UTC [47] supabase_admin@postgres DETAIL: Hot standby mode is disabled.
PostgreSQL Database directory appears to contain a database; Skipping initialization
pg_ctl: another server might be running; trying to start server anyway
waiting for server to start.... 2025-06-01 16:47:26.046 UTC [36] LOG: pgaudit extension initialized
2025-06-01 16:47:26.053 UTC [36] LOG: pgsodium primary server secret key loaded
2025-06-01 16:47:26.057 UTC [36] LOG: vault primary server secret key loaded
2025-06-01 16:47:26.073 UTC [36] LOG: starting PostgreSQL 15.8 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 13.2.0, 64-bit
2025-06-01 16:47:26.077 UTC [36] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-06-01 16:47:26.086 UTC [45] LOG: database system was interrupted while in recovery at 2025-06-01 16:47:19 UTC
2025-06-01 16:47:26.086 UTC [45] HINT: This probably means that some data is corrupted and you will have to use the last backup for recovery.
2025-06-01 16:47:26.360 UTC [45] LOG: database system was not properly shut down; automatic recovery in progress
2025-06-01 16:47:26.364 UTC [45] LOG: redo starts at 0/1AFE898
2025-06-01 16:47:26.399 UTC [45] LOG: invalid record length at 0/24272A0: wanted 24, got 0
2025-06-01 16:47:26.399 UTC [45] LOG: redo done at 0/2427270 system usage: CPU: user: 0.01 s, system: 0.02 s, elapsed: 0.03 s
2025-06-01 16:47:26.415 UTC [43] LOG: checkpoint starting: end-of-recovery immediate wait
done
server started
[local] 2025-06-01 16:47:26.437 UTC [47] supabase_admin@postgres FATAL: the database system is not accepting connections
[local] 2025-06-01 16:47:26.437 UTC [47] supabase_admin@postgres DETAIL: Hot standby mode is disabled.
psql: error: connection to server on socket "/run/postgresql/.s.PGSQL.5432" failed: FATAL: the database system is not accepting connections
DETAIL: Hot standby mode is disabled.
PostgreSQL Database directory appears to contain a database; Skipping initialization
pg_ctl: another server might be running; trying to start server anyway
waiting for server to start.... 2025-06-01 16:47:39.508 UTC [36] LOG: pgaudit extension initialized
2025-06-01 16:47:39.515 UTC [36] LOG: pgsodium primary server secret key loaded
2025-06-01 16:47:39.520 UTC [36] LOG: vault primary server secret key loaded
2025-06-01 16:47:39.536 UTC [36] LOG: starting PostgreSQL 15.8 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 13.2.0, 64-bit
2025-06-01 16:47:39.540 UTC [36] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-06-01 16:47:39.548 UTC [45] LOG: database system shutdown was interrupted; last known up at 2025-06-01 16:47:26 UTC
2025-06-01 16:47:39.815 UTC [45] LOG: database system was not properly shut down; automatic recovery in progress
2025-06-01 16:47:39.818 UTC [45] LOG: redo starts at 0/1AFE898
2025-06-01 16:47:39.859 UTC [45] LOG: invalid record length at 0/24272A0: wanted 24, got 0
2025-06-01 16:47:39.859 UTC [45] LOG: redo done at 0/2427270 system usage: CPU: user: 0.02 s, system: 0.01 s, elapsed: 0.04 s
2025-06-01 16:47:39.874 UTC [43] LOG: checkpoint starting: end-of-recovery immediate wait
done
server started
psql: error: connection to server on socket "/run/postgresql/.s.PGSQL.5432" failed: FATAL: the database system is not accepting connections
DETAIL: Hot standby mode is disabled.
[local] 2025-06-01 16:47:39.897 UTC [47] supabase_admin@postgres FATAL: the database system is not accepting connections
[local] 2025-06-01 16:47:39.897 UTC [47] supabase_admin@postgres DETAIL: Hot standby mode is disabled.
PostgreSQL Database directory appears to contain a database; Skipping initialization
pg_ctl: another server might be running; trying to start server anyway
waiting for server to start.... 2025-06-01 16:48:05.796 UTC [36] LOG: pgaudit extension initialized
2025-06-01 16:48:05.803 UTC [36] LOG: pgsodium primary server secret key loaded
2025-06-01 16:48:05.807 UTC [36] LOG: vault primary server secret key loaded
2025-06-01 16:48:05.825 UTC [36] LOG: starting PostgreSQL 15.8 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 13.2.0, 64-bit
2025-06-01 16:48:05.828 UTC [36] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-06-01 16:48:05.838 UTC [45] LOG: database system shutdown was interrupted; last known up at 2025-06-01 16:47:39 UTC
2025-06-01 16:48:06.117 UTC [45] LOG: database system was not properly shut down; automatic recovery in progress
2025-06-01 16:48:06.121 UTC [45] LOG: redo starts at 0/1AFE898
2025-06-01 16:48:06.163 UTC [45] LOG: invalid record length at 0/24272A0: wanted 24, got 0
2025-06-01 16:48:06.163 UTC [45] LOG: redo done at 0/2427270 system usage: CPU: user: 0.02 s, system: 0.01 s, elapsed: 0.04 s
2025-06-01 16:48:06.179 UTC [43] LOG: checkpoint starting: end-of-recovery immediate wait
done
server started
psql: error: connection to server on socket "/run/postgresql/.s.PGSQL.5432" failed: FATAL: the database system is not accepting connections
DETAIL: Hot standby mode is disabled.
[local] 2025-06-01 16:48:06.187 UTC [47] supabase_admin@postgres FATAL: the database system is not accepting connections
[local] 2025-06-01 16:48:06.187 UTC [47] supabase_admin@postgres DETAIL: Hot standby mode is disabled.
PostgreSQL Database directory appears to contain a database; Skipping initialization
pg_ctl: another server might be running; trying to start server anyway
waiting for server to start.... 2025-06-01 16:48:57.658 UTC [36] LOG: pgaudit extension initialized
2025-06-01 16:48:57.666 UTC [36] LOG: pgsodium primary server secret key loaded
2025-06-01 16:48:57.671 UTC [36] LOG: vault primary server secret key loaded
2025-06-01 16:48:57.686 UTC [36] LOG: starting PostgreSQL 15.8 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 13.2.0, 64-bit
2025-06-01 16:48:57.691 UTC [36] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-06-01 16:48:57.700 UTC [45] LOG: database system shutdown was interrupted; last known up at 2025-06-01 16:48:06 UTC
2025-06-01 16:48:57.977 UTC [45] LOG: database system was not properly shut down; automatic recovery in progress
2025-06-01 16:48:57.981 UTC [45] LOG: redo starts at 0/1AFE898
2025-06-01 16:48:58.016 UTC [45] LOG: invalid record length at 0/24272A0: wanted 24, got 0
2025-06-01 16:48:58.016 UTC [45] LOG: redo done at 0/2427270 system usage: CPU: user: 0.03 s, system: 0.00 s, elapsed: 0.03 s
2025-06-01 16:48:58.027 UTC [43] LOG: checkpoint starting: end-of-recovery immediate wait
done
server started
[local] 2025-06-01 16:48:58.047 UTC [47] supabase_admin@postgres FATAL: the database system is not accepting connections
[local] 2025-06-01 16:48:58.047 UTC [47] supabase_admin@postgres DETAIL: Hot standby mode is disabled.
psql: error: connection to server on socket "/run/postgresql/.s.PGSQL.5432" failed: FATAL: the database system is not accepting connections
DETAIL: Hot standby mode is disabled.
Stopping containers...
supabase_db_quiz.dev container is not ready: unhealthy
Try rerunning the command with --debug to troubleshoot the error.
This is a known issue that the Supabase team are working on as it's also happening with 17.x of Postgres too. https://github.com/supabase/cli/issues/3632
This has now been fixed in the latest version available (15.8.1.095). The hosted platform hasn't been updated to use this as yet though.
I just upgrading to postgres 17.4.1.041 and I STILL get this problem.
It seems the supabase team skipped the working version where this is fixed.
I had the same issue - I was able to solve this by deleting all supabase docker images and containers via Docker Desktop. Then I uninstalled and redownloaded the supabase CLI (although I'm not sure if this had any effect). When I ran supabase start the next time everything worked.
I had the same issue - I was able to solve this by deleting all supabase docker images and containers via Docker Desktop. Then I uninstalled and redownloaded the supabase CLI (although I'm not sure if this had any effect). When I ran
supabase startthe next time everything worked.
The error returns after you restart the Supabase container using supabase stop --no-backup. The only working solution for now is to avoid using supabase link on the project and to clean the existing .temp directory.
#The only working solution for now is to avoid using supabase link
so essentially local dev is dead? I can't dev against my project locally unless i can link it otherwise i just get a blank default project or am i doing something wrong.
As far as I know, supabase link just ensures you are developing with the same versions locally. It doesn't actually prevent you from pushing migrations etc (at least I am able to).
It is up to you not to do anything stupid like use a feature locally that isn't supported in the cloud.
J
I encountered the same error messages. My remote database is version 17 while the cli was using version 15.
From a suggestion in another thread, I started using the latest beta version which seems to allow me to start now. I noticed it changed the major_version to 17 in the config.toml
npx supabase@beta init npx supabase@beta start
I'm trying to sync my local database so I can create and setup my initial branch.
Not sure if its related to the cli, but when I do
npx supabase@beta db pull --db-url xxx
(using npx supabase@beta link --project-ref xxxx then npx supabase@beta db pull also has the same errors)
I get the errors
The remote database's migration history does not match local files in supabase\migrations directory.
Make sure your local git repo is up-to-date. If the error persists, try repairing the migration history table: supabase migration repair --status reverted 20250531120855
if I do npx supabase@beta db diff -f initial_migration I get the errors Connecting to local database... Creating shadow database... ... ... bb4955f442e858719dc57c49542067965bc870b5366bfd8e6be3aff803d7ed0a container logs: failed to read docker logs: Error response from daemon: No such container: bb4955f442e858719dc57c49542067965bc870b5366bfd8e6be3aff803d7ed0a Failed to remove container: bb4955f442e858719dc57c49542067965bc870b5366bfd8e6be3aff803d7ed0a Error response from daemon: No such container: bb4955f442e858719dc57c49542067965bc870b5366bfd8e6be3aff803d7ed0a failed to inspect container health: Error response from daemon: No such container: bb4955f442e858719dc57c49542067965bc870b5366bfd8e6be3aff803d7ed0a
However the local environment is working, but I can't seem to sync my database with remote.
I upgraded my project to 17.4.1.043 and still had the problem.
I then found this post:
https://github.com/orgs/supabase/discussions/30612
I then went to my volumes in docker and removed supabase_db_YOUR_PROJECT_NAME.
I then reran npx supabase start and it worked!
While this fixes the problem, it doesn't address the cause of why the volume gets corrupted.
J
Further to my issue above. The migration error was a separate issue.
I had reached out to support as was given the below workaround.
Note that I'm using supabase@beta (current version 2.26.9) rather then just supabase as that version is current still producing the v15 postgressql database
-----Workaround start--- Start with a new directory that is empty and run the following:
supabase init
Then run the following commands to link and pull the database schema:
supabase link --project-ref supabase db pull supabase start
At this point, if you run supabase start, you should be getting the same issue that you had before:
... ALTER ROLE psql: error: /docker-entrypoint-initdb.d/init-scripts/99-roles.sql: No such file or directory Stopping containers... supabase_db_localdev container is not ready: unhealthy ...
At this point, you will need to run supabase stop and then manually stop the unhealthy container mentioned in the error in docker if needed assuming you did run the supabase start to confirm the issue here.
Now is when you need to delete the .temp folder in your supabase directory. After this is done, you should now be able to run supabase start and it should work without issues.
-----Workaround end---
Hi all, I'm going to move this issue to a discussion following the work around mentioned above. Thanks all for your help on this one.