I have a write-intensive database stored in PostgreSQL v9.4.4 and it causes IO on my device. I'd like to switch fsync
off for only a single database, not PostgreSQL server wide. (I accept that it can cause corruption when unexpected shutdown occurs). Help me find out how to make it.
PostgreSQL fsync off for a single database
performancepostgresqlpostgresql-9.4postgresql-performance
Related Question
- Postgresql – Recover PostgreSQL database from WAL errors on startup
- Postgresql – Finding the current prices for n Fuelstations at a certain point in time
- Postgresql 9.6 best settings for large admin work (min_wal and max_wal)
- Postgresql – Large bulk insert performance difference PostgreSQL vs MariaDB (InnoDB)
- Postgresql – Disk space efficient foreign key index for insert intensive scientific database
Best Answer
You might want to check unlogged tables, they do not produce WALs at all. But of course if crash happen - all data from them will be lost and they cannot be replicated.
Also there is much safer setting
synchronous_commit
which could reduce IO and it's possible to set it per session or per user/database.