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 1vsW0j-004xt9-0M for pgsql-performance@arkaria.postgresql.org; Wed, 18 Feb 2026 01:05:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vsW0i-00DPF7-0I for pgsql-performance@arkaria.postgresql.org; Wed, 18 Feb 2026 01:05: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.96) (envelope-from ) id 1vsW0h-00DPEs-1h for pgsql-performance@lists.postgresql.org; Wed, 18 Feb 2026 01:05:47 +0000 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vsW0d-000000018qy-0JIB for pgsql-performance@postgresql.org; Wed, 18 Feb 2026 01:05:45 +0000 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-2ad4d639db3so2332325ad.0 for ; Tue, 17 Feb 2026 17:05:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=softimp-com-au.20230601.gappssmtp.com; s=20230601; t=1771376743; x=1771981543; darn=postgresql.org; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=2ojnEhCoEY+HC3u8AO9t3dpCsN9M3bg/SOuNCWh8Gt4=; b=oQNhw9Gnv+8D3MEVp6BSPAhCBuhlIVHaONfI+UF0A0t7koiy4MLp19C3zgKS8yBnou PJvlEkHWnxf2/Z3YE923UNrfRs/ywOxkjFW/YGFrUcQ1u0GIJeoL32vYPpe4Wimgvu5Z JW7tnWiXnQX64rKsF1CuGgOxgtdx/AylmYxvyHJMOnJQ2Cq5oPGfhH0YZDzOf+PqfFmh blcRkLNVaOybAlFMFzvGUQ6gozlspr9/+00Rs8o4XCNexcUSS78BkThzzKK5Z8dzF8Vi MGUIJU7yY83oPwOadVrGdBT53VR0RXVnPtAyZETLyzy6xaDqwl7pRDZ8eQvPdZ5GUuyS XKBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771376743; x=1771981543; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2ojnEhCoEY+HC3u8AO9t3dpCsN9M3bg/SOuNCWh8Gt4=; b=ECFdSZEt951J7ZA7i+v+6+0Z7nPTGb5jgWDrNzpnC53HLfk/mf9ez40sYD73rPoCdW LnnlU32uxhFADdLLeVDXKqTbAe1sxxDK9r0MjCjSnOjBcktaCG0d4i6tJIbUCxYg9ZOc crpIttmH/sx5zZXjEE8aCedo6fPlYTojFcb1raKs5bMjAxUFQn5U4GNhAcDG6pik449k 4D2/qOtSEblMMSWiDIbapSA5anMxARcq1aNoGWFEvTu8T5N/IjVded5q7EfSoYtYpeeK yYDeIgMF4SUTPeGMS+txorE1sNCJur+O9ZAKEkXrj9JlS6Vcs80DKghmABbBZMbNoW7l 9w7Q== X-Forwarded-Encrypted: i=1; AJvYcCV4wazYGvXjW+/h05xeyxZsiHAQNp0+13K90PvRWXNbDouh0za6R1++uupeap49nMd0YBkDx64aAaNQRsEKc+lgMA==@postgresql.org X-Gm-Message-State: AOJu0Yxx+RYo7fvRg0IH0+aA5tBSkjwWW9OQzPdQixGfh3oR/C0rDKUH ugkl2mnEc0wWMhaI19ZabVx2NFWo4eDHXtx+bFCB5oDskeK2eS4xyG6oV/7/ESt3RNg= X-Gm-Gg: AZuq6aLG6Ob6lXC2/Gu/uiSr9JtMc3uOwQuuAR7sLFvAPEoItLPsmClQWRZPFJYUqlB tOTInVo9IYJ+p/4pC4gEHbbaWym+8D9HK9Yid8ydj14Tw/X34bzWYCTpYwSb/ttZY9497mUGOUn p+KZkKvpx/MODV+zS4jwKPd/oiU/kNm9aqZBA3wpkEYt0Fz2noWqqcv9XJR2gO1LWSZfAZk/Lkc +dgKHYMeEjNpzk/XK2UIauX2MjnjK1iFGob0hKsOj/4hljKnnlXUIXNs0yjXWL26pqFFZZtdkCq 9FyNqBkEd/HMkU0cfRwhiVltEvfBKGMMTQ8iakVloQbYCE1L5MJN6CxxDa0mqG8HV1BJjgOGDGd 7cCfWPmBDtz9JuOamFL+jN52HNp1gpcHbMcdyyGkt/aIc9Wyw/pOFje6qoFRhKMZkSDG1Kx9WOU kmAPGaPqp41XSc1Y+I2vvmcni6ONkBReCxIVAKUm+K97VsRpeickS3EaONIq3GoHY= X-Received: by 2002:a17:902:dad1:b0:2aa:d7fe:860e with SMTP id d9443c01a7336-2ad175a7166mr136407625ad.56.1771376742612; Tue, 17 Feb 2026 17:05:42 -0800 (PST) Received: from smtpclient.apple ([103.22.145.60]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2ad1a73053dsm119870965ad.35.2026.02.17.17.05.40 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Feb 2026 17:05:42 -0800 (PST) From: Clive Boughton Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_8C1C6DB9-12E6-49B7-93E7-8DB570AAC369" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81.1.4\)) Subject: Re: A serious change in performance between PG 15 and PG 16, 17, 18. Date: Wed, 18 Feb 2026 12:05:26 +1100 In-Reply-To: Cc: Joe Conway , pgsql-performance@postgresql.org To: David Rowley References: <5A68A5FD-3CD2-4863-B274-51804235BE3C@softimp.com.au> X-Mailer: Apple Mail (2.3826.700.81.1.4) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_8C1C6DB9-12E6-49B7-93E7-8DB570AAC369 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 David, I've handed over further communication with you (and others) to Ji = Zhang, my (better) technical colleague. He is able to determine any issues surrounding open/closed publication. Clive. Dr Clive Boughton Software Improvements Street address: 97 Bankers Road, NSW 2621 Australia Mobile Phone: +61 (0)410 632 055 Telephone: +61 (0)2 6230 3195 > On 18 Feb 2026, at 11:01=E2=80=AFam, David Rowley = wrote: >=20 > On Tue, 17 Feb 2026 at 04:42, Joe Conway wrote: >> Are some of your indexes on collatable columns? If so, what version = of >> glibc is on each of your systems (i.e. did you change OS major = versions)? >=20 > For the record, Clive did send me the query and EXPLAIN output > offline. I asked him if he'd anonymise it and post it here, but no > response yet. >=20 > I'll just describe what I saw so as not to share details that Clive > isn't happy making public. The query is to a single table, no joins. > The filter is equality on an INT column. The v15 plan uses a Seq Scan > and runs in 175ms. v18 is using a Bitmap Heap Scan using the table's > primary key index. The PK must be a composite key and the WHERE clause > must be on the first column of that key. That query runs in 305ms, so > more like x2 rather than the reported 300-600x. v18 estimates slightly > fewer rows than v15, so that might be why it switched plans to the > bitmap heap scan. That could be down to random sampling from ANALYZE > finding fewer rows that match the query's WHERE clause in v18. >=20 > I'd recommend Clive to try running ANALYZE on the table and seeing if > the plan changes. Repeat that a few times to see if the Seq Scan plan > is ever picked. I'd also check if the random_page_cost and > seq_page_cost settings are the same on both instances and ensure > enable_seqscan is on. >=20 > David --Apple-Mail=_8C1C6DB9-12E6-49B7-93E7-8DB570AAC369 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 David,

I've handed over further = communication with you (and others) to Ji Zhang, my (better) technical = colleague.
He is able to determine any issues surrounding = open/closed publication.

Clive.

Dr Clive Boughton

Software = Improvements

Street address:
97 Bankers Road, NSW = 2621
Australia

Mobile Phone: +61 (0)410 632 055
Telephone: = +61 (0)2 6230 3195




On 18 Feb 2026, at 11:01=E2=80=AFa= m, David Rowley <dgrowleyml@gmail.com> wrote:

On Tue, 17 Feb 2026 at = 04:42, Joe Conway <mail@joeconway.com> wrote:
Are some of your indexes on collatable columns? If so, = what version of
glibc is on each of your systems (i.e. did you change = OS major versions)?

For the record, Clive did send = me the query and EXPLAIN output
offline. I asked him if he'd = anonymise it and post it here, but no
response yet.

I'll just = describe what I saw so as not to share details that Clive
isn't happy = making public. The query is to a single table, no joins.
The filter = is equality on an INT column. The v15 plan uses a Seq Scan
and runs = in 175ms. v18 is using a Bitmap Heap Scan using the table's
primary = key index. The PK must be a composite key and the WHERE clause
must = be on the first column of that key. That query runs in 305ms, so
more = like x2 rather than the reported 300-600x. v18 estimates = slightly
fewer rows than v15, so that might be why it switched plans = to the
bitmap heap scan. That could be down to random sampling from = ANALYZE
finding fewer rows that match the query's WHERE clause in = v18.

I'd recommend Clive to try running ANALYZE on the table and = seeing if
the plan changes. Repeat that a few times to see if the Seq = Scan plan
is ever picked. I'd also check if the random_page_cost = and
seq_page_cost settings are the same on both instances and = ensure
enable_seqscan is = on.

David

= --Apple-Mail=_8C1C6DB9-12E6-49B7-93E7-8DB570AAC369--