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 1uEB6a-0045wx-6x for pgsql-general@arkaria.postgresql.org; Sun, 11 May 2025 18:08:52 +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 1uEB6Z-00Ajzm-9B for pgsql-general@arkaria.postgresql.org; Sun, 11 May 2025 18:08:51 +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 1uEB6Y-00Ajzd-Ur for pgsql-general@lists.postgresql.org; Sun, 11 May 2025 18:08:50 +0000 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uEB6W-001Ibd-0w for pgsql-general@lists.postgresql.org; Sun, 11 May 2025 18:08:49 +0000 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3a0bd7f4cd5so3131608f8f.0 for ; Sun, 11 May 2025 11:08:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1746986926; x=1747591726; darn=lists.postgresql.org; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:from:to:cc:subject:date:message-id:reply-to; bh=6I0zJmwprqvuEkCi2Oz23IYRvwkemdKDJPpEo00daIU=; b=gfUjqMK/Bk4g0jHP5ZvGzgk/hQOHD8BZcarng35HrUX7wGcnaGh+qyGfHZjsOxDMjM qXZ+YE40TeaKVe5rLLShukotgjjzV/dTLEz1RrdgyVR24LwQC7EarLEoTRbjdb9sNBvh cDQK1a4EGsDgMi+KQCf9JrEqK4hmlQJ2BGNkSlakKABOJF67W13dLd2hg+sZTxDL5BGp S/XkaQDqzfbltwODQOSYc9yMfbt+b9xY9HlZAnKHdBLi9S/mx8b+apJKGxKidqoGTuzP WSOsBWRqDr+a+0vSgg+tFa10hBRDHnIeKbfhA1ZP6qSj/tL1C6GSSLxMD4yDpDmrWSZ2 omIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746986926; x=1747591726; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6I0zJmwprqvuEkCi2Oz23IYRvwkemdKDJPpEo00daIU=; b=s6DHD9EWWwv5QLrohR7pRAX41b5kMINgTspavuN1Q6kt48429sTxcAfealbOj5frm/ UP/DHcGTcirfhmPLWq6ACGek4ydVjskIikYYUqkMeWidqfSBS9rVHu1LmBkemP+VGxRA ZWYHuxou9akl6eLNDMjo9u8z3csAmtP3fp8d1AYfbu5IcyQVn9HGbGpD82BrcY4O4biX GIU5eSMK0N8eDoSJDhXZHNsWDUT2jC5IuVuo8ll6uXe4OV4jzJeilk31/9hBT8Zke1qV Z5XEDY9bRc5KeU/EDcpooMK+rVmUZutIVsH4VER9DgHW4tjGhp4jzjAn1yozVF+O4oEg 0MRQ== X-Gm-Message-State: AOJu0YyoBvfQ3Q5vlD8+9+RIKlVt+ySNlqHPpm0Pfi3drSxPi+lHL5Fk zg02JDMC5NKuDBuluWKcoFbzEb8VPidY8+S3h+n0xm/0eUpI4egvE1h39A== X-Gm-Gg: ASbGncsTDaSvYdi5R2i7oVs7d0cWdkdaXQ9paxq6RufakGat/gQC08uUcPmApRpTsww GDSn/9BzCCS8YJNIGrDdTh8tAVyqkLitd/Bjkdtu1822oG5pv4NOrB3d5b2EqiWO364Jpy+17cB AfeGE0xxC48yi4b3vrtfDIyRVyC1lHifLNFztWviDw73C95Uwj+Ebm3D0tRYa4gdRlasXMjgRac V2bkGHfmxRzJOwZOTcuuOUSiTaxL/q4dWUR4/uJbyh8cTN4oJvCALPKboxlYzTo2+R2LVz8YQbk r4U7wfe45GoGuCcUb+OVHjaCwSntb9KuQx+m7OKITz4QOXaCu1h1riP5L/2uO+yG5uTnfa1DzoN OGMPVuv8/KB8/ug41KSORSQMmR4XqnXWCB6H+f2g= X-Google-Smtp-Source: AGHT+IF0ljkFQXEfpSAoLweB8SfC734zpA+wnIEe6bEGeBfSFSKJvFGi7Ci6xybyh6WPIUY4e2tfwQ== X-Received: by 2002:adf:f54c:0:b0:3a1:fb11:4b3c with SMTP id ffacd0b85a97d-3a1fb114cc1mr5045475f8f.56.1746986926422; Sun, 11 May 2025 11:08:46 -0700 (PDT) Received: from smtpclient.apple (143-45-239-77.dyn.cable.qlnet.ch. [77.239.45.143]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a1f58ecccbsm10031121f8f.32.2025.05.11.11.08.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 May 2025 11:08:45 -0700 (PDT) From: Paul Foerster Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.500.181.1.5\)) Subject: Updating to PostgreSQL 17.5 Message-Id: <492F08D2-73F0-4CB7-85C7-8602304A448F@gmail.com> Date: Sun, 11 May 2025 20:08:14 +0200 To: Pgsql-General List X-Mailer: Apple Mail (2.3826.500.181.1.5) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, the release notes for PostgreSQL 17.5 = (https://www.postgresql.org/docs/17/release-17-5.html) state: "Also, if you have any BRIN bloom indexes, it may be advisable to = reindex them after updating." I don't know what exactly that means. So I read about BRIN and BLOOM = indexes and learned how to create them using the "USING BRIN..." or = "USING BLOOM..." clause. But there is no such thing as "USING BRIN = BLOOM" or other variation. After quite some research, I only found that = there may be a BRIN and a BLOOM index on the same table, created by two = individual CREATE INDEX commands. As I understand, those are the ones = referred to in the release notes. Also, the \di+ command wasn't much of a help in this case. So I came up = with the following query which also creates the necessary reindex = commands. Please let me know if my query below hits the wanted indexes = or not. I'd be really cool if release notes contained the necessary queries to = find the objects in question. Thanks in advance, Paul with brin_indexes as ( select e.nspname as schema_name, c.relname as table_name, b.relname as index_name from pg_catalog.pg_index as a join pg_catalog.pg_class as b on b.oid =3D a.indexrelid join pg_catalog.pg_class as c on c.oid =3D a.indrelid join pg_catalog.pg_am as d on b.relam =3D d.oid join pg_catalog.pg_namespace as e on e.oid =3D = c.relnamespace where d.amname =3D 'brin' ), bloom_indexes as ( select e.nspname as schema_name, c.relname as table_name, b.relname as index_name from pg_catalog.pg_index as a join pg_catalog.pg_class as b on b.oid =3D a.indexrelid join pg_catalog.pg_class as c on c.oid =3D a.indrelid join pg_catalog.pg_am as d on b.relam =3D d.oid join pg_catalog.pg_namespace as e on e.oid =3D = c.relnamespace where d.amname =3D 'bloom' ) select concat ('reindex index "', schema_name, '"."', index_name, '"; -- = brin index') as reindex_cmd from brin_indexes where schema_name in (select schema_name from bloom_indexes) and table_name in (select table_name from bloom_indexes) union all select concat ('reindex index "', schema_name, '"."', index_name, '"; -- = bloom index') as reindex_cmd from bloom_indexes where schema_name in (select schema_name from brin_indexes) and table_name in (select table_name from brin_indexes) order by reindex_cmd;=