Re: Are ZFS snapshots unsafe when PGSQL is spreading through multiple zpools?

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: HECTOR INGERTO <hector_25e(at)hotmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org <pgsql-general(at)postgresql(dot)org>" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Are ZFS snapshots unsafe when PGSQL is spreading through multiple zpools?
Date: 2023-01-15 22:07:17
Message-ID: CABUevExTcY=zQqh=nhUJrpPZYr7Cf9DeBmpH0oUPaURjGv0RgA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Jan 15, 2023 at 10:57 PM HECTOR INGERTO <hector_25e(at)hotmail(dot)com>
wrote:

>
>
> > But you cannot and should not rely on snapshots alone
>
>
>
> That’s only for non atomic (multiple pools) snapshots. Isn’t?
>

Right. For single-filesystem installs it should be fine. Just make sure it
has both the data and the WAL directories in the same one.

> If I need to rely only on ZFS (automated) snapshots, then the best option
> would be to have two DB? Each one in each own pool. One HDD DB and one SSD
> DB. Then, the backend code should know on which DB the requested data is.
>

You could. I wouldn't -- I would set it up to use proper backups instead,
maybe using snapshots as the infrastructure. That gives you other
advantages as well, like being able to do PITR. It's a little more to set
up, but I'd say it's worth it.

//Magnus

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alan Hodgson 2023-01-15 22:15:40 Re: pg_upgrade 13.6 to 15.1?
Previous Message pf 2023-01-15 21:59:33 Re: pg_upgrade 13.6 to 15.1?