Re: [PATCH] initdb: do not exit after warn_on_mount_point - Mailing list pgsql-hackers

From Julien Rouhaud
Subject Re: [PATCH] initdb: do not exit after warn_on_mount_point
Date
Msg-id 20220911101747.r255dgsd673tb7qa@jrouhaud
Whole thread Raw
In response to Re: [PATCH] initdb: do not exit after warn_on_mount_point  (andrey.arapov@nixaid.com)
Responses Re: [PATCH] initdb: do not exit after warn_on_mount_point
Re: [PATCH] initdb: do not exit after warn_on_mount_point
List pgsql-hackers
Hi,

On Sat, Sep 10, 2022 at 07:14:59PM +0000, andrey.arapov@nixaid.com wrote:
>
> Have slightly improved the logic so that it does not report an error
> "directory \"%s\" exists but is not empty"
> when it is only supposed to warn the user about the mountpoint, without
> exiting.
>
> To me, my patch looks like a typo fix where exit(1) should not be called on
> the warn_on_mount_point(), but only warn and continue as more people are
> mounting the device at `/var/lib/postgresql/data` (PGDATA) in the
> containerized world (K8s deployments, especially now in the Akash Network I
> am working for) for making sure their data persist.

This definitely isn't a typo, as it's really strongly discouraged to use a
mount point for the data directory.  You can refer to this thread [1] for more
explanations.

[1] https://www.postgresql.org/message-id/flat/CAKoxK%2B6H40imynM5P31bf0DnpN-5f5zeROjcaj6BKVAjxdEA9w%40mail.gmail.com



pgsql-hackers by date:

Previous
From: Aleksander Alekseev
Date:
Subject: Re: [PATCH] Clarify the comments about varlena header encoding
Next
From: Richard Guo
Date:
Subject: Check SubPlan clause for nonnullable rels/Vars