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 1tuxHB-00Es6d-Fo for pgsql-general@arkaria.postgresql.org; Wed, 19 Mar 2025 17:32:21 +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 1tuxHA-008lC8-7B for pgsql-general@arkaria.postgresql.org; Wed, 19 Mar 2025 17:32:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tuxH9-008lBs-Gn for pgsql-general@lists.postgresql.org; Wed, 19 Mar 2025 17:32:19 +0000 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tuxH7-003jto-1e for pgsql-general@lists.postgresql.org; Wed, 19 Mar 2025 17:32:18 +0000 Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-5e8be1bdb7bso8102145a12.0 for ; Wed, 19 Mar 2025 10:32:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742405536; x=1743010336; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=+UawWSIq6zw72MBRb3hK9SY985U5LSS0TciJjd7m4SI=; b=RmlIW5iIgXLVK7pScYl+s+or09kXccf70ysN0DHciSpjFNHzRuijtOsIgIe+Bk9dr/ lYs0oQGEaVszc7lu4/xz2lR48CQ9/Oh8cO92b631QxKyWiOU/ChlX8nkZlxsJsGCzpPp VhDQY8O6QkkPo2KoZ1HuBGHLoIphIwKB7D+JDMyvy+Sh3VTanc4Oew5KbJgWi3W/lQUP O34JS0gKlHJ45cMoinGXAEXQma24ut97aeXvbz8d/2lIRauErByfDSV2DtaUWcDKan1R YjAboAiPxYonm4wrLcNXSQ3MG7YQof4TM+Y0L9iTQg8/7w4aUeHoe3PmfuuvO92mlq1X 0xrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742405536; x=1743010336; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+UawWSIq6zw72MBRb3hK9SY985U5LSS0TciJjd7m4SI=; b=N/7BZgjmVIb6DQBiufHmmEh5/TjuaEG/2S1mZXGCXbPbz9lsFw91bXnrCRlcaCE6bo aH83Q+TDQvzxudXRH1SNsz0oSfSNp8jq8mAra7AVuSphdFlWFcQNA0R5I0PwHfPbAvir CQIvOYrevRm1PlYf2AtvZLjh8w7099IKJz/DaeNL6jGFA34Oi5EQVO9m0pqpB0ldqvdO Wmud3xw9HJVgUy5U8ahhQ0sbgMvud5QtMnOITG8ExwuMuwxUu6EA4+XL3//fKJfrpKNP HvysmezcoRsN0k4pSltggPKWshnA4ojLVBwdFfpisHNjMztloNsF8Z5rrPRyyZjapPMu R2bw== X-Forwarded-Encrypted: i=1; AJvYcCVp/6nYh9PZusmuAAo6IKd+GUQ00/6nXXyZMG+PNzbQwdRoD6Dmdhftu+mMD2wWYBmf4AAJWkS3HMT6ClE8@lists.postgresql.org X-Gm-Message-State: AOJu0Yz35UNUAnTwtoO74lTZAuuBufAFc+WEz+JIH3qHdKYmrT8BJl97 7fmAJck+A88jyl6CozJ5WcRgqYQXd3Z+eaFjWcRgws9Pz0S6JLIhuuwc1/NMO1LzcvUFVp7ueYs GgB0Cztfeo/L4vF8W7vp7EzpTeBk= X-Gm-Gg: ASbGnct6Bau3gMsS4dqw4/OtM0FfGeP5JIphsYjY5eZgvXgE/y5Nb1emKd8vBaKogCL 0V4AKOJrM9YVhUpVfzrmCG6Q70WhnNzgrqRhSHsIH9J34rWEk6WSi+JZGfsHbiMSqxvkkBqRYX5 VQlpz3Vw53B+YBma/12UBJrMTbKQpCeT8iFvZg X-Google-Smtp-Source: AGHT+IFMf1YVtR6t2dwaffGmLF1sUZbphiPlcbqbSjOS/e9vpOqez6vdiQJMzpESxSzWtjLIBKSk49KZboHj2rD0Kxs= X-Received: by 2002:a05:6402:42c8:b0:5de:c9d0:6742 with SMTP id 4fb4d7f45d1cf-5eb80d14002mr3667769a12.9.1742405536165; Wed, 19 Mar 2025 10:32:16 -0700 (PDT) MIME-Version: 1.0 References: <202503191713.6pezw2uqo2c3@alvherre.pgsql> In-Reply-To: From: Siraj G Date: Wed, 19 Mar 2025 23:02:04 +0530 X-Gm-Features: AQ5f1JppTwtGvh7n_e51-fEfMNQAaVq7PWHG5e7v9IswuNkHhHh5dxkyyf-kDG4 Message-ID: Subject: Re: size of attributes table is too big To: Pavel Stehule Cc: =?UTF-8?Q?=C3=81lvaro_Herrera?= , pgsql-general@lists.postgresql.org Content-Type: multipart/alternative; boundary="00000000000009b9000630b567b8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000009b9000630b567b8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello Pavel The SQL instance is a target of google DMS and it does have a physical replica. A couple of weeks back we did have a performance issue and vacuum was run at that time to fix the problem. Very soon we may run into the same problem I presume. Regards Siraj On Wed, Mar 19, 2025 at 10:47=E2=80=AFPM Pavel Stehule wrote: > > > st 19. 3. 2025 v 18:14 odes=C3=ADlatel =C3=81lvaro Herrera > napsal: > >> Hello >> >> On 2025-Mar-19, Siraj G wrote: >> >> > I have a PG (v16) instance which is occupying around 1TB of storage. >> Out of >> > this, around 350GB is occupied by the table pg_catalog.pg_attribute. >> > Why is the catalog table's size so big? >> >> Heavy use of temp tables is a known cause of this. >> >> > I think this table must have tons of dead tuples. Please suggest to me >> if >> > we can purge any data/shrink the size of this table. >> >> Yeah, I'd also bet that there are tons of dead tuples, or just unused >> free space. To purge it you would use VACUUM FULL, though that would >> need to lock all accesses to the table. >> >> Does your instance run with autovacuum disabled perchance? >> > > or long unclosed transactions, maybe forgotten replication slots, ... > > It is very strange so with this size it is still usable. Today hardware i= s > unbelievable strong > > Regards > > Pavel > > >> >> -- >> =C3=81lvaro Herrera PostgreSQL Developer =E2=80=94 >> https://www.EnterpriseDB.com/ >> Bob [Floyd] used to say that he was planning to get a Ph.D. by the "gree= n >> stamp method," namely by saving envelopes addressed to him as 'Dr. Floyd= '. >> After collecting 500 such letters, he mused, a university somewhere in >> Arizona would probably grant him a degree. (Don Knuth) >> >> >> --00000000000009b9000630b567b8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Pavel

The SQL instance is a targe= t of google DMS and it does have a physical replica.

A couple of weeks back we did have a performance issue and vacuum was ru= n at that time to fix the problem. Very soon we may run into the same probl= em I presume.

Regards
Siraj
<= br>
On Wed, Mar 19, 2025 at 10:47=E2=80=AFPM Pavel Stehule <= pavel.stehule@gmail.com> = wrote:


st 19. 3. 2025 v=C2=A018:14 odes=C3=ADlatel = =C3=81lvaro Herrera <alvherre@alvh.no-ip.org> napsal:
Hello

On 2025-Mar-19, Siraj G wrote:

> I have a PG (v16) instance which is occupying around 1TB of storage. O= ut of
> this, around 350GB is occupied by the table pg_catalog.pg_attribute. > Why is the catalog table's size so big?

Heavy use of temp tables is a known cause of this.

> I think this table must have tons of dead tuples. Please suggest to me= if
> we can purge any data/shrink the size of this table.

Yeah, I'd also bet that there are tons of dead tuples, or just unused free space.=C2=A0 To purge it you would use VACUUM FULL, though that would<= br> need to lock all accesses to the table.

Does your instance run with autovacuum disabled perchance?
=

or long unclosed transactions, maybe forgotten replicat= ion slots, ...

It is very strange so with this siz= e it is still usable. Today hardware is unbelievable strong

<= /div>
Regards

Pavel
=C2=A0
<= /div>

--
=C3=81lvaro Herrera=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0PostgreSQL Developer= =C2=A0 =E2=80=94=C2=A0 https://www.EnterpriseDB.com/
Bob [Floyd] used to say that he was planning to get a Ph.D. by the "gr= een
stamp method," namely by saving envelopes addressed to him as 'Dr.= Floyd'.
After collecting 500 such letters, he mused, a university somewhere in
Arizona would probably grant him a degree.=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 (Don Knuth)


--00000000000009b9000630b567b8--