zalando / postgres-operator

Postgres operator creates and manages PostgreSQL clusters running in Kubernetes
https://postgres-operator.readthedocs.io/
MIT License
4.33k stars 979 forks source link

Discussion notes on: 1 Statefulset per node #17

Open Jan-M opened 7 years ago

Jan-M commented 7 years ago

Yesterday evening we found out that we arrived at similar need for different reason:

1) Controlled scale down to not terminate master node during scale down

2) Allow per replica/node different configuration, e.g. slaves with less resources

As a remark to the statefulset should scale down in a deterministic fashion thus the highest number of pod will be terminated(removed).

For 1) I also don't feel this is warrant enough for rewrite to multiple statefulsets, as failing over should be a no brainer combined with the probably very low times people actually scale up and down. Maybe Patroni can even prefer to fail over to lowest number pod.

tommyzli commented 2 years ago

Allow per replica/node different configuration, e.g. slaves with less resources

I know this is an ancient issue and may not get prioritized, but I want to put it out there that some variation of this concept would be very useful. Ideally including support for postgres and patroni configurations that differ from the leader.

For example, one common use case for me is to have one or two special replicas for long running ETL queries, which have the nofailover patroni tag and a higher max_standby_streaming_delay value.