pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Euler Taveira <euler@eulerto.com>
To: Nathan Bossart <nathandbossart@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: Alexander Lakhin <exclusion@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Jonathan S. Katz <jkatz@postgresql.org>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Large expressions in indexes can't be stored (non-TOASTable)
Date: Wed, 09 Apr 2025 20:54:21 -0300
Message-ID: <18a111db-9f31-449c-a14b-61779a69f344@app.fastmail.com> (raw)
In-Reply-To: <Z_bFDNzcqWxatpL-@nathan>
References: <ZyLFC24UpcIJJmwT@paquier.xyz>
	<Z0TQG6869v8t-hV5@nathan>
	<Z0a6IwjW36af71J7@paquier.xyz>
	<Z0dB1ld2iPcS6nC9@nathan>
	<CAA4eK1LbhNxhczGJwuGURURc2pHVhdbmcnstmNaGOvcvdnP40Q@mail.gmail.com>
	<Z-_sixINC08J_SQB@nathan>
	<CAA4eK1LeMM8royHj5UyMBDbspD7+_70AJkV4Uji122hmkn7jOw@mail.gmail.com>
	<Z_WGI4cKoTjhUXrs@nathan>
	<4c2a6100-738e-48cc-8a11-2d85f95ae0ed@app.fastmail.com>
	<Z_X1jfsMrBBNUx4n@paquier.xyz>
	<Z_bFDNzcqWxatpL-@nathan>

On Wed, Apr 9, 2025, at 4:05 PM, Nathan Bossart wrote:
> On Wed, Apr 09, 2025 at 01:20:29PM +0900, Michael Paquier wrote:
> > I guess that's the consensus, then.  No objections to the removal here.
> 
> That would look like the attached.  There are still a couple of other known
> TOAST snapshot issues I need to revisit, but this sidesteps a few of them.
> But this'll need to wait for a couple of months until v19 development
> begins.

LGTM. I have a few suggestions.
 
+   /*
+    * To avoid needing a TOAST table for pg_replication_origin, we restrict
+    * replication origin names to 512 bytes.  This should be more than enough
+    * for all practical use.
+    */
+   if (strlen(roname) > MAX_RONAME_LEN)
+       ereport(ERROR,

I wouldn't duplicate the comment. Instead, I would keep it only in origin.h.

+                errdetail("Repilcation origin names must be no longer than %d bytes.",
+                          MAX_RONAME_LEN)));

s/Repilcation/Replication/

+#define MAX_RONAME_LEN (512)

It is just a cosmetic suggestion but I usually use parentheses when it is an
expression but don't include it for a single number.

Should we document this maximum length?


--
Euler Taveira
EDB   https://www.enterprisedb.com/

view thread (62+ messages)  latest in thread

Message-ID: <18a111db-9f31-449c-a14b-61779a69f344@app.fastmail.com>
Permalink:  ../18a111db-9f31-449c-a14b-61779a69f344@app.fastmail.com/
Also on:    postgresql.org/message-id/18a111db-9f31-449c-a14b-61779a69f344@app.fastmail.com

 · 

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: euler@eulerto.com, nathandbossart@gmail.com, michael@paquier.xyz, amit.kapila16@gmail.com, exclusion@gmail.com, tgl@sss.pgh.pa.us, jkatz@postgresql.org, pgsql-hackers@lists.postgresql.org
  Subject: Re: Large expressions in indexes can't be stored (non-TOASTable)
  In-Reply-To: <18a111db-9f31-449c-a14b-61779a69f344@app.fastmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox