Re: Can PostgreSQL create new WAL files instead of reusing old ones?

From: Andres Freund <andres(at)anarazel(dot)de>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Vick Khera <vivek(at)khera(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: Can PostgreSQL create new WAL files instead of reusing old ones?
Date: 2018-04-27 17:33:40
Message-ID: 20180427173340.6vzhjrkzsd2yxvei@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2018-04-27 12:28:25 -0400, Bruce Momjian wrote:
> On Wed, Apr 18, 2018 at 09:34:50AM -0400, Vick Khera wrote:
> > On Wed, Apr 18, 2018 at 12:35 AM, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> >
> >
> > That looks like a rather difficult problem to solve in PostgreSQL
> > itself, as the operator running the cluster is in charge of setting up
> > the FS options which would control the COW behavior, so it seems to me
> >
> >
> > You cannot turn off CoW on ZFS. What other behavior would you refer to here?
> >
> > I suppose one could make a dedicated data set for the WAL and have ZFS make a
> > reservation for about 2x the total expected WAL size. It would require careful
> > attention to detail if you increase WAL segments configuration, though, and if
> > you had any kind of hiccup with streaming replication that caused the segments
> > to stick around longer than expected (but that's no different from any other
> > file system).
>
> Uh, at the risk of asking an obvious question, why is the WAL file COW
> if it was renamed? No one has the old WAL file open, as far as I know.

Because it's a COW filesystem that doesn't overwrite in place. That's
how snapshots etc are implemented.

Greetings,

Andres Freund

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Steven Lembark 2018-04-27 19:50:41 Re: Long running INSERT+SELECT query
Previous Message Michael Loftis 2018-04-27 17:25:09 Re: Asynchronous Trigger?