Skip to content

Log level to notice #1607

Closed
Closed
@AntoniJakubiak

Description

@AntoniJakubiak

Hello,

Currently, PGML functions are using INFO log level.
There are several problems with this.

The most important, is that INFO level logs cannot be disabled by setting client_min_message.
https://www.postgresql.org/docs/current/runtime-config-client.html

INFO level messages are always sent to the client.

Could you please change the log level to NOTICE?

The root of the problem lies PostgreSQL SQLX driver, here:
launchbadge/sqlx@53766e4
In version 0.7.* the structure Fields contains the offset: u16 - and offset (notice) could be longer the u16 which sometimes occurs in pgml.train function.

/// An iterator over each field in the Error (or Notice) response.
struct Fields<'a> {
    storage: &'a [u8],
<    offset: u16, 
>   offset: usize,
}

It seems, it was fixed in SQLX 0.8.1.

But still, it is better to send not mandatory data on the NOTICE level.

Kind regards
Antoni Jakubiak

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