Skip to content

Use `ar_internal_metadata` to store `db_config_name` for a given database

What does this MR do and why?

The previously used system_identifier of pg_control_system() stays the same after database promotion and makes the gitlab:db:validate_config to fail since we expect this identifier to be different.

We cannot fix system_identifer since it is set on init xlog. This fixes the problem by using an internal AR table to store relevant information.

Since we connect to "write" the writes will be immediate.

Related:

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Kamil Trzciński

Merge request reports