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 1qMWtP-002cUD-UT for pgsql-general@arkaria.postgresql.org; Thu, 20 Jul 2023 16:52:43 +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 1qMWtO-00CE2v-FF for pgsql-general@arkaria.postgresql.org; Thu, 20 Jul 2023 16:52:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qMWtO-00CE2m-4h for pgsql-general@lists.postgresql.org; Thu, 20 Jul 2023 16:52:42 +0000 Received: from mail-yw1-x112f.google.com ([2607:f8b0:4864:20::112f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qMWtK-000gWx-M1 for pgsql-general@lists.postgresql.org; Thu, 20 Jul 2023 16:52:41 +0000 Received: by mail-yw1-x112f.google.com with SMTP id 00721157ae682-5728df0a7d9so11521527b3.1 for ; Thu, 20 Jul 2023 09:52:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689871957; x=1690476757; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=a9QpcMThIy/Jq/7qV9OERbzWINHv5zjCQL9Zwki7UEE=; b=GCVQEjtbUHH88axQtjFnYqu5aSAUbhshyi0LH8aLsn+sfcoBMd/VL3sCkK3kN6l5dR MBk4f13XAVumwrmjvfCLyfCIi/D06aFkmpgQxM8MvrF5bwiXgP+d0tl+foODuhaZ62gX KJEVNLLhDk1PEkvuy2q24hDxHJD1xI/sCR7Q/bAw+Jemw4MVsf2IIes119zgGBUUgaNZ 9EYJAslCW/A60wKC2VN+GXrkNp7+7NrTnffqT51vvKL0KGP2UZJbFRN9HrkUD2oaadK5 Lps6+0bn3H0UxazisORnYh/9mv82dbisqJax3W1PNqarb1V2EMQ3KN3ffud2exr1zt1m G1OA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689871957; x=1690476757; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=a9QpcMThIy/Jq/7qV9OERbzWINHv5zjCQL9Zwki7UEE=; b=fpkmSfyf3Xg1lQoLaHRw4IjU/IAiMIJaKyXmK+oMIBc6OQBHyTzQoiQaqhtbTTd52x Z8g03VZzflzz3AyE3v7pG7GW3LmBBwbWsyyWwB4IMKevzM2CFtSMISoH8Yrzr85cmW5G gQ8/re/3S5XI55Lh9jSSQK7rVgruEj/Hk0eElqCXZKxQONgUdxRBlozCKBKkLspApHIO iRsysE6Lvl5sBp5lBIW0oCD2D97uYZK+SCFAKEsTrzLqrCAvt2bGwHoOKbKzyBgbxyq3 l1sI+Z08vbN9G8z21153FD5fI/W3I7rjQHHDT1D2SMIiD+yZKHI+i0t+kjYpVlLn4exm pAWQ== X-Gm-Message-State: ABy/qLZRBzHa5sKK/wMgeox15/6r44su7OMF0ns8RUb9jyYEEH9PWJH4 6Jrkf3roKhNV6apAXacb3XxAWe2Yldo= X-Google-Smtp-Source: APBJJlFWRIjr0pzurOrGC0wQmSE5fAqUC7FhYdMUSACmjkqctmFPDyyoa1VPcQTq7bV7Sk8WEq186Q== X-Received: by 2002:a0d:dd91:0:b0:561:429e:acd2 with SMTP id g139-20020a0ddd91000000b00561429eacd2mr6494155ywe.35.1689871957524; Thu, 20 Jul 2023 09:52:37 -0700 (PDT) Received: from ?IPV6:2600:1700:bd2c:b810:64d0:3aec:6103:5398? ([2600:1700:bd2c:b810:64d0:3aec:6103:5398]) by smtp.googlemail.com with ESMTPSA id q124-20020a818082000000b0057a8de72338sm308230ywf.68.2023.07.20.09.52.37 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 20 Jul 2023 09:52:37 -0700 (PDT) Message-ID: Date: Thu, 20 Jul 2023 11:52:35 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: suggestion about time based partitioning and hibernate Content-Language: en-US To: pgsql-general@lists.postgresql.org References: <20230719164539.ladmyshzldsi22cz@alvherre.pgsql> From: Ron In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 7/20/23 10:31, Luca Ferrari wrote: > On Wed, Jul 19, 2023 at 6:45 PM Alvaro Herrera wrote: >> Therefore I suggest to avoid doing >> that. Either look at some other partitioning scheme that doesn't >> involve adding columns to the primary key, or disregard partitioning for >> this table entirely. > What do you mean by "other partitioning scheme"? There is nothing that > comes into my mind at the moment. > The problem is that, unluckily, the table is already greater than 50GB > in seize and is keep growing, so I guess something has to be done, at > least for a manainance point of view. > > Would a partition by hash on the single column primary key be such a bad idea? Just do a range partition by the existing PK. -- Born in Arizona, moved to Babylonia.