PostgreSQL optimizations for CoW FS

2023-02-22 Thread HECTOR INGERTO
Let’s say we have to run a PostgreSQL instance on top of a copy on write filesystem like ZFS or BTRFS. In adittion to set full_page_writes = off, what other optimizations can be done on the PostgreSQL side? Regards, Héctor

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

2023-01-18 Thread HECTOR INGERTO
, the replica hotspare and the proper backup. De: Laurenz Albe<mailto:laurenz.a...@cybertec.at> Enviado: miércoles, 18 de enero de 2023 11:02 Para: HECTOR INGERTO<mailto:hector_...@hotmail.com>; Magnus Hagander<mailto:mag...@hagander.net> CC: pgsql-gene...@postgresql.org

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

2023-01-17 Thread HECTOR INGERTO
> Another case: a transaction COMMITs, and a slightly later transaction reads > the data > and sets a hint bit. If the snapshot of the file system with the data > directory in it > is slightly later than the snapshot of the file system with "pg_wal", the > COMMIT might > not be part of the

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

2023-01-16 Thread HECTOR INGERTO
> The database relies on the data being consistent when it performs crash > recovery. > Imagine that a checkpoint is running while you take your snapshot. The > checkpoint > syncs a data file with a new row to disk. Then it writes a WAL record and > updates > the control file. Now imagine

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

2023-01-16 Thread HECTOR INGERTO
I have understood I shall not do it, but could the technical details be discussed about why silent DB corruption can occur with non-atomical snapshots?

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

2023-01-15 Thread HECTOR INGERTO
ode should know on which DB the requested data is. De: Magnus Hagander<mailto:mag...@hagander.net> Enviado: domingo, 15 de enero de 2023 20:36 Para: HECTOR INGERTO<mailto:hector_...@hotmail.com> CC: pgsql-gene...@postgresql.org<mailto:pgsql-gene...@postgresql.org> Asunto: Re: Are

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

2023-01-15 Thread HECTOR INGERTO
Hello everybody, I’m using PostgreSQL on openZFS. I use ZFS snapshots as a backup + hotspare method. >From man zfs-snapshot: “Snapshots are taken atomically, so that all snapshots >correspond to the same moment in time.” So if a PSQL instance is started from >a zfs snapshot, it will start to