agora inbox for pgsql-hackers@postgresql.org
help / color / mirror / Atom feedFrom: Antonin Houska <ah@cybertec.at>
Cc: shihao zhong <zhong950419@gmail.com>
Cc: Alvaro Herrera <alvherre@kurilemu.de>
Cc: Fujii Masao <masao.fujii@gmail.com>
Cc: Radim Marek <radim@boringsql.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: REPACK (CONCURRENTLY) might keep dropped-column data
Date: Tue, 06 Oct 2026 12:44:12 +0200
Message-ID: <31417.1791283452@localhost> (raw)
In-Reply-To: <12438.1791272113@localhost>
References: <CAHGQGwG9bHxhs4Nj+9avSjSGh0vdYNQgEuz+pmJ-H5be6tEBTw@mail.gmail.com>
<asOEsmPw75ifqMua@alvherre.pgsql>
<CAGRkXqTxse0sTb43z3kFAHDrffjkamHkFGfoLEtwRkr_QfDGGg@mail.gmail.com>
<12438.1791272113@localhost>
Antonin Houska <ah@cybertec.at> wrote:
> shihao zhong <zhong950419@gmail.com> wrote:
>
> > It can also make REPACK fail. If the columns that are left need no
> > TOAST table, the new heap has none, and on master I get:
> >
> > ERROR: row is too big: size 16424, maximum size 8160
>
> Can you please be more specific about this? I don't understand why the new
> heap has no TOAST relation in such a case. Perhaps a bug in see
> heapam_relation_needs_toast_table()? I'm not sure it should return here,
> regardless the tuple size.
>
> if (!has_toastable_attrs)
> return false; /* nothing to toast? */
I could reproduce error like this independently from REPACK - see the scripts
attached. However, I realize that it does not help to remove this part from
heapam_relation_needs_toast_table(): it would only enforce creation of the
TOAST table if all the attributes had storage TYPSTORAGE_PLAIN, but such
attributes cannot be TOASTed anyway.
--
Antonin Houska
Web: https://www.cybertec-postgresql.com
Attachments:
[application/gzip] create.sql.gz (3.7K, ../31417.1791283452@localhost/2-create.sql.gz)
download
[application/gzip] insert.sql.gz (83B, ../31417.1791283452@localhost/3-insert.sql.gz)
download
view thread (14+ messages)
Message-ID: <31417.1791283452@localhost>
Permalink: ../31417.1791283452@localhost/
Also on: postgresql.org/message-id/31417.1791283452@localhost
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: ah@cybertec.at, zhong950419@gmail.com, alvherre@kurilemu.de, masao.fujii@gmail.com, radim@boringsql.com, pgsql-hackers@lists.postgresql.org
Subject: Re: REPACK (CONCURRENTLY) might keep dropped-column data
In-Reply-To: <31417.1791283452@localhost>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox