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.94.2) (envelope-from ) id 1s95H3-00HDKN-6Z for pgsql-general@arkaria.postgresql.org; Mon, 20 May 2024 15:50:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1s95H2-0030tu-Mg for pgsql-general@arkaria.postgresql.org; Mon, 20 May 2024 15:50:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s95H2-0030tm-8Q for pgsql-general@lists.postgresql.org; Mon, 20 May 2024 15:50:04 +0000 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1s95Gv-0018vH-QC for pgsql-general@lists.postgresql.org; Mon, 20 May 2024 15:50:03 +0000 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1f2ecea41deso70834355ad.1 for ; Mon, 20 May 2024 08:49:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716220197; x=1716824997; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=sPMCQ4CnOh6xg/Dt29HgLpk4ZUbPfRtM7fPgy+5beEs=; b=d5K6g8udcTBVnYHWYIPuLQ19aaEClzF3T+usXuzMdB+RhI1T+H7pagu0yi7hyJRjDT ji8o2/V74IYbieX1c9iSmxyxHmX3IlrIu3zvXQYt/quiUCiwEmJBr5d429jSeMNh+GGn GF8b8+I0SnH+vmaoTBOPhBVgVF1hrU+jW65+su/FN/FrGC7TpeITdK+/qE2PHRDNFU5z 9uNSV0x2SWPaUq1MUG5LiE9S1DL80LK3ei9IINBcJwPVrPagSrVrf7rz6ethH18pCRGf SvwSN2uSOiI61xHBKFxcOqhx159lfOyjte2dcD5X/0zVWrj4Htb3TMXyGODh4yiEVUvL ofeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716220197; x=1716824997; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=sPMCQ4CnOh6xg/Dt29HgLpk4ZUbPfRtM7fPgy+5beEs=; b=YgHxcVqT4kBMCPmDX+VTLznzIBYvRVZiiEp93JWiFNF5e+6ssqWEaJ6O+3bBVpQ2fX +sHEoOn76K8pMpm5mkA23uyfp6/6RNCyWmZ91ECG88DIUu0cc4rdFUspD+w8CVOgCJbu h0u12FKCPJIMqRcmMuT7knrdvBq5ZctsA8TCI2aWkqFXDn5ir6QrnvQUZGJqDxb5zr9f WMcvryJEiUZ1y/vX+2a0K/WbmWjhSDbgKAiHZROh7puM5dPGwP7yAek6ZNKp4p1vUq+/ fCwXRxs7TxnwzICNzsZ9wJEJ5BQ641N0Z+tBK+82h1lFO3E0a3QVd6rtswxQDXHeeXKG 89Iw== X-Forwarded-Encrypted: i=1; AJvYcCW0dTNfLgjORV5UVKCIsEziyn04iQRZlMMfZqbgUIxzapOQpHxUdydSxHyQ3URsDt1Vf9/kpd8uP9FizdEDogH/N+PJaIQCwfiwRc6A06X7yxzw X-Gm-Message-State: AOJu0Yx5D3oPeVNBru6+2OH3jVGZM5yV/aN3nhQg1ESBSuwj+gYr7YHG JGganltyAEb/qgfXFELqnvLQmXM6BXHecFHPQCcgVCeEOHqHuPW1yOTtGhe0sn/109svhvgt7gb 9Zl4lQJAfIHYmPteVJRJBii5xHxM= X-Google-Smtp-Source: AGHT+IFz4zLmv6B30aKl4fY4ImXxKANVWI7/vVlC9i87Lr+0xH/zSlLshWDlKC8EEYevGSM7kaCDW3uVnC4nSSl4YPo= X-Received: by 2002:a17:90a:590d:b0:2b3:e307:949a with SMTP id 98e67ed59e1d1-2b6cc76d3a1mr24706799a91.28.1716220196967; Mon, 20 May 2024 08:49:56 -0700 (PDT) MIME-Version: 1.0 References: <3508051.1716215042@sss.pgh.pa.us> In-Reply-To: <3508051.1716215042@sss.pgh.pa.us> From: PetSerAl Date: Mon, 20 May 2024 18:49:46 +0300 Message-ID: Subject: Re: pg_dump and not MVCC-safe commands To: Tom Lane Cc: Guillaume Lelarge , pgsql-general@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > However, it would be the very same > database state that any other query would see at that time. Other queries can use different techniques to prevent this. For example, lock tables before snapshot, as recommended in documentation. I understand, that pg_dump can not use that, as it need snapshot to enumerate tables to lock. > then you brought > that on your own head by using TRUNCATE concurrently with other > operations. People, who admins database servers, are not always the same people, who write application/queries. That means, if you know nothing about application, you can not guarantee, if live database backup would be consistent. Basically, you need application cooperation to make consistent live database backup.