From: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Alexander Lakhin <exclusion(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Large expressions in indexes can't be stored (non-TOASTable) |
Date: | 2024-10-08 18:50:52 |
Message-ID: | ZwV_DBQa8Qw6kKY2@nathan |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Sep 25, 2024 at 01:05:26PM +0900, Michael Paquier wrote:
> On Tue, Sep 24, 2024 at 02:26:08PM -0500, Nathan Bossart wrote:
>> So... maybe we
>> should just remove pg_replication_origin's TOAST table instead...
>
> I'd rather keep it, FWIW. Contrary to pg_authid it does not imply
> problems at the same scale because we would have access to the toast
> relation in all the code paths with logical workers or table syncs.
> The other one was at early authentication stages.
Okay.
> It sounds to me that we should be much more proactive in detecting
> these failures and add something like that on HEAD. That's cheap
> enough. As the checks are the same for all these code paths, perhaps
> just hide them behind a local macro to reduce the duplication?
In v2, I moved the assertions to a new function called by the heapam.c
routines. I was hoping to move them to the tableam.h routines, but several
callers (in particular, the catalog/indexing.c ones that are causing
problems) call the heap ones directly. I've also included a 0001 patch
that introduces a RelationGetToastRelid() macro because I got tired of
typing "rel->rd_rel->reltoastrelid".
0002 could probably use some more commentary, but otherwise I think it is
in decent shape. You (Michael) seem to be implying that I should
back-patch the actual fixes and only apply the new assertions to v18. Am I
understanding you correctly?
--
nathan
Attachment | Content-Type | Size |
---|---|---|
v2-0001-add-RelationGetToastRelid-macro.patch | text/plain | 12.7 KB |
v2-0002-ensure-we-have-a-snapshot-if-we-might-need-toast-.patch | text/plain | 6.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Ranier Vilela | 2024-10-08 19:09:00 | Avoid possible overflow (src/port/bsearch_arg.c) |
Previous Message | Alena Rybakina | 2024-10-08 18:29:30 | Re: On disable_cost |