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

Config value for copydb ReplicatedMasterPositionQuery with vanilla MysQL replication #348

Open
jrichardlai opened this issue Nov 16, 2023 · 0 comments

Comments

@jrichardlai
Copy link

jrichardlai commented Nov 16, 2023

Hello, I am trying to use the ReplicatedMasterPositionQuery config when setting the source as replica.
The example in the config is showing a query using pt-heartbeat

// SELECT file, position FROM meta.ptheartbeat WHERE server_id = master_server_id

When using vanilla MySQL replication ( using 8.0.34 ), what query should I be using?
It seems SHOW REPLICA STATUS; contains the adequate information ( Relay_Source_Log_Pos, Relay_Source_Log_File ), however I am not able to extract them through a SELECT query. Am I missing a config to use?

Looking into it, there are some tables related to replication in the performance schema https://dev.mysql.com/doc/refman/8.0/en/performance-schema-replication-tables.html, however it states the following:

The information in the Performance Schema replication tables differs somewhat from the information available from SHOW REPLICA STATUS because the tables are oriented toward use of global transaction identifiers (GTIDs), not file names and positions, and they represent server UUID values, not server ID values. Due to these differences, several SHOW REPLICA STATUS columns are not preserved in the Performance Schema replication tables, or are represented a different way:

The following fields refer to file names and positions and are not preserved:

Master_Log_File
Read_Master_Log_Pos
Relay_Log_File
Relay_Log_Pos
Relay_Master_Log_File
Exec_Master_Log_Pos
Until_Condition
Until_Log_File
Until_Log_Pos

So it does not seems that it could be used.

Thanks!

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

No branches or pull requests

1 participant