This page is intentend to contain my patches which was applied to 7.1.x CVS tree, but did not find a way to 7.0.x (which is a stable now). I successfully use all these patches on really heavily loaded server (approximatly 1M queries per day). That's why I think they can be useful for other people.
Cache position patch to avoid extra lseek syscalls. Should be applied in src/backend/storage/file. This patch allow file system abstraction layer to remember current position, and do not produce lseek when we are in the position we want to seek to. However it sets current position to unknown when error is occured.
Fix "connection broken by server" detection on some Linux systems. Should be applied in src/interfaces/libpq dir. Some Linux systems have a bug in network layer. Sometimes read syscall when applied to sockets can return ECONNRESET before all data is read. This leads to incorrect detection of connection is broken by server situations. They detected as general network errors.
Fix small memory leak. Should be applied in src/backend/catalog/ dir.
Transactions support for Large Objects (LOs). Should be applied in root dir. This patch changes the logic of how LOs are stored. In 7.0.x they are stored in separate relations with index. This leads to many problems: when there are many LOs (>10000), system catalog is bloated, and regular queries becames really slow. Another problem was creating/dropping LOs in TX. If TX is rollbacked these operations are not, because in 7.0.x dropping/creating relation is not rollbackable.
If you have any questions, mail me at dyp@perchine.com