CYBERTEC PostgreSQL Logo

Reducing log messages on the client

06.2014 / Category: / Tags:

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.

In order to receive regular updates on important changes in PostgreSQL, subscribe to our newsletter, or follow us on Facebook or LinkedIn.

One response to “Reducing log messages on the client”

Leave a Reply

Your email address will not be published. Required fields are marked *

CYBERTEC Logo white
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