pt-pg-summary crashing in RHEL 7.6
Description
Environment
is duplicated by
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 PMEdited
Issues introduced by PG commit https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=77bd49adba4711b4497e7e39a5ec3a9812cbd52a

Sergey Kuzmichev June 19, 2020 at 4:44 PMEdited
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:
Install PostgreSQL on RHEL 7.6
Run pt-pg-summary
Details
Assignee
UnassignedUnassignedReporter
Jobin AugustineJobin AugustinePriority
High
Details
Details
Assignee
Reporter

Priority
Smart Checklist
Open Smart Checklist
Smart Checklist
Open Smart Checklist
Smart Checklist

$ ./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