Subject: Re: To take backup of Postgresql Database without large objects

From: "David G. Johnston" <[email-masked]>
Date: Fri, 11 Apr 2025 22:14:00 -0700

On Friday, April 11, 2025, [email-masked] <[email-masked]>
wrote:
>
>
> bytea field also included in the backup.
>

Bytea typed columns are completely separate things than large objects.  You
cannot exclude individual columns using pg_dump.

David J.

---

From: "[email-masked]" <[email-masked]>
Date: Sat, 12 Apr 2025 05:34:52 +0000 (UTC)

Thanks.Then I've misunderstood large objects.  Is there document to explain large objects?  We store images in bytea column.
Happiness Always
BKR Sivaprakash
    On Saturday 12 April, 2025 at 10:44:21 am IST, David G. Johnston <[email-masked]> wrote:  
 
 On Friday, April 11, 2025, [email-masked] <[email-masked]> wrote:

Bytea typed columns are completely separate things than large objects.  You cannot exclude individual columns using pg_dump.
David J.

---

From: Christophe Pettus <[email-masked]>
Date: Fri, 11 Apr 2025 22:37:19 -0700

> On Apr 11, 2025, at 22:34, [email-masked] wrote:
> Then I've misunderstood large objects.  Is there document to explain large objects?  

Large objects are a relatively old and now little-used feature of PostgreSQL that predates the bytea type:

	https://www.postgresql.org/docs/current/largeobjects.html

As was mentioned, you cannot exclude individual columns with pg_dump; you have to exclude the entire table.