CYBERTEC Logo

It happens quite frequently that PostgreSQL client applications are flooded with messages from the server. This is both annoying and bad for performance as well as network bandwidth. It seems that many users are not aware of the fact that this flood of log messages can easily be reduced by simply changing the server configuration.

Here is an example showing how log messages can reach the client:

In this example we issue a simple NOTICE. This message will end up in the log as well as on the client:

Just imagine calling this function millions of times (which is perfectly realistic) - all those messages have to go somewhere.

Closing the flood gates …

Reducing the amount of log to a normal level is actually quite simple:

In our example client_min_messages makes sure that an error message has to be at least an ERROR to make it to the client application.

Of course, you can also configure that per user or per database:

PostgreSQL allows a pretty fine-grained configuration here, which can be tweaked to meet your requirements.

Find out more related PostgreSQL hints and tips in our blog posts about setup and configuration.

CYBERTEC Logo white
CYBERTEC PostgreSQL International GmbH
Römerstraße 19
2752 Wöllersdorf
Austria

+43 (0) 2622 93022-0
office@cybertec.at

Get the newest PostgreSQL Info & Tools


    This site is protected by reCAPTCHA and the Google Privacy Policy & Terms of Service apply.

    ©
    2024
    CYBERTEC PostgreSQL International GmbH
    phone-handsetmagnifiercrosscross-circle linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram