From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Pavel Hushcha <paul(dot)fastest(at)gmail(dot)com> |
Cc: | PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Issue with PostgreSQL 18.0 Docker image volume mount (/var/lib/postgresql/data symlink) |
Date: | 2025-09-26 09:14:08 |
Message-ID: | CABUevEykYArbLRK-xEWnbHpzksZ8Evpj_EcsmAYS+Fz+sUtdiQ@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Fri, Sep 26, 2025, 12:05 Pavel Hushcha <paul(dot)fastest(at)gmail(dot)com> wrote:
> Hello,
>
> I’ve encountered a problem when trying to upgrade from the `postgres:17.6`
> Docker image to `postgres:18.0`.
>
> With PostgreSQL 17.6, the volume mapping worked fine:
>
> ```yaml
> volumes:
> -
> /volumeUSB1/usbshare1-6/configs/postgresql/data:/var/lib/postgresql/data/
> ```
>
> However, with `postgres:18.0`, the container fails to start with the
> following error:
>
> ```
> Error response from daemon: failed to create task for container: failed to
> create shim task:
> OCI runtime create failed: runc create failed: unable to start container
> process:
> error during container init: error mounting
> "/volumeUSB1/usbshare1-6/configs/postgresql/data"
> to rootfs at "/var/lib/postgresql/data": change mount propagation through
> procfd:
> open o_path procfd: open
> /volumeUSB1/usbshare1-6/docker/btrfs/subvolumes/362b5618ea6ff38caa0671921e892066b3ad705e39270f938aac396f7401781e/var/lib/postgresql/data:
>
> no such file or directory: unknown
> ```
>
> I noticed that the difference is in the Docker image itself:
>
> * In 17.6, `/var/lib/postgresql/data` is a real directory.
> * In 18.0, `/var/lib/postgresql/data` is a symlink to `.`.
>
>
> This change seems to break bind mounts on some storage backends (in my
> case, Btrfs on a Synology NAS).
>
> Could you confirm if this symlink change in the official PostgreSQL 18.0
> Docker image is intentional?
> And if so, is there a recommended way to mount external volumes for
> `PGDATA` now?
>
Hello!
Those docker containers are not provided by the PostgreSQL project. You
need to contact the docker team for questions about those.
/Magnus
>
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Guo | 2025-09-26 09:20:45 | Re: BUG #19007: Planner fails to choose partial index with spurious 'not null' |
Previous Message | PG Bug reporting form | 2025-09-26 07:36:24 | BUG #19064: Trigger allows creation with invalid column references but fails at runtime |