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 1kfQaR-0008Lx-Bw for pgsql-general@arkaria.postgresql.org; Wed, 18 Nov 2020 16:45:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kfQaQ-0004Wp-AO for pgsql-general@arkaria.postgresql.org; Wed, 18 Nov 2020 16:45:38 +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 1kfQaQ-0004Wh-0I for pgsql-general@lists.postgresql.org; Wed, 18 Nov 2020 16:45:38 +0000 Received: from mail-oi1-x236.google.com ([2607:f8b0:4864:20::236]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kfQaM-0007nF-8H for pgsql-general@lists.postgresql.org; Wed, 18 Nov 2020 16:45:37 +0000 Received: by mail-oi1-x236.google.com with SMTP id l206so2842917oif.12 for ; Wed, 18 Nov 2020 08:45:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=915VAFMBOAJ8W5mf2/Cu8PkypCDEY9f7u9TP3xadpvE=; b=peFcukbY9bkViy9zGURVyX+4AUDSGXJUOSO8vnGqtsVFBgrqX7hTKljk3jyLWQZCyA AKP0wKGkYYtAVzIgRH6yRT7dfK/C5CrGu49R61fH0cPlrf+YNfhfblNLDt4BHY/iaN2o ckcU7kAVYLjMxJJiHC2L0OR0ksFFSpJLF5k+hAlzK1X6tP5+/HMLZerFuRxSgvK4dZ5O CQNMys6rXSK5YR8r8sgs3Q+90Q8VkmVPbNLOo8Q80LEzSAiTEVztzCAu17oBC4w4IyfB Q8I+68Eu1gNsFgNkPW63gbSWkBBNYdzE7bgJ4C4kUX4Mb9ayjUzGqzjEwj5pxIMBg97f g8jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=915VAFMBOAJ8W5mf2/Cu8PkypCDEY9f7u9TP3xadpvE=; b=PrVVO9g1o9VmV80S2lHnmyZfQh5ol9306vkmRe4rm6G85CaFSCS/ofhetui567xMWO +ZNxUcdlZi5ZRURfkXQjNSUI5uaNgV+Tj6uWeOt5swUfHX4u/Yq73QJvCoKIXvUNcDs1 DM5NVj5bul560TBYIvwP/cM4JpzuNCoanTzJoF3iJKpo1ddqrjkIYAeWmNH2sVZDZPvD 8de93z+yc8KAIzQfuh7S1s/QOuv6I+LEQscodyCTw94HfPUXGvSzJNYLrP0cukz9dwcN 2InrxBLGpzSvvySjWG0XruA7FUFt/NLBC9S0i25sTgVXcAMEWvKcY0rYKTO8RkW5pfT9 HPuA== X-Gm-Message-State: AOAM5325LQEG6tl7WVAh55HbbMkm+JVzOe5vP0kTdKEJa0X+8Vj3KvwA eXSIYHzU8GjFa5kj7d22nTf7/yZn1QoUDA== X-Google-Smtp-Source: ABdhPJyxtQQcAOPR1wceqCrpEjMrKW6rqlw4IgAinGMZJniBYghuiZnNby35BrxxikXimgo4vIlcpg== X-Received: by 2002:aca:cdcb:: with SMTP id d194mr617621oig.142.1605717931944; Wed, 18 Nov 2020 08:45:31 -0800 (PST) Received: from [192.168.1.10] (ip174-67-141-204.no.no.cox.net. [174.67.141.204]) by smtp.googlemail.com with ESMTPSA id j16sm8265875oot.24.2020.11.18.08.45.31 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Nov 2020 08:45:31 -0800 (PST) Subject: Re: vacuum vs vacuum full To: pgsql-general@lists.postgresql.org References: <80603b4e-058c-fd9e-8e8c-50010dc32572@gmail.com> <1933cd6b-45b0-be1f-3a05-dd02e341ec28@gmx.net> From: Ron Message-ID: <734e6c91-8cf9-008a-5f49-1061478e12e3@gmail.com> Date: Wed, 18 Nov 2020 10:45:30 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 11/18/20 6:02 AM, Laurenz Albe wrote: > On Wed, 2020-11-18 at 10:57 +0100, Thomas Kellerer wrote: >>> No matter how long it takes, this is an excellent argument for >>> partitioning Very Large Tables: many maintenance tasks are made >>> *much* easier. >> The problem is, you can't partition every table as long as Postgres >> does not support a primary key that is independent of the partitioning key >> (i.e. until it has "global indexes" as they are called in Oracle) > I personally hope that we will never have global indexes. > I am not looking forward to helping customers with the problems that > they create (long duration of ATTACH/DETACH PARTITION, index fragmentation). I've been using what Oracle calls "global indexes" for 20 years. They're super useful when -- for example -- you want to partition a transaction table by a date field, while the PK is synthetic. Up until about two years ago, I purged old data every six months. (Then it was migrated from the legacy RDBMS to Oracle.) Yes, you've got to drop and rebuild the indices, but that's a small price to pay for the simplicity of archiving (especially when the indices are built in parallel). -- Angular momentum makes the world go 'round.