pt-pg-summary crashing in RHEL 7.6

Description

$ ./pt-pg-summary > $PTDEST/pt-pg-summary.out
INFO[0000] Connecting to the database server using: sslmode=disable dbname=postgres
INFO[0000] Connection OK
FATA[0000] Cannot create a data collector instance: Cannot get databases list: sql: Scan error on column index 0: unsupported Scan, storing driver.Value type <nil> into type *models.Name

Environment

None

Smart Checklist

Activity

Roma Novikov June 23, 2020 at 8:53 AM

thanks for the report 

thanks for such deep and technical investigation  

 

We already reported this issue in our Internal testing  () and this is planned to be executed in the next sprint 

Sergey Kuzmichev June 21, 2020 at 2:22 PM
Edited

Sergey Kuzmichev June 19, 2020 at 4:44 PM
Edited

Issue caused by NULLs in the output for the following query in PG versions of 12+.

https://github.com/percona/percona-toolkit/blob/d37f0161740c5576854dc5b08f191250f260688b/src/go/lib/pginfo/pginfo.go#L60
https://github.com/percona/percona-toolkit/blob/8e7113d4577e1e8adbfcd73ec6eff1c7afa8cdea/src/go/pt-pg-summary/models/databases.xo.go#L17

Either the tool should expect (and ignore/skip) a null string, or a query should be modified to skip database with datid 0 (I guess this is preferable, but please do comment on this ). Should be an easy fix.

pg11

pg12

It looks like pt-pg-summary project includes some integration testing with PG of various versions in docker, although lines 52-55 seems to have suffered some copy-paste issues. https://github.com/percona/percona-toolkit/blob/8e7113d4577e1e8adbfcd73ec6eff1c7afa8cdea/src/go/pt-pg-summary/internal/tu/tu.go#L52

Jobin Augustine June 19, 2020 at 4:25 PM

Consistently reproducible.

Steps:

  1. Install PostgreSQL on RHEL 7.6

  2. Run pt-pg-summary

 

Duplicate

Details

Assignee

Reporter

Priority

Smart Checklist

Created June 19, 2020 at 4:23 PM
Updated February 29, 2024 at 8:58 PM
Resolved June 23, 2020 at 8:54 AM