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 1oLBfb-0001tH-Rz for pgsql-performance@arkaria.postgresql.org; Mon, 08 Aug 2022 22:56:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oLBeb-0007fi-KY for pgsql-performance@arkaria.postgresql.org; Mon, 08 Aug 2022 22:55:21 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oLBeb-0007d3-2p for pgsql-performance@lists.postgresql.org; Mon, 08 Aug 2022 22:55:21 +0000 Received: from mail-io1-xd2d.google.com ([2607:f8b0:4864:20::d2d]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oLBeX-0005Wg-Ne for pgsql-performance@postgresql.org; Mon, 08 Aug 2022 22:55:19 +0000 Received: by mail-io1-xd2d.google.com with SMTP id h138so8326604iof.12 for ; Mon, 08 Aug 2022 15:55:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc; bh=3t4kxrBPRtYO6ZX5LypAKIs0iiVUfmOKUl9mjKEas9E=; b=f0yyN2MaQvAvwDA+jF0QOWbV1ZkJKdFUEEhZiu+nPZhELR2bwpxWxnX/DQMJ3tIu0T ctUUxsaHEh2k5y58N5djPk8Bf7+POa3al+7dXcJi8LfMFUsl9Q6Rl5OdYQUZv4iaq/E4 pW4k0iIWyniQVEXaj2Fa2s1rh1yfHB9evpvvUDLSDBVs28kK9V3ErrmTH4qk9mI1h/h1 3wtqRn4v9VVgEnxeY/83ARJ35sxBftU03A7ZcA7Dd+VQB4i3hvJdZGKwNn8Q3vGRpiDy XfW5kAAnDPgR0khtlu/By+WWUAtzgtHXmvZ8lXKHuC5/IAofVNA+MbWtHHd9JVC653/w w+hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc; bh=3t4kxrBPRtYO6ZX5LypAKIs0iiVUfmOKUl9mjKEas9E=; b=k99JSntyqPK0T8V99JIIeymG1fgcpu3P2i10I/aGGGIofu5y/sL41Ms8t82vgy0NFa CmcCVo5AJ8rvZZLLXPKAHRyWb8EpMYL8kbOYSvJ3L8h6rTj/GB7miPBphPNTgOhUTwV1 dLsF3LHcjmYn8q6IqxR5DIx4kbpKXZJHtSoJ5esmYcDl88Z9Gw4XxM0Mi3VTJRLIfNaK N/Vko34f3i1ApZ+xyU+dYwu9E5TeW4tvuHG7KjAIOKjKeJrDTuqh+d7mJrgPMEu8Sp+n Q/MUTi9TprYSqt2b8+rzPSaCwWq8mZRttP4xVVXbYUNK0LpSKspaTzvaqLipYgqqshnN 6N+w== X-Gm-Message-State: ACgBeo3E6wAx3GjN7vzhhCXU1gR4/DVadcBZWJwXRsKqxvXaAKdxHCG+ mZtILLNKLBKMoMBxdto1luenQQ== X-Google-Smtp-Source: AA6agR5YZjZsD7vbSBRcE9J6w85u8KFb5Kwi8ZmGQ/q0NVXITW6aIi07UwbLGhJczLD9rgl8aFoU4A== X-Received: by 2002:a05:6638:15c5:b0:342:83a3:98fa with SMTP id i5-20020a05663815c500b0034283a398famr9051408jat.56.1659999316949; Mon, 08 Aug 2022 15:55:16 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id e11-20020a026d4b000000b0034286300316sm5693397jaf.166.2022.08.08.15.55.16 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Aug 2022 15:55:16 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id BF1C3800990; Mon, 8 Aug 2022 17:55:15 -0500 (CDT) Date: Mon, 8 Aug 2022 17:55:15 -0500 From: Justin Pryzby To: Slava Mudry Cc: Rick Otten , pgsql-performance@postgresql.org Subject: Re: Postgresql 14 partitioning advice Message-ID: <20220808225515.GB19644@telsasoft.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Aug 08, 2022 at 03:45:11PM -0700, Slava Mudry wrote: > Postgres 14 improved partitioning quite a bit. I used it in Postgres 9 and > there was a lot of locking on partition hierarchy when you add/drop > partition tables. Note that postgres 9 didn't have native/declarative partitioning, and most improvements in native partitioning don't apply to legacy/inheritance partitioning. https://www.postgresql.org/docs/devel/ddl-partitioning.html "Native" partitioning added in v10 tends to require stronger locks for add/drop than legacy partitioning, since partitions have associated bounds, which cannot overlap. The locking is improved in v12 with CREATE+ATTACH and v14 with DETACH CONCURRENTLY+DROP. -- Justin