feat(config): make table name of pg backend configurable (#5244)

* feat: configurable table name

* fix: election sql

* feat: configurable lock_id

* chore: update config file

* perf: useless allocation

* perf: useless allocation

* chore: remove unused type hint

* Apply suggestions from code review

Co-authored-by: Weny Xu <wenymedia@gmail.com>

* chore: update config file

---------

Co-authored-by: Weny Xu <wenymedia@gmail.com>
This commit is contained in:
Yohan Wal
2025-01-08 22:55:35 +08:00
committed by GitHub
parent 03a2e6d0c1
commit 751fa4ede9
5 changed files with 193 additions and 85 deletions

View File

@@ -24,6 +24,14 @@ store_key_prefix = ""
## - `postgres_store`
backend = "etcd_store"
## Table name in RDS to store metadata. Effect when using a RDS kvbackend.
## **Only used when backend is `postgres_store`.**
meta_table_name = "greptime_metakv"
## Advisory lock id in PostgreSQL for election. Effect when using PostgreSQL as kvbackend
## Only used when backend is `postgres_store`.
meta_election_lock_id = 1
## Datanode selector type.
## - `round_robin` (default value)
## - `lease_based`