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 1tdo39-009cGj-1C for pgsql-hackers@arkaria.postgresql.org; Fri, 31 Jan 2025 10:14:59 +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 1tdo37-00HCe8-Id for pgsql-hackers@arkaria.postgresql.org; Fri, 31 Jan 2025 10:14:57 +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 1tdo37-00HCe0-86 for pgsql-hackers@lists.postgresql.org; Fri, 31 Jan 2025 10:14:57 +0000 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tdo34-002RaB-1p for pgsql-hackers@postgresql.org; Fri, 31 Jan 2025 10:14:55 +0000 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-436202dd730so12685765e9.2 for ; Fri, 31 Jan 2025 02:14:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1738318493; x=1738923293; darn=postgresql.org; h=message-id:date:content-id:mime-version:comments:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=mfazpo5+MUPPaadl3jLQlZdZyO+Bf+vrF/lAnN1SdG4=; b=ZZ7Yl7PANePpQSLNt4U2IXP+P02WwiAzEZsnhApJDa5BP6GPuUhDLEIgwz6pFtXrMj kHT4szuDn3KDEv9IMhHNKneJp8nP9ZKULWm2fEmKNl3AkTztB+JCrDMZa6ZKVzOMlPlp p9G18F7XTv86aXCg/9pJclEkWZRZXbGCwG2F4/tkVum4DZXc7xrDf8UT8leSajOsyBYc Xyn4L5/EnC4k6V1E3rRe3IMbD48kAbcoWxfKDwDTXgs6o9D4hyHcjNF7EHQ9FGpn/gbJ cqShhpPooAohGDFuB5GUn2KUe9IEy/xn2DLzbQqfWLVkXHGZ8U8lPEmnQjluwb7yl/pV r6XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738318493; x=1738923293; h=message-id:date:content-id:mime-version:comments:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mfazpo5+MUPPaadl3jLQlZdZyO+Bf+vrF/lAnN1SdG4=; b=gZFtiXGn2ZV0prw0s3Jo5CHIaBBFjW0uRXAqDSITNtz/gr8RHxgEDHuPr+KavkNnTw rcrrWGBfrpvGVuuUjSMAdpNE8XZPJsOVSSPc/mQbsowYBREDjU/84xQ32loQHASfA3FG 6g4WDG3ooA97qtMhCVGlHt6YsONCSg3Y9i4jbgfNJVkUAbNPyV4o7qJYyy1eFIeeIgbM 3Om28ACQBf5BohwBDWq+3KyDzS5C6NaqLWfsrqwHxihkbzDcuR0Pdd2zwmuKL7/+OQhH baMmKNm7FR+3GmuUQAJfgjm9V1Hvyp+rYUTB/ABweP2lp8lSZdxGNXAMVFmlKabY+gR6 vX3Q== X-Forwarded-Encrypted: i=1; AJvYcCUYc+Fbbe3F74WI+UK0RRxlYs9aeLDk8e5TvAsVTou2SqBqzo+jy+15x+3tUKlLvK4CPNZIyif+6wSlYuwy@postgresql.org X-Gm-Message-State: AOJu0YwqdhjJSI6kkZhsIsMjFgRG4yN4ViRU15FcMJWTE2Oy6IaFPRDB 4lqcJ0pAXOK1mFgP9KyU8nycEsjfol2OC3oUmXL0qdteNDnNO1RYApB0+bRkHm4= X-Gm-Gg: ASbGncsvsnoiOTgR1zFC7Q+a+9nE4owmVifZoqCUbyvbgK/WVqlwPB9eYRwQgr9Tqeb njx+OI7bq8QYRGLBPdbfn6eBkXN9q6+OVKInh0oyvE6vv0yWqxUTatEmWHOmZT54acUp7zX1mKE QwYoaualU2jbHJVb+aQnFCdOCC0wN6vDTtjnI1YvTo6lJlL/rD7e92eXYYetLisXUMcp/HDqH44 JtV2Tc2lmOWt5rF6l+dAztLVDRI1C1nBsEb+IIm87dwQmPJbQDkW6AqKbP/eNfGnGXibKn32MXo 6zH7eFBoQZbibvToWhE= X-Google-Smtp-Source: AGHT+IEXi3r2qJVCA/s5qtSjEAIR8dPVsm6k7ZhBZEUYAJWamVoNj6ZQUll8xS1lQ8GGDTdVxtAXsw== X-Received: by 2002:a05:600c:5486:b0:433:c76d:d57e with SMTP id 5b1f17b1804b1-438dc3a40d3mr109060995e9.5.1738318492727; Fri, 31 Jan 2025 02:14:52 -0800 (PST) Received: from antos (109-81-174-36.rct.o2.cz. [109.81.174.36]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438e23e6b62sm50205245e9.24.2025.01.31.02.14.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jan 2025 02:14:52 -0800 (PST) From: Antonin Houska To: Alvaro Herrera cc: Michael Banck , Junwang Zhao , Kirill Reshke , Pavel Stehule , Michael Paquier , PostgreSQL Hackers Subject: Re: why there is not VACUUM FULL CONCURRENTLY? In-reply-to: <202501310932.ugw3k5c4orgv@alvherre.pgsql> References: <202501310932.ugw3k5c4orgv@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Fri, 31 Jan 2025 10:32:00 +0100." X-Mailer: MH-E 8.6+git; nmh 1.8; GNU Emacs 28.3 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <24724.1738318524.1@antos> Date: Fri, 31 Jan 2025 11:15:24 +0100 Message-ID: <24725.1738318524@antos> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alvaro Herrera wrote: > On 2025-Jan-31, Antonin Houska wrote: > > Something that Robert Haas just mentioned to me is handling of row > locks: if concurrent transactions are keeping rows in the original table > locked (especially SELECT FOR KEY SHARE, since that's not considered by > logical decoding at present and it would be possible to break foreign > keys if we just do nothing), them we need these to be "transferred" to > the new table somehow. The current implementation acquires AccessExclusiveLock on the table (supposedly for very short time) so it can swap the table and index files. Once we have that lock, I think the transactions holding the row locks should no longer be running. Or can the row lock "survive" the table lock somehow? -- Antonin Houska Web: https://www.cybertec-postgresql.com