Skip to content

Connection log import fails on Postgres 13 (W) #283

Open
@smurthys

Description

@smurthys

Running the function classdb.importConnectionLog on an instance of Postgres 13 fails to import any data. Here is an example of the result table the function returns when the function is run without any parameter:

logdate numconnections numdisconnections info
2021-02-26T00:00:00Z 0 0 extra data after last expected column

The failure to import is due to an exception, but the content of the column info in the result table does not include any hint there was an exception.

Looking into the code and Postgres docs, the failure to import is due to Postgres 13 adding a new column (named backend_type) to the server log. The solution is to conditionally include the new column in the temporary table ImportedLogData.

Further, it will help to to prefix the text in the info column with a string such as exception: instead of placing just the value of SQLERRM in that column when an exception occurs.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions