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 1tFsMl-00H3ZA-NH for pgsql-general@arkaria.postgresql.org; Tue, 26 Nov 2024 10:00:19 +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 1tFsMk-005kiA-77 for pgsql-general@arkaria.postgresql.org; Tue, 26 Nov 2024 10:00:18 +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 1tFsMj-005ki2-Rr for pgsql-general@lists.postgresql.org; Tue, 26 Nov 2024 10:00:17 +0000 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tFsMg-003xfQ-Rh for pgsql-general@lists.postgresql.org; Tue, 26 Nov 2024 10:00:16 +0000 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-434a736518eso4064775e9.1 for ; Tue, 26 Nov 2024 02:00:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732615212; x=1733220012; 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=1ghFoEFfjFJIWsktgdGXeTBle3U9yAz6eYKnd6ZxJP0=; b=mHPO/uF0/zXqQl9X4KWmP6CCM1PVmjTcIsgS7U/QKg8bmqGdTCYuDs9uKF095Sfu4W VfV+amnzovZxHMdOhYZi8UDnha0r6OrbZm0wAnnbAq1x7JWeqjiXvQOPidk0TZIUI4vi vA9ORqbn1R43ByX3UiF4xsCfYX4jrQMIupAtp/KlIoiLQGJbXJVGkTzwiVrUM6TF/KNv 1H34CVNUzUgpIuKXuA8KVZTCgs/EjtTPpJqkdiHRmZ70u9+GOjzuzHoyflX6+WOYD+jk KGet1y4RDH9IRqhxBUw+U86QTuBFXfMNE9zLsXxFQa1vKantJYTIicXVjoV51LItbTOA srGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732615212; x=1733220012; 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=1ghFoEFfjFJIWsktgdGXeTBle3U9yAz6eYKnd6ZxJP0=; b=gD1uZNteP6pFfgByu8/jfie0+gZEtJKehHtWV7SebTACpfVO1QsrftJW6wofyx6jvy iaQFeXiJKa3nL6G28YSycz+OSWSOICDrkl5KrZ5DIji5TAqD98GYeSYNKlu18GZTHTkt ZUiP+19PU6f8E1MK3dCNNUcEcazbxx/nhMPs5gmn/8+hO5FZH8Y82kboOP/2OPMlcsv3 IZDnZoXgVCfOAGGZSGDAbVJ+duovbXHMmNZkDor5XVh3BggNCqAqG8FTZft/fF80AwHf GxE2zI0lxWqtZ5XHM0GBp0eGoIIfEioenqJMl1FSBfwx+r6XCOT1XsOgruA2rzCF7Lb0 cNjA== X-Gm-Message-State: AOJu0Yw6Qlh8mV2LG3z/8/0itREE+SyQSzD/ggidRVRpKwbVaqaCx0JS LxSSYxsLhRwdtTJax8syblHF8K8BnmUOc01CMe/Y+VeEyHO5IQ+PI4QM4A== X-Gm-Gg: ASbGncuo1NUVLONG/tMqYSomMssiOLksVo9bcxW7vl91Oz6J577bohqMcAq1RzfmPzH 3oiKZ92ky7KQoVkE8Kd7SI+T5pPaJPPhPgTnMvDLq7KpYnm7k9LceZHbBRkfVoH74kZEVmXnFTn QJtvmxN1V2psqvHY8YJwFIlOSlwz5XlHwhEey0XhdcYgmnJvUdNeQprv0RnwmVKI+6XzAFG7kgP u3s5SPQpl+CbYxJ6r/8PTTBnYmXxpwvwP8RAnmqPImBxIdfercNeDYmQ4tipyrTU+J93kGzVkJY zGKsMcTR/cwHML9jYwGUR6fl2s0= X-Google-Smtp-Source: AGHT+IH/WdivAGuTGQk9CPymSfG9+mVp2iV5/YjDSa3OtN6AJ2rjeAtXk/KkYb8Ki0FOBDjfIbgTPA== X-Received: by 2002:a05:600c:28c:b0:434:9f88:a751 with SMTP id 5b1f17b1804b1-4349f88a8f1mr62153955e9.20.1732615211979; Tue, 26 Nov 2024 02:00:11 -0800 (PST) Received: from smtpclient.apple (143-45-239-77.dyn.cable.qlnet.ch. [77.239.45.143]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434a5d5656bsm9189105e9.0.2024.11.26.02.00.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Nov 2024 02:00:11 -0800 (PST) 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.200.121\)) Subject: PostgreSQL 15.10 update corrective action for ATTACH PARTITION/DETACH PARTITION Message-Id: <5456A1D0-CD47-4315-9C65-71B27E7A2906@gmail.com> Date: Tue, 26 Nov 2024 10:59:40 +0100 To: pgsql-general list X-Mailer: Apple Mail (2.3826.200.121) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, I have a question regarding the recent security update for PostgreSQL = 15. We have a gitlab database. It used to run on the PostgreSQL 15.8 = software. I updated from 15.8 to 15.10 and executed the corrective = actions as outlined in: = https://www.postgresql.org/about/news/postgresql-171-165-159-1414-1317-and= -1221-released-2955/ I executed "SELECT conrelid::pg_catalog.regclass AS "constrained table", = conname AS constraint, confrelid::pg_catalog.regclass AS "references", = pg_catalog.format('ALTER TABLE %s DROP CONSTRAINT %I;', = conrelid::pg_catalog.regclass, conname) AS "drop", = pg_catalog.format('ALTER TABLE %s ADD CONSTRAINT %I %s;', = conrelid::pg_catalog.regclass, conname, = pg_catalog.pg_get_constraintdef(oid)) AS "add" FROM = pg_catalog.pg_constraint c WHERE contype =3D 'f' AND conparentid =3D 0 = AND (SELECT count(*) FROM pg_catalog.pg_constraint c2 WHERE = c2.conparentid =3D c.oid) <> (SELECT count(*) FROM = pg_catalog.pg_inherits i WHERE (i.inhparent =3D c.conrelid OR = i.inhparent =3D c.confrelid) AND EXISTS (SELECT 1 FROM = pg_catalog.pg_partitioned_table WHERE partrelid =3D i.inhparent));" = which gave the result below: -[ RECORD 1 = ]-----+-------------------------------------------------------------------= --------------------------------------------------------------------------= ---------------------------------------------------------------- constrained table | p_ci_pipelines constraint | fk_262d4c2d19_p references | p_ci_pipelines drop | alter table p_ci_pipelines drop constraint = fk_262d4c2d19_p; add | alter table p_ci_pipelines add constraint = fk_262d4c2d19_p FOREIGN KEY (auto_canceled_by_partition_id, = auto_canceled_by_id) REFERENCES p_ci_pipelines(partition_id, id) ON = UPDATE CASCADE ON DELETE SET NULL; I then executed the two alter table statements without any problem. No = error was reported and all seems ok. Now, if I execute the query to find the constraints again, I would = expect the result to be empty. But it is not. Why is that and what am I supposed to do? Is the problem fixed now or is = it still pending? Any ideas would be greatly appreciated. Cheers Paul=