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 1tpAiQ-001PZr-2m for pgsql-hackers@arkaria.postgresql.org; Mon, 03 Mar 2025 18:40:34 +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 1tpAiO-00E14L-Is for pgsql-hackers@arkaria.postgresql.org; Mon, 03 Mar 2025 18:40:32 +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 1tpAiO-00E14D-8f for pgsql-hackers@lists.postgresql.org; Mon, 03 Mar 2025 18:40:32 +0000 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tpAiM-000liM-0p for pgsql-hackers@postgresql.org; Mon, 03 Mar 2025 18:40:31 +0000 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-390eb7c1024so2707159f8f.0 for ; Mon, 03 Mar 2025 10:40:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1741027228; x=1741632028; darn=postgresql.org; h=message-id:date:content-transfer-encoding:content-id:mime-version :comments:references:in-reply-to:subject:cc:to:from:from:to:cc :subject:date:message-id:reply-to; bh=ixJn60IrRFperqJPJT8f2JTDMTGm23ML1e2r6jljvGI=; b=Js+uzqGDdEzztTveM4EHqxlFquXlGMDT96cE/1v94rzYHxakxmnR4juweh4H7H78z3 A+03Lb/VvUeLP0gJWrj0mBEY+KNhEq8nVN6R4A5ZZ04kB+CgfxyRclZ+y4NFCPvI19pE VWbeOb0H8LS776jezuH90vqufGXiJDpujbdGMge0wtGGRSDCkvDioUqjnovBbUVZcter gJaIM+dwF/+j/G8by4uL8CAeVQB0An5F8gyATkUXPzz8iDHGwGnM58+HqKp0XtjGaLtZ hbbScS7DOxeQ03U+kR3K247POND6hCpQB7qra1Jesv91pZxDridxdhombTPNxvd5thN2 pgow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741027228; x=1741632028; h=message-id:date:content-transfer-encoding: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=ixJn60IrRFperqJPJT8f2JTDMTGm23ML1e2r6jljvGI=; b=JAlxzyVB1A0AjBzmQdYanqrUMCt5CMN2dEZTZtqP5RW9MISR+nIQTRtTdeljrmuPXr J8GXYkECCJ3Fbm0Dx/aD22yvyNyItHMdjTw/w4p7+BbE4OvIdABThnJXm+h7Kj4+3ryC 7DrZg1746EAeg5mxMmKtlvPqSmOO7khf+m1E+FFMb4QHjau4Mtj+MjF3hKdyaxTFRWW+ LTmjwbzgABP1o7TXrNKdf0jVnkxAYX/6oqfe5xsQjRwqckaMUPr+4zlAQ1lPw/+HEwgo mA5Lgptf464e1MSugBkQV5cO2Vw1iMqTgpZ5kqPNMbKfPw8RVucTNGdsBqmT9bveoJlp OWpw== X-Forwarded-Encrypted: i=1; AJvYcCVVi+vp09GxP87tgKjYZEuFcB60F6Z6Mo7PsAaL57/pUIjIUW3v1KEw/hZsGcjCrQpzAJ3I8soyZTSE8p2t@postgresql.org X-Gm-Message-State: AOJu0YzVnep8eCZtqCwSVtiUfkf6VLJd9XsLQE10H6hRp+bi2pZdJxHd GEDUFLs6sfoheBW/j4Av4WSC/XlwbFzKxp8Po3nzt31dhmM3O78g/YTjZpVvlrw= X-Gm-Gg: ASbGncsUIsSV43uULsxIGpXaU93OyfgC/2GmtuoEzrS9328EEGKIIL4Mv8ixYoWiZdZ lzAaxIEGJNZRpinaoLcD1TP3ktj0rHcGBnvgRCQSygpNcPbGxVuYROjSA7RBf5BWK8MBN/bXtv1 BZplE9S3mEYgv9rUSQnTfEzANA+rgUaO4zu6kFEPuk/XBxXkjRC8LHVjXyPlESjEXVnubNsGiYW xmz7ry0t8gx4Xgc/jYlbGuVA5p0XH70Eo4eY+ZKxMMQD7GPGFwSgCS0ZnWspcoKu77uJBdrVrkM I0k+n7rA0I4Cy+mnlINzetjBrQ9e/DmWKBnZaluUTWdIuZKujy7bdCq/ X-Google-Smtp-Source: AGHT+IGVp362XaVcKjuTuZ/1QeqlQTOO7+3RzyPRJeOxIfOxno1QMiWLCU8OSOsPnxPuQ8Ln8r/63g== X-Received: by 2002:a05:6000:4409:b0:38f:3b9b:6f91 with SMTP id ffacd0b85a97d-390ec7cb9bemr6969428f8f.12.1741027228483; Mon, 03 Mar 2025 10:40:28 -0800 (PST) Received: from localhost (109-81-174-36.rct.o2.cz. [109.81.174.36]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-390e47b7b6asm15613343f8f.51.2025.03.03.10.40.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Mar 2025 10:40:28 -0800 (PST) From: Antonin Houska To: Alvaro Herrera cc: Marcos Pegoraro , Michael Banck , Junwang Zhao , Kirill Reshke , Pavel Stehule , Michael Paquier , PostgreSQL Hackers Subject: Re: why there is not VACUUM FULL CONCURRENTLY? In-reply-to: <202503031807.dnacvpgnjkz7@alvherre.pgsql> References: <202503031807.dnacvpgnjkz7@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Mon, 03 Mar 2025 19:07: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: <49791.1741027227.1@localhost> Content-Transfer-Encoding: quoted-printable Date: Mon, 03 Mar 2025 19:40:27 +0100 Message-ID: <49792.1741027227@localhost> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alvaro Herrera wrote: > On 2025-Feb-26, Antonin Houska wrote: > = > > @@ -403,39 +381,38 @@ cluster_rel(Relation OldHeap, Oid indexOid, Clus= terParams *params) > > * would work in most respects, but the index would only get marked = as > > * indisclustered in the current database, leading to unexpected beh= avior > > * if CLUSTER were later invoked in another database. > > + * > > + * REPACK does not set indisclustered. XXX Not sure I understand the > > + * comment above: how can an attribute be set "only in the current > > + * database"? > > */ > = > Regarding this XXX comment, what's going on here is this: a CLUSTER > command needs to remember the index that a table is clustered on. We > keep track of this in pg_index.indisclustered. But pg_index is a local > relation, not shared across databases -- so the current CLUSTER command > can effect the update on the current database's pg_index only, not on > other databases. So if the user were to run CLUSTER on one database > specifying an index, then connect to another one and expect CLUSTER > without specifying an index to honor the previously specified index, > that would not work. Naturally this is only a problem for shared > catalogs. Not being able to handle this for shared catalogs is not a > big loss. Thanks for explanation. The reason I failed to understand this was probabl= y that I tried to imagine something worse. -- = Antonin Houska Web: https://www.cybertec-postgresql.com