timescale/timescaledb-docker

timescaledb:2.14.2-pg16-bitnami does not work with readreplica nodes

nleeuskadi opened this issue · 6 comments

Hello,

I am trying to use the bitnami/postgresql chart with your image [2.14.2-pg16-bitnami]

I want to install a cluster like this : 1 primary and 2 read replicas.

I execute this command:
helm install bitnami-tsdb oci://registry-1.docker.io/bitnamicharts/postgresql --version 14.2.2 --set 'image.repository=timescale/timescaledb' --set 'image.tag=2.14.2-pg16-bitnami' --set readReplicas.replicaCount=2 --set architecture=replication --namespace test-bitnami-tsdb

The primary succeeds to start but the read replica fail in a crashloopback.

I guess that the problem is the same as the one you solved with repmgr (commit ddd1609).
indeed, timescaledb tuning breaks not only standy nodes on repmgr cluster but it also breaks read replicas nodes on postgresql cluster.

My though is that you should disable timescale tune at all for any bitnami based image and not only for bitnami/postgresql-repmgr based image.

Here below the solution you implemented to disable Timescale tuning in case of bitmani/postgresql-repmgr based image
which should be generalize i think.

# Timescale tuning breaks standby nodes on repmgr clusters, so we disable it
# by default
if [ "$PG_BASE_IMAGE" == "postgresql-repmgr" ]
then
    export NO_TS_TUNE=true
fi

Thank you in advance for your help

best regards

Nicolas

Hm, I don't have too much experience with helm charts but is it possible that you just use that env variable in order to disable timescaledb-tune support?

Would that make sense for you?

Hi @antekresic ,

thank you for your answer. You are right with your solution.
But it is not applicable in my case since I am using the bitnami chart which does not use this NO_TS_TUNE var env.
And I don't wan't to modify the official community helm chart.

Since Timescaledb community provides a timescaledb image based on official Bitnami image, I am guessing that the intention of these images is also to be able to use it with Bitnami helm chart while taking advantage that Timescaledb is included in the official Bitnami image.

A fix was implemented for the images timescale/timescaledb:x.xx.x-pgxx-repmgr-bitnami (for example this one: https://hub.docker.com/layers/timescale/timescaledb/2.14.2-pg16-repmgr-bitnami/images/sha256-b15578c2688f7574557791cfc8eebd427d72bb9bc871773aaff037dd79a52766?context=explore) , and these images works fine now with the bitnami chart https://github.com/bitnami/charts/tree/main/bitnami/postgresql-ha.

Similarely, it could be of interest if the timescale/timescaledb:x.xx.x-pgxx-bitnami is also fixed to work natively with the offical Bitnami helm chart (https://artifacthub.io/packages/helm/bitnami/postgresql) without modify the Chart :)

many thanks :)