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 1s8zM0-00GZbB-4w for pgsql-general@arkaria.postgresql.org; Mon, 20 May 2024 09:30:49 +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 1s8zLz-0003rg-VL for pgsql-general@arkaria.postgresql.org; Mon, 20 May 2024 09:30:47 +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.94.2) (envelope-from ) id 1s8WE7-00BMoz-2l for pgsql-general@lists.postgresql.org; Sun, 19 May 2024 02:24:43 +0000 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1s8WE3-000xqW-Tp for pgsql-general@lists.postgresql.org; Sun, 19 May 2024 02:24:42 +0000 Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1e3c3aa8938so44981655ad.1 for ; Sat, 18 May 2024 19:24:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716085479; x=1716690279; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=eUBMAC8dG47ZiiGqW1Q/o8tnx2n2iZCcuyXf7ySv5ns=; b=Dj305rMUc9NOrEy8HkKNjrObfSxIln2HX4ZbKM4xH0LSZWNC/JLLxWqwhf4xY1TnuK 0C94JU4KmBqyGdedu6ujFNPO2WQ7G+5fsOhq86IoO/altqnYZW3rf5aypcAi5R64jnUK XEyfzWdBWw1GFwqLhl1CrtALbjpXVfcbaWGpCAb0eHFviETRgFDMBVHj95qgNglwlMrq H83N/Srf9HzWnVVWTsiURcKxnaYLLceFddV+CLv/rwAfOqL2QFg4Pq7zyPh4EfhVrJFg +FQAud5JaAg/DlCHm58yMQSCjpddLFpeEuvNTW4g6V1M/PqLGUpR9j3zvgCAxuojbLWc 8pmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716085479; x=1716690279; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=eUBMAC8dG47ZiiGqW1Q/o8tnx2n2iZCcuyXf7ySv5ns=; b=jAaFWFta5+aHbrHSlckrf8vpIis6YR1Vum9PV7LEtTLCk8c0Mi1OaEpeopYEzcGTEk Kk/eBTodFNbjDoDyrbY9yVDOKTCr9DZIOmUnPmZTQODuO4jAdy0ry4lnlxL8ihy9ui/w MqZ3rZJeo1iib87P5llyRm1h//NlvoM+CUS81NNcpcLeP2C3BGxNKyjhLv98AVijqqrS 667kAnr2XazCp7fLA3M7xlELr1Xq0aqg1gLQj/lT6d7rxUxdnV8hlaotJeP28X4VQZzM i3l5vOVuU12fQyT7+NT3dvSdYR1yyWCgvA89SBZugbEtvQ2O1oKWLJVdvdyVfnTLEqkE iNUw== X-Gm-Message-State: AOJu0YxqeVo6T/zuMbB8MVdqDm84vdyGnwM7U1J4RodmCqcdqTuhMGCw LH1ZJzEgItwceleF9+trPb6DY8Z3UisztarLuH7Xc3Nx02c4ahcUGoaQRICcFdzo3h4EorLahSQ sWPK73k1+oXleUhbRHJxFC06iT8LeCcj3563IEg== X-Google-Smtp-Source: AGHT+IEQ8xEUsGqgnUMVUrSxmWh/UrI1hXYiaca+ne/hZtQOjAbMijZkvhpamGP2PZdYFvSmEHlmO027adUOqMe3Syo= X-Received: by 2002:a17:90b:3845:b0:2b9:fc4f:7f67 with SMTP id 98e67ed59e1d1-2b9fc4f80f5mr10369065a91.32.1716085478826; Sat, 18 May 2024 19:24:38 -0700 (PDT) MIME-Version: 1.0 From: PetSerAl Date: Sun, 19 May 2024 05:24:28 +0300 Message-ID: Subject: pg_dump and not MVCC-safe commands To: 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 How pg_dump interact with not MVCC-safe commands? As I understand, pg_dump first take snapshot and then lock all tables it intended to dump. What happens if not MVCC-safe command committed after snapshot but before lock? From comment to pg_dump.c I understand that it may fail with 'cache lookup failed' error. But, can it happen, that pg_dump not fail, but instead capture inconsistent dump? For example TRUNCATE committed after snapshot and pg_dump will see result of TRUNCATE but not result of other commands in TRUNCATE transaction?