Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nooTX-00066p-G3 for pgsql-general@arkaria.postgresql.org; Wed, 11 May 2022 15:42:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nooTV-0004jt-OV for pgsql-general@arkaria.postgresql.org; Wed, 11 May 2022 15:42:05 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nooTV-0004jj-48 for pgsql-general@lists.postgresql.org; Wed, 11 May 2022 15:42:05 +0000 Received: from mx4.stadt-zuerich.ch ([194.56.33.13]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nooTS-0003Tk-3z for pgsql-general@lists.postgresql.org; Wed, 11 May 2022 15:42:04 +0000 IronPort-SDR: QDljABzdhLr+XAgf2fb5XI0XT8WMRCnokcB8RUoCvFseTuPrO6kzjuPcXoL7dy1OvJ/t8VCKOa KhViQIVe2DR1KMp/Zd9/NKHYNF0x77nd9/nNJIeijDL02YoD7uPBKaXP8/6lCz3u9/hAQ5IHA7 u1ns+DjZ8fALe/gldJMdX8I9VaCwAjHjS+kdE9UXdhxKxDle0Q249rJDH0LN8HwoU0BKCIG40r 3LxQNnPEl0r4nFxWWTBNLeRl+HgdTCZc3a30G5J+WB9XUKUMYAfx9sW4pTgICfiOg+46sILKMu Gtc= X-IronPort-AV: E=Sophos;i="5.91,217,1647298800"; d="scan'208,217";a="27723396" Received: from unknown (HELO SZHM27374.global.szh.loc) ([10.7.50.70]) by mx4.prm.szh.zone with ESMTP/TLS/AES256-GCM-SHA384; 11 May 2022 17:41:58 +0200 Received: from SZHM27370.global.szh.loc (10.7.50.50) by SZHM27374.global.szh.loc (10.7.50.73) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.18; Wed, 11 May 2022 17:41:58 +0200 Received: from SZHM27370.global.szh.loc ([fe80::25ce:879f:5795:3325]) by SZHM27370.global.szh.loc ([fe80::25ce:879f:5795:3325%10]) with mapi id 15.01.2375.018; Wed, 11 May 2022 17:41:58 +0200 From: "Zwettler Markus (OIZ)" To: "pgsql-general@lists.postgresql.org" Subject: consistent postgresql snapshot Thread-Topic: consistent postgresql snapshot Thread-Index: AdhlTF7Yc7z0tq1bQoizqekiMfE3Qw== Date: Wed, 11 May 2022 15:41:58 +0000 Message-ID: <49bb084a06194e51a2d58421e5f074f6@zuerich.ch> Accept-Language: de-CH, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.7.48.250] Content-Type: multipart/alternative; boundary="_000_49bb084a06194e51a2d58421e5f074f6zuerichch_" MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --_000_49bb084a06194e51a2d58421e5f074f6zuerichch_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable PostgreSQL12 running on CentOS7 + ext4. Would it be save to do a "fsfreeze -freeze" + disk snapshot + "fsfreeze -un= freeze" of the PGDATA filesystem to get a consistent snapshot? I am wondering as PostgreSQL default blocksize =3D 8k while ext4 default bl= ocksize =3D 4k, resulting in 2 fs blocks per db block. Thanks, Markus --_000_49bb084a06194e51a2d58421e5f074f6zuerichch_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Post= greSQL12 running on CentOS7 + ext4.

 

Woul= d 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 =3D 8k while ext4 default blocks= ize =3D 4k, resulting in 2 fs blocks per db block.

 

Than= ks, Markus

 

--_000_49bb084a06194e51a2d58421e5f074f6zuerichch_--