CrunchyData / crunchy-containers

Containers for Managing PostgreSQL on Kubernetes by Crunchy Data
https://www.crunchydata.com/
Apache License 2.0
1.01k stars 328 forks source link

Support for local storage #1489

Closed guettli closed 1 year ago

guettli commented 1 year ago

What is the motivation or use case for the change?

I read these docs:

https://access.crunchydata.com/documentation/crunchy-postgres-containers/5.2.0/installation-guide/storage-configuration/

Describe the solution you'd like

I would like to see support for local storage.

While readings these docs I realized, that local storage is the best solution for my environment (local storage is fast, and survives a reboot of the node):

https://cloudnative-pg.io/documentation/1.18/controller/

ValClarkson commented 1 year ago

Hi @guettli,

Would you be able to give more details about your use case for local storage? Also, are you planning on using the Crunchy Postgres container without Crunchy Postgres for Kubernetes? Our primary use case for the containers in this suite is to be used with the PGO operator.

guettli commented 1 year ago

I want fast performance. Using a storage which is provided via the network will be slower than a local storage (for example NVMe).

That's why I think local storage is a great option.

Since there are already two layers of redundancy (replication and backup), I don't think you need a safe storage.

In the above link to the docs I was missing information about using local-storage (maybe via TopoLVM), and I was missing some numbers about the performance (NFS vs local-storage).

Also, are you planning on using the Crunchy Postgres container without Crunchy Postgres for Kubernetes?

No, I am not planing this.

The cnPG docs have some details about it:

Local storage enables shared-nothing architectures, which is more suitable for high transactional and Very Large DataBase (VLDB) workloads, as it guarantees higher and more predictable performance.

https://cloudnative-pg.io/documentation/1.16/storage/#storage

ValClarkson commented 1 year ago

Hi @guettli,

The crunchy-containers repository is designed to support use with PGO. As such, we cannot offer support for use with other operator implementations. Using local storage with PGO is simple and can be done by creating the PV and then using your correct "volumeName" and "storageClassName" in the relevant volume claim specs. With this in mind, should you need more information about using these containers with PGO, please feel free to ask in the postgres-operator GitHub repository for more information.