Summary
One of the advantages of an open source community like the one around PostgreSQL is that it's easy to see what other people struggle with. Watch enough of that, and some trouble spots that aren't too difficult to avoid become obvious. Some of the biggest problems people run into are quite fundamental to PostgreSQL: getting VACUUM
to work properly, making sure your application acquires locks properly, there's a long list of major thing you need to get right. But sometimes the little details can trip you up instead. The tips covered in this chapter—from bulk loading to profiling—might provide the right background trivia to make your use of the database simpler when dealing with the smaller problems, too. And sometimes the answer to your problem is solved simply by using a newer version of PostgreSQL, where it's been engineered out of the database.
- Bulk loading works well using
COPY
, but alternate techniques such as bulk inserts or even add-on...