WAL getting full on db using pg_restore in postgres

116 Views Asked by At

I'm trying to restore my database from a dump. I use the command pg_restore -Fc -j 8 mydumpfile -c and while in the process of restoring the tables the WAL keeps growing up to a point where the db crashes because the filesystem of where the WAL is located gets full.

I have a replicated SYNC architecture where I am trying to restore to the primary instance, while in the restoration process the WAL keeps getting larger and larger and the db ends up crashing when the filesystem is full.

How can I prevent the WAL to grow so large while in the process ?

  • Do I need to disable replication ?
  • I have archive_mode = on do I need to change ?
  • I have commented out the option #wal_keep_segments = 10 do i need to change it ?
0

There are 0 best solutions below