patternsqlMinor
PostgreSQL fsync off for a single database
Viewed 0 times
postgresqlfsyncdatabasesingleforoff
Problem
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.Solution
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
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.Context
StackExchange Database Administrators Q#114583, answer score: 5
Revisions (0)
No revisions yet.