> For the complete documentation index, see [llms.txt](https://docs.percona.com/percona-monitoring-and-management/3/llms.txt).

# fsync is disabled on PostgreSQL configuration

## Description

When this parameter is enabled (which it is by default), the PostgreSQL server tries to make sures that updates are physically written to disk, by issuing fsync() system calls or various equivalent methods mentioned in wal_sync_method.

Turning off fsync can slightly improve performance with the risk of unrecoverable data corruption in case of a power failure or system crash.

Therefore, it is only advisable to turn off fsync if you can easily recreate your entire database from external data. High-quality hardware alone is not a sufficient justification for turning off fsync.

```text
ALTER SYSTEM SET fsync = on;
```

1. Signal the PostgreSQL server to reload the configuration

   ```text
   SELECT pg_reload_conf();
   ```

1. Flush all the pages safely to disk using the initdb utility

   ```text
   $ initdb -D $PGDATA --sync-only
   syncing data to disk … ok
   ```

1. Run sync on the filesystem

   ```text
   $ sync
   ```

## Need more support from Percona?

Percona experts bring years of experience in tackling tough database performance issues and design challenges.
