Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
PostgreSQL Administration Essentials

You're reading from   PostgreSQL Administration Essentials Discover efficient ways to administer, monitor, replicate, and handle your PostgreSQL databases

Arrow left icon
Product type Paperback
Published in Oct 2014
Publisher Packt
ISBN-13 9781783988983
Length 142 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

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...
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 $19.99/month. Cancel anytime