Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vlWug-000JXs-0a for pgsql-general@arkaria.postgresql.org; Thu, 29 Jan 2026 18:38:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vlWtf-000MO7-0G for pgsql-general@arkaria.postgresql.org; Thu, 29 Jan 2026 18:37:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vlWte-000MNz-0f for pgsql-general@lists.postgresql.org; Thu, 29 Jan 2026 18:37:39 +0000 Received: from fout-a6-smtp.messagingengine.com ([103.168.172.149]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vlWtb-00000000399-1NXt for pgsql-general@lists.postgresql.org; Thu, 29 Jan 2026 18:37:38 +0000 Received: from phl-compute-10.internal (phl-compute-10.internal [10.202.2.50]) by mailfout.phl.internal (Postfix) with ESMTP id A200FEC0583; Thu, 29 Jan 2026 13:37:33 -0500 (EST) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-10.internal (MEProxy); Thu, 29 Jan 2026 13:37:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1769711853; x=1769798253; bh=tugQ+uTmAQUv1k9pkAL25qFL8d2NyXCot2CA4/w3HlA=; b= fXj/4E45+n518Wa3HxQkLDGXFdC5gT3KVX1XI5/cca+QJbOq8VUYTfGZMt4VDE2V zhC19Bi+9Jih/BNvLY07u9lAzFn5KwVk4+K/g5VgVMR8f9hXesqmSZypE5dswljh VTL03iiZ8d17LYbS22IAPMaEbdeg/fRUtdLeUnC3aVSUkWbDB+1jRmXIERmzX/hu Sk8hMLUsjmve8y7/JTlgRAa2gPDfR5GAcMarljFEGZb3tm8DW28X7mjecFHzXJaq QjWF3SnKMcZe0CavCDW0do+xRQkaDVaPNZ3VaFlN5SJDR0R68w0A3x9z4E0cRW0M b/RHFzk6EN/HGzBXm7SuuQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1769711853; x=1769798253; bh=t ugQ+uTmAQUv1k9pkAL25qFL8d2NyXCot2CA4/w3HlA=; b=IW8XpucG7LtynhNZo FuV+uRsx6nfJ0DvuN15u8s/J/1kmtP6N7F4wmFZBQ1lOxreqssAux89wCaVKgMrc uIAmS8Gqa7vhIXHgKVD2dLiMOwHuqFWHdxCipeyBu/sRYr4Kp8ZFTZpNPWs9x/DU T9x150IVYOu18xfP8BovUrLjecg7yUbSOPm+6XmSCIpljdJt9EDKcm3m8Ign3jJr nz/bKkQT1/1Dowu0PlfdmzKkvJ3kQGdVup8dvHOBwVnvX7hAL8rKO5W0nT9b/m2f D1p8XLNG/WHPM1foDzb7E2SfxEslN+KUeaYjjrvIjtqHeeLJoiESqEzsxJTzvDKN eeDJQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdduieeiledvucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtkeertd dtvdejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgr vhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepleegveekkeekue eigfdtveeileeuhfefudefteekjeffkeejueejheegheegkedtnecuffhomhgrihhnpehp ohhsthhgrhgvshhqlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm pdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehpvg htshgvrhgrlhesghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhgvghnvghr rghlsehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 29 Jan 2026 13:37:33 -0500 (EST) Message-ID: Date: Thu, 29 Jan 2026 10:37:31 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: About backups To: PetSerAl , pgsql-general@lists.postgresql.org References: <1730736265.4259921.1769443263077.ref@mail.yahoo.com> <1730736265.4259921.1769443263077@mail.yahoo.com> <2097370962.4296686.1769449473672@mail.yahoo.com> <5efd76b75e527a6558dd69ba4364699f256a813a.camel@tpg.com.au> <259609552.3013229.1769632103875@mail.yahoo.com> <62048030-5073-4bfc-9565-f8af8084bf6c@dalibo.com> Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 1/29/26 9:58 AM, PetSerAl wrote: > On Thu, Jan 28, 2026 at 8:32 PM Guillaume Lelarge > wrote: >> Doesn't matter at all. You'll get a consistent backup. > > But be aware of not MVCC-safe commands like TRUNCATE. > If transaction with such command intersect with beginning of backup, > then it may be not consistent. > It will see effects of TRUNCATE, but will not see effects of other > commands in such transaction. > > From here: https://www.postgresql.org/docs/current/mvcc-caveats.html "Some DDL commands, currently only TRUNCATE and the table-rewriting forms of ALTER TABLE, are not MVCC-safe. This means that after the truncation or rewrite commits, the table will appear empty to concurrent transactions, if they are using a snapshot taken before the DDL command committed. This will only be an issue for a transaction that did not access the table in question before the DDL command started — any transaction that has done so would hold at least an ACCESS SHARE table lock, which would block the DDL command until that transaction completes." And the more general case described here: https://www.postgresql.org/message-id/14781.1266626391@sss.pgh.pa.us " > My questions are: can making DDL changes during a dump cause this error? Are the queries used by pg_dump transactionally consistent, i.e. do they run in a transaction and get a single view of the database system catalogs? Other than finer coordination of jobs, how can this situation be avoided? ... The window for this sort of thing isn't very large, because the first thing pg_dump does is acquire AccessShareLock on every table it intends to dump, and past that point it won't be possible for anyone to modify the table's DDL. But it can happen. ... " There is a small window for this happening in any case. Read the rest of the case for suggestions to mitigate.