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 1s1sfM-00Felz-Fm for pgsql-general@arkaria.postgresql.org; Tue, 30 Apr 2024 18:57:24 +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 1s1sfJ-0080EH-NO for pgsql-general@arkaria.postgresql.org; Tue, 30 Apr 2024 18:57:22 +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 1s1sfJ-0080E9-AH for pgsql-general@lists.postgresql.org; Tue, 30 Apr 2024 18:57:22 +0000 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1s1sfH-000ofL-NE for pgsql-general@lists.postgresql.org; Tue, 30 Apr 2024 18:57:20 +0000 Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-613ba027f22so99633a12.0 for ; Tue, 30 Apr 2024 11:57:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714503438; x=1715108238; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=m6rHopuEEkzm5qGxSy38U9NMHB2rXS7JPnAKW/ZQM1Y=; b=CkDy62nnrGOjhTqbA2s+x1jNIx9PvIPUAK2FtySV3g1/yLuxYvZtAZl6tuNDK8WuTa p/bdstNDUUfFhZ2p1asr74/w5rP+ACYa75B0jNvXMwG2Gq8h0yeLs+FMtwImSDwtQsFW cAcrnSLm9NmKfPVKSFBN0yDC/atknGLyG4VK1nri/UADa2Npmf8bD62wINqZUWjT71sf m6H4t+94TKWaGhSfASVzvXyDJm39U/8Sb9kGlOwHd0iZ7IgrClhHHriUOWqzY+WxwqES BI/H+CsRujaNyRU7KtLVhffP219QvLMjotMzbZowh5CRMeQGplW6f7C8pKYJR80s0oEV QipA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714503438; x=1715108238; h=cc:to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=m6rHopuEEkzm5qGxSy38U9NMHB2rXS7JPnAKW/ZQM1Y=; b=d46VyjaAdGbQsgOaxX4Q0Hny9YLMC4FeUua7ZMaVf6Efmc/BDZRyC5G0vc6wq0jLft /RFB6lvDhVkhF+lxG4VsgT8TX0Pe18C7et2pPuW3invtJTFbI/LocgAptdAnp4lx3pc/ pkwTvhZMFJmfFxHQVRqzWNRwdjoq647AXQAByF7cG0xnh1TbJZruM5UjnGd78qBYHcpk B9OdfGX5iPBsslNH5ewO2/YTXzWxDDATZC9aCtYvvOt9Lh/iBcJGnXhRuuXcNjsaxbGn YXeclrrBTkF5DD76QKFRRwUxEUcS8fw1GM0D6NLN8Tden6qtPcal0VKa/iTLm51jBB1T h8NA== X-Gm-Message-State: AOJu0Yw47wvrbFXBfaGQyn+X74qeU6Op/LPWMp//lGBAFgDYo/h4F7ry IhnsEIG7YZaxFU4ZCY1+igwfi8Pb2IWvSTAGTkuDSuOS8T6d2vj4wCMO5t2G5kpYCVmLN1bvn8A L2bjYM3oaqj8EkB1yjRCbTXRfWm2QjbRGGnk= X-Google-Smtp-Source: AGHT+IEFoxq5Kt/k4HxFisSmPIfB/LK7S9M64wPSEAJtMX6Chra3VAqkrz9uH+j9cR8dDlqsp4sftmh6DgieFyMa6C4= X-Received: by 2002:a17:90a:4611:b0:2a2:f4f4:2c4a with SMTP id w17-20020a17090a461100b002a2f4f42c4amr5043679pjg.21.1714503438183; Tue, 30 Apr 2024 11:57:18 -0700 (PDT) MIME-Version: 1.0 From: Gaurav Pant Date: Wed, 1 May 2024 00:26:41 +0530 Message-ID: Subject: Introduction of a new field in pg_class indicating presence of a large object in a table To: pgsql-general@lists.postgresql.org Cc: Gaurav Pant Content-Type: multipart/alternative; boundary="0000000000006633b8061754f0a1" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000006633b8061754f0a1 Content-Type: text/plain; charset="UTF-8" Hi All, I hope you're all doing well! Recently, I have across a scenario where one of our client was unable to perform a major version upgrade of their PostgreSQL instance as it was failing due to OOM errors. When reviewed the upgrade log files and queried pg_largeobject_metadata, we found a significant number of large objects (more than a million) due to which the upgrade seems to fail. As the client had a different vendor in the past, they are unsure of why large objects were created in the first place. However, in order to further dive deep, the requirement is to identify the tables (and the columns) which contain these large objects to decide on the next steps. I checked for online resources but could not find any information that helps in this regard. Although quite different from the above specified use case, pg_class does contain a field: 'reltoastrelid' that helps us to identify the presence of a toast table for any relation in PostgreSQL. I wanted to know if there is any such system table that we can use to identify and map the fields containing large objects and the respective tables and if it is not already there, do we have any plans to incorporate the same in pg_class like we have for pg_toast? Thanks and Regards, Gaurav Pant --0000000000006633b8061754f0a1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi All,

I hope you're all doing=C2= =A0well!

Recently, I have across a scenario=C2=A0w= here one of our=C2=A0client was unable to perform a major version upgrade o= f their PostgreSQL instance as it was failing due to OOM errors. When revie= wed the upgrade log files and queried pg_largeobject_metadata, we found a s= ignificant number of large objects (more than a million) due to which the u= pgrade seems to fail. As the client had a different vendor in the past, the= y are unsure of why large objects were created in the first=C2=A0place. How= ever, in order to further dive deep, the requirement is to identify the tab= les (and the columns) which contain these large objects to decide on the ne= xt steps. I checked for online resources but could not find any information= that helps in this=C2=A0regard.=C2=A0

Although qu= ite different from the above specified use case, pg_class does contain a fi= eld: 'reltoastrelid' that helps us to identify the presence of a to= ast table for any relation in PostgreSQL. I wanted to know if there is any = such system table that we can use to identify and map the fields containing= large objects and the respective tables and if it is not already there, do= we have any plans to incorporate the same in pg_class like we have for pg_= toast?

Thanks and Regards,
Gaurav Pant
--0000000000006633b8061754f0a1--