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 1vPzua-0055Io-33 for pgsql-hackers@arkaria.postgresql.org; Mon, 01 Dec 2025 09:09:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vPzuZ-001Zyp-1b for pgsql-hackers@arkaria.postgresql.org; Mon, 01 Dec 2025 09:09:35 +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.96) (envelope-from ) id 1vPzuZ-001Zyh-0Y for pgsql-hackers@lists.postgresql.org; Mon, 01 Dec 2025 09:09:35 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vPzuV-002Y1i-2S for pgsql-hackers@postgresql.org; Mon, 01 Dec 2025 09:09:34 +0000 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-477a2ab455fso42260655e9.3 for ; Mon, 01 Dec 2025 01:09:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1764580171; x=1765184971; 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=w8GOlJc/kM8yQ9pM14req5xsHKH266CZuBG1bEnjfUU=; b=dUG95A7PLxN6xvzWmr3RJgkjeM4GdoCgGlIuWJcLAJKzbf8kEgiC8V0DmlDJS+MTIg Lk44SuINR4chqg0xJz7UXrrScbrqZcccfJJiS6bEqaXN0fm6DvZAFNlEcUxHR8gDhhGI H4aCHidGIGUVxT3qx/qHSxYpNGDP3WQ8cVl5iF/m7G1JRFzZaxRwtou933/vEMJ+GXU0 YotX4iwn/CGIMX74jmGbRFEtamkNmNranqiobB2bQIB/PoCjAc/1Dl6rxw/l+Ghcu5jw bEs/S85uCF1BRQaDWv4oskrAsHqB4RvalD94D1N67sW2bQbRmZ33QyVgnvjNLmyXWwi2 WYCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764580171; x=1765184971; h=message-id:date:content-id:mime-version:comments:references :in-reply-to:subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=w8GOlJc/kM8yQ9pM14req5xsHKH266CZuBG1bEnjfUU=; b=LloLFpfkvRY0F/7Qyb5KLRyCE71Cgbs67s7N4GumbyWOWZ4lmDds/MKBU0GpC93SDy /K/eS5maM7DhEOZ4h6B2ooJ+ZxxxvxeiO2r1E7aQ/8/TgX9rKkTmsKCT3I/H8maugLTc Pzw9vS+HHy7wlrhe4tVQoGY+OVJt8gOuD7a+TfPvMCAxhZkEZIn47MeZVswzX3WEoRD2 NkH5p2hWhMhYJAxdSY3peI4EzxZ4I0smTAtVVDD8iq6P/sJnB+zH8C9dNAXNHOkISnqU XOp4B1AiJlDB4xYAhm032CBJS+OBEvimccK/vRpWeLSRFJoEabQG01dqX6ZkMRCGzrkH VbZQ== X-Forwarded-Encrypted: i=1; AJvYcCWOU61gy3kwzNb9I80Dcc7pciXrBfP5vdBO2ZM/S/yoxJsSLA/Jo3ofcVIwLphdYxZ0LGFg9Rn56S45nzNn@postgresql.org X-Gm-Message-State: AOJu0YyjeTM3xvrf8fyaDtinZGTkDcEGwm79J+f28oD1N4Z0rnQqQ5GZ nF8g7xOY7QCBKWLHbTIO1KZ0S+dOK6CnYdmINniPy5X5mCZ1vZxiHhgDUz20MhRxiak= X-Gm-Gg: ASbGncsjm1ujhZCPmI+iyKXVPZrTD7CnJ3I5PcupseELRANbKxY2ut1+m1LwwbA1mvk Ug4ay50iL+xrUCbu9x67MjrKqV6nhS4dnxCE5fX/cCIx43m5cXarB0R7j59LK2YNaSDt8JfSPF4 ahBZLdXELqUxnnm1CJH1xa7NTmZ1/JgqvFDzaD8r0lWeajI9LSXYlFv+v+pypsw6/EgkaNym1fK fWBZ6UkqSZdcopWosoX7UYCdxy7x2WNeEYlb/+OpsGGqgtCwSVTE+ajEw6/sWDR0ew/QTYsSGP8 4fiEG7uXiWnZyyN+qO/ov5tmXO2eaIgpUbB/VlmWBAnNk0ezPdVFRQyO7xUIPaayF95Nk13Qbvk 18kWrYrY73xvGAQiFEjQw41CPBz+Ujdqm7yngk8mYDybxb3weLAhXWP+MAF/isC6ci0JSX6lyEC g9SU42q40t3okZt/ctzsnNgMZfYt1YnPiEvGc= X-Google-Smtp-Source: AGHT+IGlxAIxvVK17nrspuCZV+YhM2xoN2tU7HMU4IqT/Jwox7hRdEzFelx89T7TpHD2Z1nqMrCaPg== X-Received: by 2002:a05:600c:46cd:b0:475:dc5c:3a89 with SMTP id 5b1f17b1804b1-477c1136b7fmr361859155e9.34.1764580171040; Mon, 01 Dec 2025 01:09:31 -0800 (PST) Received: from localhost (109-81-168-246.rct.o2.cz. [109.81.168.246]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-42e1ca40945sm25635928f8f.30.2025.12.01.01.09.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Dec 2025 01:09:30 -0800 (PST) From: Antonin Houska To: Matthias van de Meent cc: Mihail Nikalayeu , Sergey Sargsyan , alvherre@kurilemu.de, Andres Freund , Michael Paquier , PostgreSQL Hackers , Andrey Borodin , Melanie Plageman Subject: Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements In-reply-to: References: <202505181556.3n6oiowvntyr@alvherre.pgsql> Comments: In-reply-to Matthias van de Meent message dated "Fri, 28 Nov 2025 17:57:55 +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: <5783.1764580169.1@localhost> Date: Mon, 01 Dec 2025 10:09:29 +0100 Message-ID: <5784.1764580169@localhost> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Matthias van de Meent wrote: > I'm a bit worried, though, that LR may lose updates due to commit > order differences between WAL and PGPROC. I don't know how that's > handled in logical decoding, and can't find much literature about it > in the repo either. Can you please give me an example of this problem? I understand that two transactions do this T1: RecordTransactionCommit() T2: RecordTransactionCommit() T2: ProcArrayEndTransaction() T1: ProcArrayEndTransaction() but I'm failing to imagine this if both transactions are trying to update the same row. For example, if T1 is updating a row that T2 wants to update as well, then T2 has to wait for T1's call of ProcArrayEndTransaction() before it can perform its update, and therefore it (T2) cannot start its commit sequence before T1 has completed it: T1: RecordTransactionCommit() T1: ProcArrayEndTransaction() T2: RecordTransactionCommit() T2: ProcArrayEndTransaction() -- Antonin Houska Web: https://www.cybertec-postgresql.com