Postfix, MySQL lookups and Temporary lookup failure 1

After setting up postfix to use mysql as lookup backend for alias or virtual or whatever table, everything seems ok. Mails are delivered. But sometimes strange "Postfix SMTP server: errors from " e-mails are received. Usually more than one in the same second, then there can be no errors for days or weeks. Then they appear again. There is a "Temporary lookup failure" or "queue file write error" cited in those error e-mails but everything seems to work ok again. Even those e-mails that get error on first try get delivered on second try some minutes later. One thing to look out for is