Обсуждение: Discourage splitting pg_wal directory

Поиск
Список
Период
Сортировка

Discourage splitting pg_wal directory

От
Greg Sabino Mullane
Дата:
Someone pointed out this morning that we still have this in our docs:

"It is advantageous if the WAL is located on a different disk from the main database files. This can be achieved by moving the pg_wal directory to another location (while the server is shut down, of course) and creating a symbolic link from the original location in the main data directory to the new location."

This is not as important as it used to be, and I would even hazard to say that we should not be encouraging it. There are still use cases for doing so, yes, but "advantageous" is too much. I played with some wording, but at the end of the day, I am thinking that we simply remove this paragraph entirely.

Cheers,
Greg





Вложения

Re: Discourage splitting pg_wal directory

От
Laurenz Albe
Дата:
On Mon, 2024-03-18 at 11:32 -0400, Greg Sabino Mullane wrote:
> "It is advantageous if the WAL is located on a different disk from the
> main database files. This can be achieved by moving the pg_wal directory
> to another location (while the server is shut down, of course) and
> creating a symbolic link from the original location in the main data
> directory to the new location."
>
> This is not as important as it used to be, and I would even hazard to
> say that we should not be encouraging it. There are still use cases for
> doing so, yes, but "advantageous" is too much. I played with some wording,
> but at the end of the day, I am thinking that we simply remove this
> paragraph entirely.

I think it is still a good idea to put data files and WAL on different file
systems.  Perhaps not so much with the intention of distributing I/O across
different disks, but to prevent the data files from filling the WAL disk.

Yours,
Laurenz Albe



Re: Discourage splitting pg_wal directory

От
Greg Sabino Mullane
Дата:

On Mon, Mar 18, 2024 at 11:58 AM Laurenz Albe <laurenz.albe@cybertec.at> wrote:
I think it is still a good idea to put data files and WAL on different file
systems.  Perhaps not so much with the intention of distributing I/O across
different disks, but to prevent the data files from filling the WAL disk.

Cannot say I understand this - if the data files are crowding out the WAL, surely they are moments away from filling the disk on their own. Disk is cheap these days, so I'm not a fan of encouraging complexity if not needed.

Cheers,
Greg


 

Re: Discourage splitting pg_wal directory

От
Laurenz Albe
Дата:
On Tue, 2024-03-19 at 11:04 -0400, Greg Sabino Mullane wrote:
> On Mon, Mar 18, 2024 at 11:58 AM Laurenz Albe <laurenz.albe@cybertec.at> wrote:
> > I think it is still a good idea to put data files and WAL on different file
> > systems.  Perhaps not so much with the intention of distributing I/O across
> > different disks, but to prevent the data files from filling the WAL disk.
>
> Cannot say I understand this - if the data files are crowding out the WAL,
> surely they are moments away from filling the disk on their own. Disk is cheap
> these days, so I'm not a fan of encouraging complexity if not needed.

If you run out of disk on the data files, you get an error and life goes on.

If WAL runs out of disk space, PostgreSQL will crash.

Yours,
Laurenz Albe