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 1tDTin-000ztd-Cs for pgsql-general@arkaria.postgresql.org; Tue, 19 Nov 2024 19:17:09 +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 1tDTim-00GKYO-19 for pgsql-general@arkaria.postgresql.org; Tue, 19 Nov 2024 19:17:08 +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 1tDTil-00GKYG-Mk for pgsql-general@lists.postgresql.org; Tue, 19 Nov 2024 19:17:07 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tDTif-002kEo-2s for pgsql-general@lists.postgresql.org; Tue, 19 Nov 2024 19:17:06 +0000 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-3823194a879so2644649f8f.0 for ; Tue, 19 Nov 2024 11:17:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732043819; x=1732648619; darn=lists.postgresql.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=qMzGfRH4ypYViVC9LkWEWFK4EyVo3tG8X4h1CIieHRE=; b=DN0jgkzPbCymIRFWXdDXH0wehUqKLkcwImI9ndRFuD1dnwfQcmOSm5sr9TG4DfV7F5 d2tb0mD3kQGpYyluMpfOn6fcsGIn/+c+sCgoekJR8CKShD0CUnXofC9boAT+eHTaMMSF jT55E3NAfGCGv8ITyHDU+607pRet1fVqV1OErEhdMuOc/SUQmjNQjXx4GAVOEcty3LlF jAjK+vPrmEKk+NXw0tie7/LgRVGcL2Xf1Eil2limiz0AprXHqxUUz06PVhzVkm9T8Q6D mBbL7+NKgvy4uHGM1hTs8Oi3Aw9DJubQ/UOjBs0uEhkFojwwAG4QE+vvQw9FVOUR8/+H 6rKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732043819; x=1732648619; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qMzGfRH4ypYViVC9LkWEWFK4EyVo3tG8X4h1CIieHRE=; b=ZdysJyXa7Ni3/nA56AoueeQKLKeXy8FrYxMaN7mFj3IBLq3FBU0LpiV9Xq7flEuubz vB03HrmH9QGFHzG7myUs0is7E0BBEWurtBsgicn0f2K9tlE2uljAwut3Nd2vscw8cpFO 8xMQsI06eWQwIjZ1ABzxlT+LRPtP0BJN4eZ/YcTY3g4seNPnz3yL0LJKoQM2YMqPUJdD neNi02CB1yF6c0MtrdUXeTl36mgtyY1yefanuCiBcR14fEfGY6cr+LCwwbQa5VVmnGTN C9LuN7typaDZEg50/UoTd3g+B+180tGY2bfW0CaqJmeiXeqjMNi4OwHdTIGEg9ypv2pv /h3g== X-Gm-Message-State: AOJu0YweXjHIeR1OUxPrOn4bx5GSrw8Qz09fNL0EiDheVCRFbufNsvtN E9LnpoG4wodu8GeP8scFkD/EmQFRurJPzgiap6Qy6t/F+KJHBmPVl4wEOg== X-Google-Smtp-Source: AGHT+IFBksQgBtm6FCvz74VWdlnAMNfF2GZtuw8NKOBA+Zourgf7+LaBmGxhBAex4Jzo7+/ZaNMn7A== X-Received: by 2002:a5d:47c9:0:b0:382:450c:2601 with SMTP id ffacd0b85a97d-382450c2934mr8033207f8f.24.1732043819291; Tue, 19 Nov 2024 11:16:59 -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-432dab72085sm210752125e9.3.2024.11.19.11.16.58 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Nov 2024 11:16:58 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.200.121\)) Subject: Re: PostgreSQL 15.9 Update: Partitioned tables with foreign key constraints From: Paul Foerster In-Reply-To: <202411191634.vexoqghfj2aq@alvherre.pgsql> Date: Tue, 19 Nov 2024 20:16:28 +0100 Cc: pgsql-general list Content-Transfer-Encoding: quoted-printable Message-Id: References: <202411191634.vexoqghfj2aq@alvherre.pgsql> To: Alvaro Herrera 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 Alvaro, > On 19 Nov 2024, at 17:34, Alvaro Herrera = wrote: >=20 > It doesn't really matter when you do it, because the constraint only > gets broken by running DETACH with the old server code. You have > already run the DETACH sometime in the past (that's how the constraint > got broken), which means you would not run it again now to the same > table. The old server code will behave correctly when doing ADD / = DROP > constraint, as will the new server code. Feel free to run it when = it's > more convenient to you. Thanks. > I'd advise against running ALTER TABLE DETACH until you have upgraded, > however -- at least, for partitioned tables that have foreign keys > pointing to other partitioned tables. I have no influence on that. It's a third party application. In fact, I = can't even do much about the applications developed inhouse because = they're too big. That means, if there is anything built into an = application, then it takes many moons to get it out again. Cheers, Paul