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 r
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
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?
> 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 tha
> 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 snap
, 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
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