Gflags, also known as configuration flags, are used in YugabyteDB to manage configurations and feature flags for its primary applications: yb-master (master), yb-tserver (tserver), and postgres.
These gFlags allow you to resolve issues, improve performance, and customize functionality.
Modifying a gFlag typically involves a rolling restart of the cluster so that the change is persistent after subsequent restarts.
However, you may want to change a gFlag on a running cluster, and then later during a less busy time, apply the gFlag changes to the configuration file that the server uses to start.
yb-ts-cli is a command line tool that can be used to perform an operation on a particular tablet server (yb-tserver), where one of those operations (set_flag) is to change a gFlag in memory.
Example:
Let’s change the value of the TServer gFlag ysql_log_statement from its current value to “all”.
First, we can view the current value of the gFlag using this YugabyteDB tip.