yugabyte/yugabyte-db

[YSQL] Add tserver gflag to set postgres process options

Open

#6141 aperta il 24 ott 2020

Vedi su GitHub
 (6 commenti) (0 reazioni) (0 assegnatari)C (1003 fork)batch import
area/ysqlgood first issuehelp wantedkind/enhancementkind/improve-uxpriority/medium

Metriche repository

Star
 (8229 star)
Metriche merge PR
 (Merge medio 17g 21h) (92 PR mergiate in 30 g)

Descrizione

Jira Link: DB-2020 There doesn't seem to be a way to set postgres process options without editing the source code and compiling. Add a gflag to take those options, and make sure they override the defaults (whether that be making the options after the defaults or before, I don't know at the moment).

One use of this is using the -d N option to set different log levels (e.g. DEBUG3) for postgres. See src/postgres/src/backend/tcop/postgres.c function set_debug_options. Note that this is currently workaroundable by setting the underlying config options (e.g. debug_print_parse=true) in postgresql.conf.

src/yb/yql/pgwrapper/pg_wrapper.cc has PgWrapper::Start which sets arguments for the postgres process of a tserver. The tserver gflag can probably do its thing here.

Guida contributor