Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom PGDATA or change mount path of /var/lib/postgresql/data? #448

Open
yemaney opened this issue Nov 18, 2024 · 0 comments
Open

Custom PGDATA or change mount path of /var/lib/postgresql/data? #448

yemaney opened this issue Nov 18, 2024 · 0 comments

Comments

@yemaney
Copy link

yemaney commented Nov 18, 2024

Is it possible to customize the PGDATA value used by the bootstrap image?

By default, the directory /var/lib/postgresql/data/pgdata is used to initialize the database because /var/lib/postgresql/data is backed by a PVC, making it writable.

I’d like to change it to /var/lib/postgresql/data/db/pgdata. The reason is that I want to create a separate folder at /var/lib/postgresql/data/plugins where I can copy PostgreSQL extension files while the pod is running. Copying these files requires a writable path (PVC) but don't want to conflict with the actuall database files.

I cannot copy the extensions into the same directory as PGDATA, as it causes a conflict with the init container’s command, which reports that the "data folder isn’t empty."

Another option is could it be possible to change the mount path used by the pods? For example mouting /var/lib/postgresql/ path

@yemaney yemaney changed the title Custom PGDATA? Custom PGDATA or change mount path of /var/lib/postgresql/data? Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant