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 1sVr6p-00Bzpf-CD for pgsql-general@arkaria.postgresql.org; Mon, 22 Jul 2024 11:21:39 +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 1sVr6n-000925-DL for pgsql-general@arkaria.postgresql.org; Mon, 22 Jul 2024 11:21:37 +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 1sVr6m-00091w-UA for pgsql-general@lists.postgresql.org; Mon, 22 Jul 2024 11:21:37 +0000 Received: from mail-oi1-x229.google.com ([2607:f8b0:4864:20::229]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sVr6k-000qc8-Nf for pgsql-general@postgresql.org; Mon, 22 Jul 2024 11:21:36 +0000 Received: by mail-oi1-x229.google.com with SMTP id 5614622812f47-3dab3b85623so2280777b6e.2 for ; Mon, 22 Jul 2024 04:21:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721647293; x=1722252093; darn=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=bBVrx1E9FW5Goi1WNpDi6cSCSacL12r/XAmgL9GAgsA=; b=j1qPWE2tzT8zH9Vpd//SK5sbcXSvZ+I3vXKrG1H6cNL4ZbJn9TNMrcfI8iEJ/Cvltw WPDgE2BiqcKfpuiJSaAU9HTvmQrUK39Mp7naAqpvRyt69SaT9k2x0W2rPLciiLhwLYwH a380jO/MNwTs0GHMloNzAHwvAVIlKZPIaBg7b1C8kxvPzq3Pj+bt5lXazKDcH+4mud2b G0HN5yGt3Ipy3CqA3Pfds58kkrp0XpILScg2b+JXI5Nv4s3E3hqSvIFfRPtv/HDEl6qR EO5tBZ6OH9uA6VIPUPSGXcz9ZPi/+QDFp8Q5FKX4zT8MCYW583mwbOA9zWCO61ooT0HU yB6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721647293; x=1722252093; 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=bBVrx1E9FW5Goi1WNpDi6cSCSacL12r/XAmgL9GAgsA=; b=qNoH3R740j8NWJ3OcSOu2ozu/fSBaVGbUuka2YaS9r8xyTVrOBQKeSjt+UdJCycvF7 WzMPejbgfoM8TWQiguDhlXWIRGvCVLCw3JOO+xFSlTNOuY19q+Bs2s4SU+nLQGlFheyb QzXt3CdqdglQD3zTFqwX26WYDqP2meJxFP44SYrVR6c8fCZRTcod02X47jbjL+bF5vQ0 e+KTZ0XnuZyqfx+a9Pr8ksyxWzj6u3qFu9Q4ImwP62J8ZpzXYRfNOcnMc1p8rxcuedr6 kYTtcFXwdCy2Gjgxv5uBqsJeN+bK/QZOkRO07Ke3En9sq/sGqHdWX81O91zjnXHo5fsf K+9Q== X-Gm-Message-State: AOJu0Yzrlmp3QgxONExTOzSRmX4J5Jzq8TE38kWVVbTeUPVP6tQvWZVr ff6uh8+p6iG+JGmQkfGtsCdGiOO44EKXrsn93p00jbDQHT3tgobfzEHPKPr9ZSDLGDy7biZyiVw syPhhexZVN4f2Op6ujKkMMln15h0mTICGejEh X-Google-Smtp-Source: AGHT+IFt+BbZWj69Ge+HHWsxkae9Arzb1r9jBAID05smxouCwhXWrVW9rP/A9hyLvv+dK9dqffxj6aBCec+DGYPLVF8= X-Received: by 2002:a05:6808:1993:b0:3d9:c48b:ea44 with SMTP id 5614622812f47-3dae973e6camr7531732b6e.15.1721647293657; Mon, 22 Jul 2024 04:21:33 -0700 (PDT) MIME-Version: 1.0 References: <01010190d2526ef9-5d0a93fe-30ad-4d6b-9bc8-269c188bd42e-000000@us-west-2.amazonses.com> In-Reply-To: <01010190d2526ef9-5d0a93fe-30ad-4d6b-9bc8-269c188bd42e-000000@us-west-2.amazonses.com> From: khan Affan Date: Mon, 22 Jul 2024 16:21:22 +0500 Message-ID: Subject: Re: Bloated pg_catalog.pg_largeobjects To: postgresql@thewickedtribe.net Cc: "pgsql-general@postgresql.org" Content-Type: multipart/alternative; boundary="0000000000005dfbf4061dd43f7f" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000005dfbf4061dd43f7f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi I would suggest to backup your DB before doing such a thing. Run Vaccum Full, (VACUUM FULL pg_catalog.pg_largeobject) Running this on the system table might be risky Make sure you backup the database. & if you are using PG version above 9.1 use Pg_repack to reclaim the space. Note: It can be disruptive, so planning and preparing for potential downtime is essential. Thanks & regards *Muhammad Affan (*=EC=95=84=ED=8C=90*)* *PostgreSQL Technical Support Engineer** / Pakistan R&D* Interlace Plaza 4th floor Twinhub office 32 I8 Markaz, Islamabad, Pakistan On Sun, Jul 21, 2024 at 3:46=E2=80=AFAM wro= te: > Hello All, > > I've got a cluster that's having issues with pg_catalog.pg_largeobject > getting massively bloated. Vacuum is running OK and there's 700GB of free > space in the table and only 100GB of data, but subsequent inserts seem to > be not using space from the FSM and instead always allocating new pages. > The table just keeps growing. > > Is this a known thing, maybe something special about LOs? > > Also, is the only way to recover space here a vacuum full on the table > since it's a catalog table? > > Thanks, > -- > Jon Erdman (aka StuckMojo on IRC) > PostgreSQL Zealot > --0000000000005dfbf4061dd43f7f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi=C2=A0

I would suggest to backup your DB before d= oing such a thing.

Run Vaccum=C2=A0Full, (VAC= UUM FULL pg_catalog.pg_largeobject) Running this on the system table= might be risky Make sure you backup the database.

& if you are = using PG version above 9.1 use Pg_repack to reclaim the space.

Note:= =C2=A0 It can be disruptive, so planning and preparing for potential downtime is = essential.

Thanks &=C2=A0regards


Muhammad Aff= an (=EC=95=84=ED=8C=90<= font color=3D"#2255ff" face=3D"Arial">)

PostgreSQL Technical Support Engineer= =C2=A0/ Pakistan R&D

Interlace Plaza 4th floor Twinhub office 32 I8 Ma= rkaz, Islamabad, Pakistan


On Sun, Jul 21, 2024= at 3:46=E2=80=AFAM <po= stgresql@thewickedtribe.net> wrote:

Hello All,

I've got a cluster that's having = issues with pg_catalog.pg_largeobject getting massively bloated. Vacuum is = running OK and there's 700GB of free space in the table and only 100GB = of data, but subsequent inserts seem to be not using space from the FSM and= instead always allocating new pages. The table just keeps growing.

= Is this a known thing, maybe something special about LOs?

Also, is t= he only way to recover space here a vacuum full on the table since it's= a catalog table?

Thanks,

--=C2=A0
Jon Erdma= n (aka StuckMojo on IRC)
=C2=A0=C2=A0=C2=A0 PostgreSQL Zealot
--0000000000005dfbf4061dd43f7f--