Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hv8KV-0004Em-55 for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Aug 2019 22:53:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hv8KU-0003Wf-0v for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Aug 2019 22:53:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hv8KT-0003UR-MR for pgsql-hackers@lists.postgresql.org; Tue, 06 Aug 2019 22:53:17 +0000 Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hv8KQ-0001cs-Ur for pgsql-hackers@lists.postgresql.org; Tue, 06 Aug 2019 22:53:17 +0000 Received: by mail-qk1-x741.google.com with SMTP id c74so3335883qkb.8 for ; Tue, 06 Aug 2019 15:53:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=MQk4d6JDqEndlDJhezboZnKNS34/88WDSdzMawuf6tI=; b=FtzAhmoRcb9xVt1wVqK1mWJZA46g2ipffpniZ1jJPMzDKfk+DdiP7GJHd1vzB3Gw7f HGC18/C6s8ISEcYZwaK1ZUMhqbUR7O7Q1lT0F0xZ19u4NrVG4gZ7iQXK0uk9XAfFW+wk cP0zS6WaqEAGSY7mnUdDa/VBBCJCZ7vDNsxu8P4M8ZQKEJXP96nDge1Ki8esSRPyI1IR uiKsic/k8cQyGV9FTEDKsvhiZO0COJnhYbzEh/lU47p3PhA+JzGGOxB1R076BH52eQTU myzjCLVG9RQ6XlAKIYUoS+uSSigFMnq3eWLnPtP7Qov3ASyHcScdxrAaRvxZ10xc542P lYMQ== 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:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=MQk4d6JDqEndlDJhezboZnKNS34/88WDSdzMawuf6tI=; b=gwn0HXQpTw6aKYJPgLUgeecIlbjucS78nj+yAV6kn4O+Ehb5H0QOwYtlg/iXoB1UBd J5/iQ/s5zZ/YuGhddLnGkP1CSxvyfzn71j0tnQtYUFVUJrO3qVjGDfdSllj8HgYgaA41 yxirSGtIby+1pHyXgCa4LZ7oU5xJVDpV/nj1uK6DnGMqbRtUBtxwjrMZTSn9YpVpMfJO JgnPXtwFQqKAV5WG3TqMlUyQKtC4mp/Bg53mVLjOSjaAArC9iO2pVDJ44lHPB7uajP4W IZwBu6F4FnyHZbNMmiAuwiPXHgovOvVFACWX9TgG4usqySzgjYMw0CDX2z/Ve9QTtMHa thUg== X-Gm-Message-State: APjAAAXA377KASFDP5KQqotz7oFvlbkK7QBXq402buBv6/OuU/VhWYbm PA806ZWsJyV2JlpReRG4evqHGju+i4ObtEb0ChEgwDqCoNf5+rAVbLfb24R/7+QjQ8mQHEHocyP Xs6iRuTa3eJIdzX6T/TS8acuYMProjU8hMahuwUb2LSBUl5OB4Demas3Guw0dibXRjIny90e5cI 39QBQB3amIUrnYDQ== X-Google-Smtp-Source: APXvYqz9/xIuP/n22grB15Ib6FpxJvq/f+QNsDKxrjfCVZvEACfWjPKQb/bNfqOalSEU40gHnogpeQ== X-Received: by 2002:a37:61c3:: with SMTP id v186mr5359005qkb.158.1565131993209; Tue, 06 Aug 2019 15:53:13 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.217.183.1]) by smtp.gmail.com with ESMTPSA id l63sm37825651qkb.124.2019.08.06.15.53.12 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 06 Aug 2019 15:53:12 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 492871207B4; Tue, 6 Aug 2019 18:53:10 -0400 (-04) Date: Tue, 6 Aug 2019 18:53:10 -0400 From: Alvaro Herrera To: Tom Lane Cc: Pg Hackers Subject: Re: no default hash partition Message-ID: <20190806225310.GA17708@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <15693.1565130998@sss.pgh.pa.us> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Aug-06, Tom Lane wrote: > Alvaro Herrera writes: > > Given the discussion starting at > > https://postgr.es/m/CAFjFpRdBiQjZm8sG9+s0x8Re-afHds6MFLgGuw0wVUNLGrVOQg@mail.gmail.com > > we don't have default-partition support with the hash partitioning > > scheme. That seems a reasonable outcome, but I think we should have a > > comment about it (I had to search the reason for this restriction in the > > hash-partitioning patch set). How about the attached? Does anyone see > > a reason to make this more verbose, and if so to what? > > Seems like "it's likely to cause trouble for users" is just going to > beg the question "why?". Can we explain the hazard succinctly? > Or point to a comment somewhere else that explains it? Right ... the "trouble" is just that if the user later wants to add the missing partitions, they'll need to acquire some strong lock (IIRC it's AEL) in the partitioned table, so it effectively means an outage. With list/range partitioning, there's the slight advantage that you don't have to guess all your partitions in advance, or cover data values that are required for a very small number of rows. In hash partitioning you can't really predict which values are those going to be, and the set of missing partitions is perfectly known. Not enlightened enough ATM for a succint enough explanation, but I'll take suggestions. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services