pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedconsistent postgresql snapshot
2+ messages / 2 participants
[nested] [flat]
* consistent postgresql snapshot
@ 2022-05-11 15:41 Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>
2022-05-11 23:50 ` Re: consistent postgresql snapshot Ron <ronljohnsonjr@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: Zwettler Markus (OIZ) @ 2022-05-11 15:41 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
PostgreSQL12 running on CentOS7 + ext4.
Would it be save to do a "fsfreeze -freeze" + disk snapshot + "fsfreeze -unfreeze" of the PGDATA filesystem to get a consistent snapshot?
I am wondering as PostgreSQL default blocksize = 8k while ext4 default blocksize = 4k, resulting in 2 fs blocks per db block.
Thanks, Markus
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: consistent postgresql snapshot
2022-05-11 15:41 consistent postgresql snapshot Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>
@ 2022-05-11 23:50 ` Ron <ronljohnsonjr@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Ron @ 2022-05-11 23:50 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
On 5/11/22 10:41, Zwettler Markus (OIZ) wrote:
>
> PostgreSQL12 running on CentOS7 + ext4.
>
> Would it be save to do a "fsfreeze –freeze" + disk snapshot + "fsfreeze
> –unfreeze" of the PGDATA filesystem to get a consistent snapshot?
>
> I am wondering as PostgreSQL default blocksize = 8k while ext4 default
> blocksize = 4k, resulting in 2 fs blocks per db block.
>
If data/base and pg_xlog are on the same filesystem, then it might work.
Be sure to select pg_start_backup('something informative'); beforehand, and
select pg_stop_backup(); afterwards.
For example:
psql -c "select pg_start_backup('something informative');"
fsfreeze –freeze
/disk snapshot/
fsfreeze –unfreeze
psql -c "select pg_stop_backup();"
--
Angular momentum makes the world go 'round.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2022-05-11 23:50 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-05-11 15:41 consistent postgresql snapshot Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>
2022-05-11 23:50 ` Ron <ronljohnsonjr@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox