From: | Mark Kirkwood <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz> |
---|---|
To: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #15854: postgres wtih Docker: binding port fails with release greater than 9.6.13 |
Date: | 2019-06-17 03:31:28 |
Message-ID: | 380d98db-5746-73af-87a1-aca2884c3539@catalyst.net.nz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On 17/06/19 12:35 AM, PG Bug reporting form wrote:
>
> IT is successful.
>
> Remove the running container, start again but use a postgres version later
> than 9.6. here I'm using "latest", pulled on June 16, 2019. note the
> commands below are identical to the example above except for the postgres
> docker image used.
>
> 1. Create container:
> docker run -i --detach --name lcj34__biohpc_phg_postgres_container -e
> POSTGRES_PASSWORD=phgP0stgr3s -v
> /workdir/lcj34/DockerPostgresTests_working/dockerDB_data/data:/var/lib/postgresql/data
> -p 8010:5432 postgres:latest
What I suspect is happening is this: the volume you used for the 9.6
container still has the database files there (even after the container
has stopped), so when you try to reuse it for a later version the new
postmaster will refuse to start. I suggest naming the volume path with a
version. e.g:
docker run -i --detach --name lcj34__biohpc_phg_postgres_container -e
POSTGRES_PASSWORD=phgP0stgr3s -v
/workdir/lcj34/DockerPostgresTests_working/dockerDB_data/10:/var/lib/postgresql/data
regards
Mark
From | Date | Subject | |
---|---|---|---|
Next Message | shruti.gupta | 2019-06-17 05:50:57 | Not able to insert data into table |
Previous Message | Tao Xu | 2019-06-17 02:08:38 | Re: BUG #15853: DROP TABLE CASCADE drops sequence that other tables depend on |