yugabyte/yugabyte-db

[YSQL] Add tserver gflag to set postgres process options

Open

#6,141 创建于 2020年10月24日

在 GitHub 查看
 (6 评论) (0 反应) (0 负责人)C (1,003 fork)batch import
area/ysqlgood first issuehelp wantedkind/enhancementkind/improve-uxpriority/medium

仓库指标

Star
 (8,229 star)
PR 合并指标
 (平均合并 17天 21小时) (30 天内合并 92 个 PR)

描述

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.

贡献者指南