Not able to enable postgresql archive log ?
unable to restart the postgres server after enabling archivelog , we are gettingĀ below error while restarting the postgresql database .
Below steps are we followed to enable archiver.
archive_mode =on # enables archiving; off, on, or always # (change requires restart) archive_command = 'gzip < %p /archivelog/archive_9.6/%f'
while restarting the DB we are getting below error :
FATAL: WAL archival cannot be enabled when wal_level is "minimal"
Solution:
Step 1.Go to postgresql.conf file and change the below parameter the restart the server
wal_level =replica
Step 2.connect the postgres server then check the below parameter to confirm archive log enabled.
$ psql postgres=# show archive_mode; archive_mode -------------- on (1 row) postgres=# show archive_COMMAND; archive_command -------------------------------------------------------- gzip < %p /archivelog/archive_9.6/%f