3 days ago
Issue Description:
When deploying ParadeDB (paradedb/paradedb:latest) on Railway with persistent volumes, the PostgreSQL container fails to initialize with the following error:
initdb: error: directory "/var/lib/postgresql/data" exists but is not empty
initdb: detail: It contains a lost+found directory, perhaps due to it being a mount point.
initdb: hint: Using a mount point directly as the data directory is not recommended.
Create a subdirectory under the mount point.
Steps to Reproduce:
Deploy paradedb/paradedb:latest on Railway
Attach a persistent volume to /var/lib/postgresql/data
Deploy the service
Attempted Solution:
Mounted volume to /var/lib/postgresql/data and set PGDATA=/var/lib/postgresql/data/pgdata
Result: Permission denied errors when PostgreSQL tries to create the subdirectory
5 Replies
3 days ago
Hey there! We've found the following might help you get unblocked faster:
🧵 Trying to add a volume to postgres/vector database, crashing
🧵 Prevent PostgreSQL from Running initdb on Existing Data Directory
If you find the answer from one of these, please let us know by solving the thread!
Railway
Hey there! We've found the following might help you get unblocked faster: - [🧵 Trying to add a volume to postgres/vector database, crashing](https://station.railway.com/questions/trying-to-add-a-volume-to-postgres-vecto-5d14fb3e) - [🧵 please help with my flask deployment](https://station.railway.com/questions/please-help-with-my-flask-deployment-9f9ca819) - [🧵 Prevent PostgreSQL from Running initdb on Existing Data Directory](https://station.railway.com/questions/prevent-postgre-sql-from-running-initdb-o-cbf8bb6a) If you find the answer from one of these, please let us know by solving the thread!
3 days ago
The first link seems to have the same problem, and OP's solution was similar to what I've tried but I ran into the permission denied issue. I've tried again with the same path and PGDATA that OP mentioned
"mkdir: cannot create directory ‘/mnt/pgvolume/dbdata’: Permission denied"
3 days ago
Status changed to Awaiting User Response Railway • 3 days ago
brody
Hello,Can you please try deploying the official template.https://railway.com/deploy/paradedb
3 days ago
I did, but looks like they just updated the template (previously it didn't have a volume attached). It seems to be working now. Thank you
Status changed to Awaiting Railway Response Railway • 3 days ago
Status changed to Awaiting User Response Railway • 3 days ago
Status changed to Solved brody • 3 days ago