Docker Community Forums

Share and learn in the Docker community.

Mounted host directories not compatible with PostgreSQL


(Hyperknot) #1

Expected behavior

When running

docker run -it --rm -v `pwd`/test:/var/lib/postgresql/data postgres

initdb should run without errors.

Actual behavior

Initdb ends up in random disk write errors like:

creating template1 database in /var/lib/postgresql/data/base/1 ... FATAL:  could not write to file "pg_xlog/xlogtemp.25": Input/output error

or

FATAL:  could not close file "base/1/1249": Input/output error
FATAL:  could not close file "base/1/2603": Input/output error
CONTEXT:  writing block 0 of relation base/1/1247

Information

OS X 10.11.5
8AD4FDA4-54A8-495C-AD0C-E74BC05CBD14

Steps to reproduce the behavior

  1. Run the above command

(David Sheets) #2

I cannot reproduce this issue on Beta 21 (build 11019). I think this issue has likely been fixed. If you could try out your use case and let us know if the problem still occurs, we’d really appreciate it.

Thanks for participating in the Docker for Mac Beta!

Best regards,

David


(Hyperknot) #3

Yes, on 1.12.0 stable this too isn’t happening.