Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
PostgreSQL Administration Essentials

You're reading from  PostgreSQL Administration Essentials

Product type Book
Published in Oct 2014
Publisher Packt
ISBN-13 9781783988983
Pages 142 pages
Edition 1st Edition
Languages

Configuring the amount of log output


In this section, we will discuss how to control the amount of log produced by the database. The default configuration of PostgreSQL provides us only with error messages. Sometimes, this is just not enough. The goal of this section is to provide you with all the information you need to make PostgreSQL more verbose.

The central configuration variable here is log_statements:

log_statement = 'all'             # none, ddl, mod, all

Let's see the description of the variables used in the preceding code snippet:

  • none: In this case, only error messages are logged (syntax errors, panics, fatal errors, and so on).

  • ddl: At this level, we will already log all errors, including all commands that change the data structure (CREATE TABLE, ALTER TABLE, and so on).

  • mod: In this case, in addition to errors and structural changes, we can also log statements, which change data (for example, INSERT, UPDATE, DELETE, and so on).

  • all: In this case, we can finally log all statements...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}