ParadeDB PostgreSQL Container Fails to Initialize Due to Volume Mount Issues
dustinpham235
PROOP

10 months 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:

  1. Deploy paradedb/paradedb:latest on Railway
  2. Attach a persistent volume to /var/lib/postgresql/data
  3. 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
Solved

5 Replies

Railway
BOT

10 months ago

Hey there! We've found the following might help you get unblocked faster:

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!

dustinpham235
PROOP

10 months 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"


10 months ago

Hello,

Can you please try deploying the official template.

https://railway.com/deploy/paradedb


Status changed to Awaiting User Response Railway 10 months ago


brody

Hello, Can you please try deploying the official template. <https://railway.com/deploy/paradedb>

dustinpham235
PROOP

10 months 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 10 months ago


10 months ago

Yes, we have worked with them to get their template in good standing.


Status changed to Awaiting User Response Railway 10 months ago


Status changed to Solved brody 10 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...