Thread: Write Logical Replication Spill Files to different volume

Write Logical Replication Spill Files to different volume

From
Klaus Darilion
Date:
Hello!

If I understand it right, the logical replication .spill files in the 
pg_replslot subfolders are temporary files that need not survive server 
crashes (as on postgresql restart the WAL senders will delete old spill 
files, start again reading WAL and regenerate the spill files if 
necessary).

For big transactions with plenty of replication slots, the spill files 
may consume plenty of disk space. I think it would be useful to have the 
spill files on a different disk, ie the "normal" database files and the 
pg_replslot status file are on a high available volume (DRBD, shared 
storage ...) whereas the spill files are only on local disks.

Is this already possible? If not, are there reasons why that should not 
be done?

thanks
Klaus