postgres-operator icon indicating copy to clipboard operation
postgres-operator copied to clipboard

Operator can not change Patroni log format

Open cdmikechen opened this issue 3 years ago • 0 comments

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

cdmikechen avatar Aug 31 '22 00:08 cdmikechen