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 1vJfWL-00FPGB-2e for pgsql-general@arkaria.postgresql.org; Thu, 13 Nov 2025 22:10:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vJfWJ-003Qn2-1G for pgsql-general@arkaria.postgresql.org; Thu, 13 Nov 2025 22:10:23 +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 1vJfWJ-003Qmt-02 for pgsql-general@lists.postgresql.org; Thu, 13 Nov 2025 22:10:23 +0000 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vJfWG-007bxK-3C for pgsql-general@postgresql.org; Thu, 13 Nov 2025 22:10:22 +0000 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-b729f239b39so241800566b.0 for ; Thu, 13 Nov 2025 14:10:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1763071820; x=1763676620; darn=postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=bTExK4rr2vo/lHdmaFdCXGYJ7eEBaMZaDP2zg8YF1+w=; b=R37lJ861QNpgFjl8f+QxhX1SlVlnXQtxVHKItGQ1USyVaD8XWRnMxX6Gh0ks5v9YCg WDxkjK+abkDX8opj6qma4dXIC/w+T23kQZn94DcZRZWl9WTHiLP4ndmMl+tyqIPOg10l RzP1MhI2tcCxlqZrJY+xV7HU479KXZ+TpbjRyQZvcusGG8lH9nzHy2IjChISeo6vxSku 3FUMdR0HdB+vGELvJxH2MiqrShUfGmuXCexsh6SmBihNaML3Zh4pE7gphwzCZZpQUIJm zRpdu1LihoYHBxHDAET1ERTxoM3hK1KiaUOS3FLC82Zh+Q3exlFQkzu/Ac/SCiolTtIq Toww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763071820; x=1763676620; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=bTExK4rr2vo/lHdmaFdCXGYJ7eEBaMZaDP2zg8YF1+w=; b=aWoTGoFwhjgGJuNAbWFAb+IRjLmslf/CW3h6W2fJgEq8i/Npg7UjgiBdYbfk2NZiB+ RDGoXFYEVenpnizszKC5gQuf6z6XBTI3hccjhHcDmZ66AfwBXv4HS79PdSbtRd49ha9d PEo5yA07YweVqfjVx2u+/7D58zVeICpWbZ5kWQvYnei1DFVvXZzxCjmslo09qr6TngJj PUQ+xQzSWiPPgB73MpYlqOkejtCTSGuOLkMoMXRSlSpgeAZ04x3Ge+7B81+XJFSxGIN9 PpMVcP1grJJih21A0oRVvFWATzN8BtrwoNw2I5o4JOFCXLLxv2xNCx+OkdKW18JCyMHg ISCQ== X-Forwarded-Encrypted: i=1; AJvYcCUDmTRHAlnoHDK7SFX7c+e2njGT5g58GN16F+tBvU84Afjotf4RjaSmQ7rf/e1fX78NvOBKQMlZ5DiQbMrO@postgresql.org X-Gm-Message-State: AOJu0YxBW0pQvksc+unzomN3I8usG98SwZyCg2o1ROxdghThwmyekVq5 wKHh0JHEERCz8Fm+j7IY69NHntNEo1TZKwTfADHnwg9IpfKI+5sVJbQ9MKo4lb73dMY= X-Gm-Gg: ASbGncuEkZgx3cUUgX/4u5J7CSMdD0w8qYdbyIMeJpzl+Kj/PdN6COIH0JLr/4rx4AW y1T4uoJ3p3LEVsWhuY6MbsgTlu0cfQklqUI//fETm3Vc6YLdKuvutww53p3rD7M0KvOa4m2QKGS 4ObGT4cXZqJ4Ie8Lx7H/Je7ofxRN5xjWGMSxuDOgXBJnYLKsZ4s3mg2NI4NHr2nHI/FB1qsXTRp IxRXGHQz7RzDt7NwEJabynEkku89dMrWheZ/km7vcVkND5AFAxIwoLCsHROjJZBbWGw/LRt7RLn sDFcLPObFbw/MJbTZf75nRUsbgUx4466k1pIG6uYoE4MCAIAUioFC4vCJQJhVl3FLOOPaMT4AHD 9zXJRtIOqZWOtymKhnO0cHgpcYLLF4RYS3UnTbCNUFqLhsYo9tl9MtWQ8zxxTvGEEYIaTZ6uAsu F8h/+np5maIUvr0vd5rh4wI/SjRnxhz+c= X-Google-Smtp-Source: AGHT+IF3HPHs7hI4AgOky5BQS1/Q2VAcdt/Y2Xw3oEYiMQb76tX42LHQf9B6VEaSOxMOwQzy43UyFA== X-Received: by 2002:a17:907:3f1d:b0:b72:b7cd:f59e with SMTP id a640c23a62f3a-b73658aa141mr122631466b.8.1763071820007; Thu, 13 Nov 2025 14:10:20 -0800 (PST) Received: from laurenz.albe-K4N0CV00F97414D ([2001:871:260:ec3c:33a9:6b48:3cf9:2769]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b734e9e0f20sm253882666b.0.2025.11.13.14.10.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Nov 2025 14:10:19 -0800 (PST) Message-ID: <224564d6e38cef32d7b19e90bb15080dbaa79ea0.camel@cybertec.at> Subject: Re: Question about MVCC caveats From: Laurenz Albe To: Jim Nasby , pgsql-general@postgresql.org Date: Thu, 13 Nov 2025 23:10:18 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.2 (3.56.2-2.fc42) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 2025-11-13 at 13:30 -0600, Jim Nasby wrote: > At [1], the docs state that table rewrite ALTERs result in the relation a= ppearing > empty after the ALTER if another transaction had already taken a snapshot= before > the ALTER. A simple test with a repeatable read (or serializable) transac= tion > confirms this... but is there any other situation where a snapshot would = be taken? Snapshots are taken at the start of a statement (or, with REPEATABLE READ a= nd SERIALIZABLE) at the beginning of the first statement in the transaction. What do you mean with an "other" situation? Yours, Laurenz Albe