zalando / zalando/postgres-operator
Operator can not change Patroni log format
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 5.2k
- Forks
- 1.1k
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 3
Description
Please, answer some short questions which should help us to understand your problem / question better?
- Which image of the operator are you using?
registry.opensource.zalan.do/acid/postgres-operator:v1.8.2 - Where do you run it - cloud or metal? Kubernetes or OpenShift?
OpenShift - Are you running Postgres Operator in production?
yes - Type of issue?
feature request
We found that there was a significant difference between patroni's log output and postgres' own log output, which was particularly noticeable in the case of different time zones and could seriously affect the user's ability to determine when the current database time occurred.
Maximum size of a TOAST chunk: 1996
Size of a large-object chunk: 2048
Date/time type storage: 64-bit integers
Float8 argument passing: by value
Data page checksum version: 0
Mock authentication nonce: abf7c1c4196813ba00508a5c731f27ef09ac14849444b146990ce698cf4bc520
2022-08-30 08:25:46,334 INFO: Lock owner: acid-timescaledb-test-2; I am acid-timescaledb-test-0
2022-08-30 08:25:46,349 INFO: Local timeline=26 lsn=14/5B000028
2022-08-30 08:25:46,375 INFO: master_timeline=27
2022-08-30 08:25:46,382 INFO: master: history=23 8/E20000A0 no recovery target specified
24 9/7000A18 no recovery target specified
25 14/490000A0 no recovery target specified
26 14/5B0000A0 no recovery target specified
2022-08-30 08:25:46,382 INFO: Lock owner: acid-timescaledb-test-2; I am acid-timescaledb-test-0
2022-08-30 08:25:46,415 INFO: starting as a secondary
2022-08-30 08:25:46,623 INFO: postmaster pid=74
/var/run/postgresql:5432 - no response
2022-08-30 16:25:46 CST [74]: [1-1] 630dc98a.4a 0 LOG: Auto detecting pg_stat_kcache.linux_hz parameter...
2022-08-30 16:25:46 CST [74]: [2-1] 630dc98a.4a 0 LOG: pg_stat_kcache.linux_hz is set to 1000000
2022-08-30 16:25:47 CST [74]: [3-1] 630dc98a.4a 0 LOG: redirecting log output to logging collector process
2022-08-30 16:25:47 CST [74]: [4-1] 630dc98a.4a 0 HINT: Future log output will appear in directory "../pg_log".
/var/run/postgresql:5432 - rejecting connections
/var/run/postgresql:5432 - rejecting connections
/var/run/postgresql:5432 - accepting connections
2022-08-30 08:25:48,730 INFO: Lock owner: acid-timescaledb-test-2; I am acid-timescaledb-test-0
2022-08-30 08:25:48,730 INFO: establishing a new patroni connection to the postgres cluster
2022-08-30 08:25:48,878 INFO: no action. I am (acid-timescaledb-test-0), a secondary, and following a leader (acid-timescaledb-test-2)
2022-08-30 08:25:52,105 INFO: no action. I am (acid-timescaledb-test-0), a secondary, and following a leader (acid-timescaledb-test-2)
2022-08-30 08:26:02,110 INFO: no action. I am (acid-timescaledb-test-0), a secondary, and following a leader (acid-timescaledb-test-2)
The patroni configuration allows for independent adjustment of the log output, could we provide the same method within CR or more options for patroni to allow for more flexible configuration for the user?
https://patroni.readthedocs.io/en/latest/SETTINGS.html#log
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Patroni log settings described in the linked SETTINGS documentation and trace how the operator's custom resource configures Patroni. The work is done when users can configure Patroni log output through the custom resource and the resulting logs support the requested format and timezone behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes, postgresql
- Domain
- database, devops
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100