Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

MySQL has quite a few logs:

  • InnoDB transaction log
  • Binary log
  • General query log
  • Error log
  • Slow query log

I know about Postgresql's WAL, which is equivalent to InnoDB's transaction log (correct?).

What about the other MySQL logs such as bin log - are there Postgresql equivalence of them?

share|improve this question
    
If you could briefly sum up what those logs are on mysql it would be easier for the postgresql-only experts to answer. –  Thomas Aug 14 '09 at 20:33

2 Answers 2

up vote 4 down vote accepted

As MySQL implements multiple storage engines, theres need for both binary log for incremental backups / replication and InnoDB transaction log for ACID compliance (Only with InnoDB storage engine) In postgres, WAL can be used both for replication and ACID compliance, so WAL combines binary log and InnoDB transaction log.

You can make postgres log queries to syslog / separete log with log_statement and log_duration . So you get both query log and with directive log_min_duration_statement you can implement slow query log.

share|improve this answer

I may have gotten some of the details slightly wrong, but I believe that:

As you mention, the WAL is like the innodb transaction log.

All logs tend to be found in /var/log/postgresql/postgresql.log)

There is no binary log file in standard PostgreSQL because it doesn't do replication, unlike MySQL. You can use things like Slony to add replication.

The error log is in postgresql.log

The slow query log also goes into this file.

The general query log is the same as setting the slow query limit to 0ms.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.