pt-heartbeat not working for PostgreSQL and thows unhandled exception

Description

bash-4.2$ ./pt-heartbeat --dbi-driver=Pg --update -D postgres Cannot get MySQL var character_set_server: DBD::Pg::db selectrow_array failed: ERROR: syntax error at or near "LIKE" LINE 1: SHOW VARIABLES LIKE 'character_set_server' ^ [for Statement "SHOW VARIABLES LIKE 'character_set_server'"] at ./pt-heartbeat line 2977.
-bash-4.2$ ./pt-heartbeat --dbi-driver=Pg -D postgres Usage: pt-heartbeat [OPTIONS] [DSN] --update|--monitor|--check|--stopErrors in command-line arguments: * Specify at least one of --stop, --update, --monitor or --checkpt-heartbeat measures replication lag on a MySQL or PostgreSQL server. You can use it to update a master or monitor a replica. If possible, MySQL connection options are read from your .my.cnf file. For more details, please use the --help option, or try 'perldoc ./pt-heartbeat' for complete documentation.
-bash-4.2$ ./pt-heartbeat --dbi-driver=Pg -D postgres --check Cannot get MySQL var character_set_server: DBD::Pg::db selectrow_array failed: ERROR: syntax error at or near "LIKE" LINE 1: SHOW VARIABLES LIKE 'character_set_server' ^ [for Statement "SHOW VARIABLES LIKE 'character_set_server'"] at ./pt-heartbeat line 2977.
-bash-4.2$ ./pt-heartbeat --dbi-driver=Pg -D postgres --monitor Cannot get MySQL var character_set_server: DBD::Pg::db selectrow_array failed: ERROR: syntax error at or near "LIKE" LINE 1: SHOW VARIABLES LIKE 'character_set_server' ^ [for Statement "SHOW VARIABLES LIKE 'character_set_server'"] at ./pt-heartbeat line 2977.

Environment

None

Smart Checklist

Activity

Fernando Laudares Carmagos July 16, 2020 at 2:20 PM

My understanding is that, when support for PostgreSQL has been added, it was specific to Slony replication, which isn't part of the core of PostgreSQL, and even then that support looks to be broken from what we can see above, probably as the tool evolved with a focus on MySQL along the time.
If support for PostgreSQL is to be fixed, it should work with standard streaming replication (if that makes sense) and/or logical replication instead.

Duplicate

Details

Assignee

Reporter

Priority

Affects versions

Smart Checklist

Created July 16, 2020 at 11:24 AM
Updated February 29, 2024 at 8:57 PM
Resolved December 8, 2021 at 10:53 AM

Flag notifications