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 1pMsAl-0007Su-Vu for pgsql-general@arkaria.postgresql.org; Tue, 31 Jan 2023 15:03:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pMsAk-0003hu-Ro for pgsql-general@arkaria.postgresql.org; Tue, 31 Jan 2023 15:03:46 +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 1pMsAk-0003hk-DG for pgsql-general@lists.postgresql.org; Tue, 31 Jan 2023 15:03:46 +0000 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pMsAg-0007SD-BA for pgsql-general@lists.postgresql.org; Tue, 31 Jan 2023 15:03:45 +0000 Received: by mail-ed1-x529.google.com with SMTP id be12so3406113edb.4 for ; Tue, 31 Jan 2023 07:03:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20210112.gappssmtp.com; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=kF1pojVBbjqmz35k+invkflzXKsgZ1L0nOjVUDl+AOg=; b=pu2/V48QRsFWs0Dgb00Hq9qrlK1g8SBD5I2qMR17A6PD5GNE/1THFC0hKQPkpsLZmG yaG91cqs6bV3JlwdZhlJznWGLh/81vDXkqvnJKYT1ltnR93ZeZeCEk/26hSKLYPjhljE KgaSRLToffqbO9Ky0NDflC/mn2q9d62D5cdqWhsOuHJtwiD6rLkU8+nmHOrv8VBa27QF uwEY/XNx4Ety1sWYWPxHXuIN4K7pC9PIVzCyzPLWs7XUSDRpiudzPVT4cu8iVkz2Q8ii D1E31GS4VzJHe9/i0+t8O+3lMsmGxFHxfbfvVWKjnjDOisL9Azt6r3z4rtx+P2iyBxeM ZGvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=kF1pojVBbjqmz35k+invkflzXKsgZ1L0nOjVUDl+AOg=; b=dq57lX+/LDgcVuGanOmad2Q1HEudFRZiEgNxboIcW43RjJn2YGtFtzT20eGRbnloW/ cpB6v0W6slGTE5ACrAoFZKHfdocie8lPSx4A4go/J7Dp6p+SfIPxuNNOFfxy1ui89G7C q4jiSkt///4XEAK3AzTLbqxnUtKyJ3xIcJqq5WqeTwgVsYJKDXEFnzEP9NlgmH9ggQRs rmhg7jyevAQmXxT31n4UABv29BixIaPzmK5kiCUdHsfcVwHmk1SziukIF9uJ+JtI2aBR aNqfbHoJlsWJp3F6T29HJTI3zicsnxVviQrtyznau93q8Dm5hTF/kF6ry1gpSHEho/t/ xC3Q== X-Gm-Message-State: AO0yUKX0Hl1e88UWygWOttRpEVunHvP8d16pWWwWVQGchws+la6wSDVr U5HiLepk/RzQ+/ey4Kg+B42e4Q== X-Google-Smtp-Source: AK7set+7KCBm/isbYCd4ZOfuHgqyU7Ncy8qyPuTnsThfDc+nrnivp/gMW+av6dhaBLdgJgcD3HdogQ== X-Received: by 2002:a05:6402:354d:b0:4a2:4dfe:fe76 with SMTP id f13-20020a056402354d00b004a24dfefe76mr4262180edd.30.1675177419974; Tue, 31 Jan 2023 07:03:39 -0800 (PST) Received: from dynamic-pd01.res.v6.highway.a1.net ([2001:871:5e:539:1b2c:c52a:475d:310c]) by smtp.gmail.com with ESMTPSA id c23-20020a170906155700b00869f2ca6a87sm8483078ejd.135.2023.01.31.07.03.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:03:39 -0800 (PST) Message-ID: <5608f8e9e4a93d1a5b2cf227542ca8fdd4874688.camel@cybertec.at> Subject: Re: toast useless From: Laurenz Albe To: Marcos Pegoraro , Simon Riggs Cc: "pgsql-generallists.postgresql.org" Date: Tue, 31 Jan 2023 16:03:37 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.3 (3.46.3-1.fc37) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 2023-01-31 at 09:34 -0300, Marcos Pegoraro wrote: > Simon Riggs escreveu: > > On Tue, 13 Sept 2022 at 13:29, Marcos Pegoraro wrot= e: > > > >=20 > > > > What problem do they cause you? > > >=20 > > >=20 > > > They don't cause any problem, I was just trying to get my database as= clean as possible. > > > I have some thousands of these toast tables with 8k bytes, so I was t= rying to eliminate them > > > But if there is no way, ok > >=20 > > They might be optimized away one day, but for now, they are essential. >=20 > When version 16 comes in it=C2=B4ll be possible to define [1] field STORA= GE=C2=A0on CREATE TABLE step.=C2=A0 > I have some thousands of toast files which are completely useless on my d= atabase, so how to remove=C2=A0them. >=20 > pg_upgrade ? Those unneeded toast files will be dropped=C2=A0automaticall= y ? > If not, if I do "alter table x alter column y set storage main" then toas= t file will still exist ? >=20 > [1] https://www.postgresql.org/message-id/flat/de83407a-ae3d-a8e1-a788-92= 0eb334f25b@sigaev.ru Leave them. They won't bother you, and they won't occupy much space. Yours, Laurenz Albe