Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcutL-0007Ox-Lr for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Mar 2023 21:12:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pcutK-0003qm-A2 for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Mar 2023 21:12:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcutJ-0003qc-Rv for pgsql-hackers@lists.postgresql.org; Thu, 16 Mar 2023 21:12:06 +0000 Received: from mail-il1-x135.google.com ([2607:f8b0:4864:20::135]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pcutH-0004pE-4j for pgsql-hackers@lists.postgresql.org; Thu, 16 Mar 2023 21:12:05 +0000 Received: by mail-il1-x135.google.com with SMTP id l15so190789ilv.4 for ; Thu, 16 Mar 2023 14:12:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; t=1679001121; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=AwKAUNWNmJj+drpv2+H+iJKmwrCiLk21LMvYdm632PM=; b=KUxuPbojD5RqtP3lBfsfH7qEV1c5OTL6QCGrbH6XKwFNnOr/fhj4W/ilXct/UiGKop k3Y8Fywv91osdjC4kl7A+YTSoWa+jvBcWLNf/sgEcZZW34I6bGpqRGfgGZH755YWcYj6 d2FZq6hS0YfHox6VD+k8LhlDE0OCEv8IRG8vHz49BiF1i6wUEilwnSxo64E1yWB686DR md1xK7mc972y5KQlAMijSyH2ur/RftJxKsJB5dVeIs8JqyaHmvEvPmpGWHDXwaYNSPAI vfVYk+2Z1chKwSmdsOLjc+1Zd3kqYroOyzVhSSFVCeZG5lL1wRHHh1TtMRrwRErFP+6f FWCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679001121; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=AwKAUNWNmJj+drpv2+H+iJKmwrCiLk21LMvYdm632PM=; b=z9KscKZYYPuTsaRW8335Oz/uznrgKUbJVsdNpWMmL8QsaEmEgjnaqiQajT+A6FcBsq bpoaTzPOzuU8MjFhzSSFx9/rCdujKHI/qm17XCa9VklM5OB1A5e6TFKjqvY5V5rVoakn L5LDBlQMFg1w2g7CaRFqww0WUbPJ6JbeOuhIUVH49XsatxQ2dvTGQcfkxLWk8hU3jQtK 8oOacqDTi17taQ09ETHj5YER4VHMBpxR9uIWsk36sTwl9Bsp8WG4lcJRj6uBSfOUe1KB g56VVk1eCfCllysEtWkvzZKyfgYtCZFMxU3Jsfwtz+A8dfkvqnlHKl+rNQIl0QhWl8If Efrg== X-Gm-Message-State: AO0yUKWm5iTmxaHUiM2qVC1Sr2+hD/ufPr9Xt7TnIJ4pKbRy8JUXDoTd gZsJTbiunAZzIQWvcH85OHDZjA== X-Google-Smtp-Source: AK7set/gjQCU3qyc7utSSBDpy7Pa/peArW7xsMIn9PHhP89bfMhRl2OargpqsRhLUqBHvm0URkJlew== X-Received: by 2002:a05:6e02:1c2f:b0:316:ff39:2215 with SMTP id m15-20020a056e021c2f00b00316ff392215mr10095688ilh.19.1679001121126; Thu, 16 Mar 2023 14:12:01 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id j4-20020a02cb04000000b0040584b8a32fsm95791jap.126.2023.03.16.14.12.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Mar 2023 14:12:00 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 316ED800BBF; Thu, 16 Mar 2023 16:11:59 -0500 (CDT) Date: Thu, 16 Mar 2023 16:11:59 -0500 From: Justin Pryzby To: Tom Lane Cc: Robert Treat , Robert Haas , Andrew Dunstan , pgsql-hackers@lists.postgresql.org, David Rowley , Alvaro Herrera Subject: Re: doc: mentioned CREATE+ATTACH PARTITION as an alternative to CREATE TABLE..PARTITION OF Message-ID: References: <20220718143304.GC18011@telsasoft.com> <1e91af94-2bea-5b35-49f3-ea14859c2a0d@dunslane.net> <20220905180403.GN31833@telsasoft.com> <20230119215832.GH13860@telsasoft.com> <3975824.1678999927@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3975824.1678999927@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Mar 16, 2023 at 04:52:07PM -0400, Tom Lane wrote: > Justin Pryzby writes: > > On Thu, Jan 19, 2023 at 04:47:59PM -0500, Robert Treat wrote: > >> I think all of that feedback is useful, I guess the immediate question > >> becomes if Justin wants to try to proceed with his patch implementing > >> the change, or if adjusting the documentation for the current > >> implementation is the right move for now. > > > The docs change is desirable in any case, since it should be > > backpatched, and any patch to change CREATE..PARTITION OF would be for > > v17+ anyway. > > Right. Pushed with a little further effort to align it better with > surrounding text. Thanks. It is possible to use ALTER TABLE ATTACH/DETACH PARTITION to perform these operations with a weaker lock, thus reducing interference with concurrent operations on the partitioned table. Note that in order for DETACH+DROP to use a lower lock level, it has to be DETACH CONCURRENTLY. ATTACH is implicitly uses a lower lock level, but for DETACH it's only on request. -- Justin