Skip to content

pg.stat_table: Zabbix trapper unsupported if table created with double quotes #48

@andreyhammer

Description

@andreyhammer

If table created like:
CREATE TABLE "Table" ( ... );
pgsql_tbl_funcs.sh return error like:
relation public.table not found
because public.table != public.Table
I fixed this issue by addin double quotes around ${TABLENAME} in select pg_total_relation_size:
select '\"$HOST_NAME\"', 'psql.table_total_size[$DBNAME,$SCHEMANAME,$TABLENAME]', $TIMESTAMP_QUERY, (select pg_total_relation_size('${SCHEMANAME}.\"${TABLENAME}\"'))" 2>&1

please review and fix if necessary

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions