[YSQL] Add tserver gflag to set postgres process options
#6,141 opened on 2020年10月24日
Repository metrics
- Stars
- (8,229 stars)
- PR merge metrics
- (平均マージ 17d 21h) (30d で 92 merged PRs)
説明
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.