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 1vgpzN-0051dc-2S for pgsql-hackers@arkaria.postgresql.org; Fri, 16 Jan 2026 20:00:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vgpzM-004s9c-2g for pgsql-hackers@arkaria.postgresql.org; Fri, 16 Jan 2026 20:00:09 +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 1vgpzM-004s9U-1M for pgsql-hackers@lists.postgresql.org; Fri, 16 Jan 2026 20:00:08 +0000 Received: from mail-lj1-x229.google.com ([2a00:1450:4864:20::229]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vgpzK-000sEq-1Q for pgsql-hackers@postgresql.org; Fri, 16 Jan 2026 20:00:08 +0000 Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-38316445a67so18875141fa.3 for ; Fri, 16 Jan 2026 12:00:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768593603; x=1769198403; darn=postgresql.org; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=9GTpOJtwd3k5e4N7BSsjCgmvXMtPZjJCSqGgpZ8LcOI=; b=bPDu+sudamDUeTy+V/qZLs9/1KzjrRfNeUNIOtYAN/sIU2Uxwg6LznU2mY9ET8L6e9 ukS7fnJ0QraARgq6GZgvJlYS9mvBt8mfkxIRkRHR30U/fVu65ZLI73nPtYU99dj4M4XO HMMCXOtE8kJvN33SdIHrjwT90L/eAFBq6mwjJbYj3ZCu0J3tiLh2gIZcGngDqEFuCBrg q4aN1bECg1kHVwuR3nldLCjcByeim4LwCvFn+7pLe+YnL61SRPk00gVMe6mx5S5RF/gv utDTAZfuXOwe0SZ16M/gAHdpqEPzTGxWEaFkiZc0B9ueT4ydqzMVWjEuQu5M23k5USFj OcgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768593603; x=1769198403; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=9GTpOJtwd3k5e4N7BSsjCgmvXMtPZjJCSqGgpZ8LcOI=; b=RGRXN7qkysgTlxnd2UexKhwITfBW68l07YmQfPGoNfhs+8XObx94h4GXHA8U1ido2M vmo7VEmG/YQDU46e+9pHZzB/OPRGHY59+FTewI91KXV22mgF2SI271YMnO6vhKk36WDK m1lzvdoHBq6uKx2EcJ33okHXRKxg0me/RmwLdM3lMJQEMcPKlmG52Anag0cWJASFmnWp SInXQ1HeItbE3h2wHiqgBTvpBGDuF37oEvI5SJ4AD1VDqZdq58fYq+XzdLTdgriQll0h AkgMFOLWGCb31OtWTs0Jx35oHO8bRAspM1TLsrRM7/0cEzq+aAZIy3Qu1eaMVI70miFM pXJg== X-Forwarded-Encrypted: i=1; AJvYcCWVwEUZsh8pbdZHYdnPwC2P1NR9E2EjAy25NAKodQIjhKAC4LIbte/mqMvkU7o51N9lBrMC//3TvFeI4B55@postgresql.org X-Gm-Message-State: AOJu0YzhixDf/0tPsZL6VmUzh/rfBekmptp3Hnf3zxxY4lVX1gpl+IHA rEbjwf7Ze+17feFVvJoHcPTMm0Lb34BVcNPFL6C901iofNH1QWlobMKm X-Gm-Gg: AY/fxX5C0QC9/bfg6o8qDU6iVBUdqaMZItfWbSK/8DdYpgbUOpaFovCUL1eT/IqpgaC Z62Ubq6KQo00VMoVqXu6deuTC2ChK0Y5sgE3ArpuH7+xUNEmx5kyx3HciZp8wZ0Du+XHLmofoA9 tRCxo+7AMJk7B8k7BnVTeLkHCZh5ajBHj1HePBNfIk7AW3euugKZeJWh3RphkCSjckRbibSMRKY GxQGbM0zqPz/x1o2T85qU+70L46K3thgisxxRWY5LsbsWmYCHzBBfNHo7PTVGh7nDuh4bzGzPpZ Dkdy+Sh8VVL/kirtdSOaxzPY+TiatsXnpYYtJ7mNsqCyOnboLdkWb6KglBHJrzJbCUzxuMA+0tN hNfvC4jS9sxo8v1p6JZjkE6iFjll39LxrcTzOLIziJ9Mdh0/OWv+ez1mK0ZQD1BHwaOgmyujeym sEczb7WsXjuGFE X-Received: by 2002:a05:651c:2123:b0:383:1a8b:a330 with SMTP id 38308e7fff4ca-383866a4db8mr11421991fa.4.1768593602972; Fri, 16 Jan 2026 12:00:02 -0800 (PST) Received: from [192.168.0.50] ([89.149.93.129]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-38384e790a9sm9413351fa.26.2026.01.16.12.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 16 Jan 2026 12:00:02 -0800 (PST) Content-Type: multipart/alternative; boundary="------------TCS0K0XeOfX1i82dazzJBeOf" Message-ID: Date: Fri, 16 Jan 2026 22:00:00 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY To: =?UTF-8?Q?=C3=81lvaro_Herrera?= , Mihail Nikalayeu Cc: Michael Paquier , Noah Misch , PostgreSQL Hackers References: <202512111958.6ymanstmexrk@alvherre.pgsql> Content-Language: en-US From: Alexander Lakhin In-Reply-To: <202512111958.6ymanstmexrk@alvherre.pgsql> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------TCS0K0XeOfX1i82dazzJBeOf Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hello Alvaro and Mihail, 11.12.2025 22:04, Álvaro Herrera wrote: > On 2025-Dec-09, Mihail Nikalayeu wrote: > >> After some investigation I ended up with a much simpler fix. >> It is self-explanatory in code and a commit message. > Yeah, that makes sense. It's what I was trying to say in > https://postgr.es/m/202512072050.hcyysny65ugj@alvherre.pgsql > Pushed your patch, thanks. Thank you for fixing that once again! But it looks like the "invalid arbiter index list" error is still not completely gone. It was produced recently by new 010_index_concurrently_upsert test [1]: 364/364 postgresql:test_misc / test_misc/010_index_concurrently_upsert ERROR            22.47s   exit status 29 010_index_concurrently_upsert_node.log contains: 2026-01-08 12:59:26.336 CET [1265129][client backend][74/5:0] ERROR:  invalid arbiter index list 2026-01-08 12:59:26.336 CET [1265129][client backend][74/5:0] STATEMENT:  INSERT INTO test.tblparted VALUES (13, now()) ON CONFLICT (i) DO UPDATE SET updated_at = now(); I'm able to reproduce it locally when running 10+ instances of the test in parallel on a pretty slow machine: ... 1       [18:46:52] 1       All tests successful. 1       Files=1, Tests=68, 36 wallclock secs ( 0.53 usr  0.03 sys + 4.06 cusr  3.38 csys =  8.00 CPU) 1       Result: PASS 3       [18:49:23] t/010_index_concurrently_upsert.pl .. 3       Dubious, test returned 29 (wstat 7424, 0x1d00) 3       Failed 1/45 subtests 3       [18:49:23] 3 3       Test Summary Report 3       ------------------- 3       t/010_index_concurrently_upsert.pl (Wstat: 7424 (exited 29) Tests: 45 Failed: 1) 3         Failed test:  45 3         Non-zero exit status: 29 3         Parse errors: No plan found in TAP output 3       Files=1, Tests=45, 186 wallclock secs ( 0.40 usr  0.03 sys + 14.82 cusr 16.18 csys = 31.43 CPU) 3       Result: FAIL With the more verbose error message, I can see: src/test/modules/test_misc_3/tmp_check/log/010_index_concurrently_upsert_node.log: 2026-01-16 18:46:39.367 UTC [postgres][2047103:8][client backend] [010_index_concurrently_upsert.pl][74/5:0] ERROR:  invalid arbiter index list: list_length(rootResultRelInfo->ri_onConflictArbiterIndexes): 1, list_length(arbiterIndexes): 2, additional_arbiters: 0 The numbers are the same from three failures in a row I observed. (I can add more debugging and dig deeper, if needed.) [1] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=adder&dt=2026-01-08%2011%3A55%3A58 Best regards, Alexander --------------TCS0K0XeOfX1i82dazzJBeOf Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
Hello Alvaro and Mihail,

11.12.2025 22:04, Álvaro Herrera wrote:
On 2025-Dec-09, Mihail Nikalayeu wrote:

After some investigation I ended up with a much simpler fix.
It is self-explanatory in code and a commit message.
Yeah, that makes sense.  It's what I was trying to say in
https://postgr.es/m/202512072050.hcyysny65ugj@alvherre.pgsql
Pushed your patch, thanks.

Thank you for fixing that once again! But it looks like the
"invalid arbiter index list" error is still not completely gone. It was
produced recently by new 010_index_concurrently_upsert test [1]:
364/364 postgresql:test_misc / test_misc/010_index_concurrently_upsert                  ERROR            22.47s   exit status 29

010_index_concurrently_upsert_node.log contains:
2026-01-08 12:59:26.336 CET [1265129][client backend][74/5:0] ERROR:  invalid arbiter index list
2026-01-08 12:59:26.336 CET [1265129][client backend][74/5:0] STATEMENT:  INSERT INTO test.tblparted VALUES (13, now()) ON CONFLICT (i) DO UPDATE SET updated_at = now();

I'm able to reproduce it locally when running 10+ instances of the test
in parallel on a pretty slow machine:
...
1       [18:46:52]
1       All tests successful.
1       Files=1, Tests=68, 36 wallclock secs ( 0.53 usr  0.03 sys +  4.06 cusr  3.38 csys =  8.00 CPU)
1       Result: PASS
3       [18:49:23] t/010_index_concurrently_upsert.pl ..
3       Dubious, test returned 29 (wstat 7424, 0x1d00)
3       Failed 1/45 subtests
3       [18:49:23]
3
3       Test Summary Report
3       -------------------
3       t/010_index_concurrently_upsert.pl (Wstat: 7424 (exited 29) Tests: 45 Failed: 1)
3         Failed test:  45
3         Non-zero exit status: 29
3         Parse errors: No plan found in TAP output
3       Files=1, Tests=45, 186 wallclock secs ( 0.40 usr  0.03 sys + 14.82 cusr 16.18 csys = 31.43 CPU)
3       Result: FAIL

With the more verbose error message, I can see:
src/test/modules/test_misc_3/tmp_check/log/010_index_concurrently_upsert_node.log:
2026-01-16 18:46:39.367 UTC [postgres][2047103:8][client backend] [010_index_concurrently_upsert.pl][74/5:0] ERROR:  invalid arbiter index list: list_length(rootResultRelInfo->ri_onConflictArbiterIndexes): 1, list_length(arbiterIndexes): 2, additional_arbiters: 0
The numbers are the same from three failures in a row I observed.

(I can add more debugging and dig deeper, if needed.)

[1]  https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=adder&dt=2026-01-08%2011%3A55%3A58

Best regards,
Alexander
--------------TCS0K0XeOfX1i82dazzJBeOf--