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 1k2kFF-0006ma-Eg for pgsql-hackers@arkaria.postgresql.org; Mon, 03 Aug 2020 23:51:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k2kFE-0007aj-DS for pgsql-hackers@arkaria.postgresql.org; Mon, 03 Aug 2020 23:51:52 +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 1k2kFE-0007ac-6P for pgsql-hackers@lists.postgresql.org; Mon, 03 Aug 2020 23:51:52 +0000 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1k2kFB-0000K4-Jp for pgsql-hackers@lists.postgresql.org; Mon, 03 Aug 2020 23:51:51 +0000 Received: by mail-qt1-x841.google.com with SMTP id b25so29660628qto.2 for ; Mon, 03 Aug 2020 16:51:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=SEUClUV4mLHSTxt+lntY2sbRv/owHHzqgK13wiKocr0=; b=BKLaTfZAg91xsesudR3seU8Oi3pyxOjnVjVyiSXoFUkkHlwwPee3fuIO6gROyqVKi1 50/deo0CreVTirxk3ZPi7dRQ3lj3XxiP6nPPh6i8G4EyDEFroX7hHrIOd303JVrcArGo 72z1cTSTnCIJcMdtLo7NYxWSpQBFcBsyZU1QIVTCKv5cfDF1hSyDGZgOkdjan5ojwtoR hX0qoF/z5aApBmzinvALzSlSPynqzTRWwufdSBx+p9nFcFLluWDebYjT/3SLwtP4vBK6 5Ftj6VrGK7uQaAf7bmxRyj3Tpm30UL1j/mZlThFRkt7aUjENUtQO1Ru05RlLkgUhpdzS d1BA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=SEUClUV4mLHSTxt+lntY2sbRv/owHHzqgK13wiKocr0=; b=Q0upEqS9WjZZNsbl05bj8QImfVOkpEg7CB+5p2EV8ngd7iBrJIT5/RvbbBFBrmPBCu JHblZdnnXHYUdv56IRNIcW/SSzXp4WBgmJGlqL2rE1UcJUDYmzxFTaFwA+Jp7D/yNUVm SjYCxAf6DY2q9zknpTGqSRhcjTTqlWI71OurODperSsbXBviwmPbfB7yjnDNVaORghpw fY5M9FvQ4tTDcpc1osZ1rcQGr44wsEwtT8C3XfJJLfp2EKOVnUtV4SJ8h8RbdL1w8Ucf QRtV+uxaWnDLSKu0qmMVr6Bk3MAsIZfBa+qijgkLURJn1C2uPsINf5IEHLGWdX8hFot4 3DiA== X-Gm-Message-State: AOAM5320hgPHCN8LuPvnirIo1/7Te130Sz8b3zVRi8QMKl5d16W+hUKs jOTB3wXZhm+4PTzLroYTOyJst+gYjSN58MoZ2oDDjd65PWQa3Xt97KwJ0TYMb4Jjx6aEWCFjHJY O1ilFMnUSfzLlXHbxEaxto17fN+TOXkvHNTJpq6oaQX9+B/C4OVP1Wcz3WB44iauV1fMDo4lU/W 8s/pmKtEFv9rG5KQ== X-Google-Smtp-Source: ABdhPJwH6VW+/Rk+H7mzVg4DFJtjbNmLMpKqRrOF7YH48ya8qlsjFTtVkZb7nMilZZ6bpI9Ihw+EGA== X-Received: by 2002:aed:37a6:: with SMTP id j35mr18931895qtb.322.1596498707042; Mon, 03 Aug 2020 16:51:47 -0700 (PDT) Received: from perhan.alvh.no-ip.org ([190.95.19.47]) by smtp.gmail.com with ESMTPSA id c42sm16627901qte.5.2020.08.03.16.51.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2020 16:51:46 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 7D8AB2A03A0; Mon, 3 Aug 2020 19:51:44 -0400 (-04) Date: Mon, 3 Aug 2020 19:51:44 -0400 From: Alvaro Herrera To: Pg Hackers Subject: Re: ALTER TABLE .. DETACH PARTITION CONCURRENTLY Message-ID: <20200803235144.GA32443@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200803234854.GA24158@alvherre.pgsql> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Aug-03, Alvaro Herrera wrote: > There was a lot of great discussion which ended up in Robert completing > a much sought implementation of non-blocking ATTACH. DETACH was > discussed too because it was a goal initially, but eventually dropped > from that patch altogether. Nonetheless, that thread provided a lot of > useful input to this implementation. Important ones: > > [1] https://postgr.es/m/CA+TgmoYg4x7AH=_QSptvuBKf+3hUdiCa4frPkt+RvXZyjX1n=w@mail.gmail.com > [2] https://postgr.es/m/CA+TgmoaAjkTibkEr=xJg3ndbRsHHSiYi2SJgX69MVosj=LJmug@mail.gmail.com > [3] https://postgr.es/m/CA+TgmoY13KQZF-=HNTrt9UYWYx3_oYOQpu9ioNT49jGgiDpUEA@mail.gmail.com There was some discussion about having a version number in the partition descriptor somewhere as a means to implement this. I couldn't figure out how that would work, or what the version number would be attached to. Surely the idea wasn't to increment the version number to every partition other than the one being detached? -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services