Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Do not merge] Testing for 5436 #1012

Closed
wants to merge 7 commits into from
Closed

[Do not merge] Testing for 5436 #1012

wants to merge 7 commits into from

Conversation

silent-observer
Copy link

No description provided.

Backend process GUCs marked as GUC_GPDB_NEED_SYNC are overwritten by coordinator
upon receiving a new connection. The coordinator sends it's configuration to the
segments the same way as if it were a frontend communicating with the
coordinator. This means the default priority for these GUCs becomes client
priority.

Previously, when gpstop -u was executed, it sent a SIGHUP signal, prompting the
coordinator and segments to re-read their configuration files. However, the
priority of options derived from the configuration file is lower than that of
client options. This difference caused the segments to ignore overwritten
GUCs when they re-read their configuration files, and these GUCs were not
re-dispatched by the QD either. This situation resulted in a desynchronization
of GUCs that are required to be synchronized between the coordinator and the
segments.

The solution is to explicitly dispatch the changed configuration from the
coordinator to the segments, similar to how it is done when initializing the
backend process.

When the QD receives a SIGHUP signal, it reads its configuration file to
identify any GUCs that have been modified. If these GUCs are marked with the
GUC_GPDB_NEED_SYNC flag, the QD dispatches SET commands containing these
modified GUCs to the QEs. To differentiate between this type of synchronization
and user-initiated SET commands, a flag GP_OPT_SYNCHRONIZATION_SET has been
introduced to the distributed transaction options.

Changes from original commit:
- In `guc-file.l` move the return value of `ProcessConfigFileInternal` to an
out parameter `changed_gucs_out`.
- Add memory context switching to it so that the `changed_gucs_out` list is
in the correct memory context.
- Change GUC parameter in the test from `backslash_quote` to `constraint_exclusion`
since `backslash_quote` now has a sync flag.

(cherry picked from commit 6934f3d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants