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 1s6cJt-000ixd-FM for pgsql-hackers@arkaria.postgresql.org; Mon, 13 May 2024 20:30:50 +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 1s6cJs-005DYz-S0 for pgsql-hackers@arkaria.postgresql.org; Mon, 13 May 2024 20:30:48 +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 1s6cJs-005DYr-IY for pgsql-hackers@lists.postgresql.org; Mon, 13 May 2024 20:30:48 +0000 Received: from mail-oi1-x22e.google.com ([2607:f8b0:4864:20::22e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1s6cJl-0003Ll-NW for pgsql-hackers@postgresql.org; Mon, 13 May 2024 20:30:46 +0000 Received: by mail-oi1-x22e.google.com with SMTP id 5614622812f47-3c862c613fcso2827566b6e.3 for ; Mon, 13 May 2024 13:30:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1715632241; x=1716237041; darn=postgresql.org; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=pk6DiVUTDqsa5ezrKapAEfwJhs07CEzYxsv1FvASuN8=; b=ErVJqV1e5XQvHlbQk9g1fxR3lw251dHFBcCesBaJmFqxWJBlmLBLHI4BNo8RgnXfeI Yx6I2GK9WiuCUKNLhLEPAgq4c+CvyPWznM7bW4wzspZoR6CxNYFnNZX9i/TFC0VnZAXq KGg3NjvMlwdGWQhlRGrbGlNmYqHvHPMLgN33Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715632241; x=1716237041; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=pk6DiVUTDqsa5ezrKapAEfwJhs07CEzYxsv1FvASuN8=; b=UHfXhpIFME+h8wbuL5PVvZf1z/MdUEHb6zfjfgCGGnLqiq0riBo9C3uYxDQFACv4D5 qJiy3Tu9b/emKRjEtg6N609AL4Tzday5VX/YXtfgGHMWJwoTwDoHQecSMe3B3VkgwaTZ QlSWZmsg+oVz6fU8AiLK08aVAbds9SBN5YosQDx8knzlEBGkRWW2Z82K/pfVBPgd4gUp FX0JQM5hkD73Hp5dyyFVYtpzKKIPWEBj41qQ4G/7oFwKlYJfUbdD543gqxOpJwzG6K6S H/2e8+0r3pXz3GKJxBuiBnDavMic+wh6zpy7ntVGmDMfJV4TYMd+cJG3VE5qQSe6FBh1 N4/Q== X-Forwarded-Encrypted: i=1; AJvYcCVx6NOT0QIJPjZ/ueSQEsD1RAolZ6WZCzEXGvfYS2PbgB7xiMJz/z8JSKjpfcpleDQE3eNi+oZ+iNh0EmhoxHjaVmORRa0vQvSAxYV6 X-Gm-Message-State: AOJu0Yy0OJKiTsravKtUrf7TkOz2d5BAH6PTcWToHqIBY7SS4yOE/30r mye6Q1Xv1glTO6ikgvKlKDEUxhZivmYSEbawl2B6knO79poB+TNaR36GlEjxsQ== X-Google-Smtp-Source: AGHT+IE0zCxyppSSk3qu/hXa2CrdMZl3l+wkj5I/T9HIgje8S/ISnxcEhLBT115sI+9syZJMTDD0yw== X-Received: by 2002:a05:6808:17aa:b0:3c9:79c7:b86 with SMTP id 5614622812f47-3c9970ba3d2mr14658960b6e.46.1715632240945; Mon, 13 May 2024 13:30:40 -0700 (PDT) Received: from google.com ([2600:1702:a20:5750::48]) by smtp.gmail.com with ESMTPSA id 5614622812f47-3c995712ed0sm1421545b6e.25.2024.05.13.13.30.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 May 2024 13:30:40 -0700 (PDT) Date: Mon, 13 May 2024 13:30:38 -0700 From: Noah Misch To: Robert Haas Cc: Tom Lane , Smolkin Grigory , pgsql-hackers@postgresql.org Subject: Re: race condition in pg_class Message-ID: <20240513203038.d7.nmisch@google.com> References: <20231027044404.7e.nmisch@google.com> <20231027184832.9b.nmisch@google.com> <1596629.1698435146@sss.pgh.pa.us> <20231027214946.79.nmisch@google.com> <1617596.1698446455@sss.pgh.pa.us> <20231027232612.99.nmisch@google.com> <20231102030915.d3.nmisch@google.com> <20240512232923.aa.nmisch@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/2.2.12 (2023-09-09) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, May 13, 2024 at 03:53:08PM -0400, Robert Haas wrote: > On Sun, May 12, 2024 at 7:29 PM Noah Misch wrote: > > - [consequences limited to transient failure] Since a PROC_IN_VACUUM backend's > > xmin does not stop pruning, an MVCC scan in that backend can find zero > > tuples when one is live. This is like what all backends got in the days of > > SnapshotNow catalog scans. See the pgbench test suite addition. (Perhaps > > the fix is to make VACUUM do its MVCC scans outside of PROC_IN_VACUUM, > > setting that flag later and unsetting it earlier.) > > Are you saying that this is a problem already, or that the patch > causes it to start happening? If it's the former, that's horrible. The former.