pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Use multi-inserts for pg_ts_config_map
Date: Wed, 16 Nov 2022 05:34:01 +0000
Message-ID: <E1ovB3h-000PWA-6T@gemulon.postgresql.org> (raw)

Use multi-inserts for pg_ts_config_map

Two locations working on pg_ts_config_map are switched from
CatalogTupleInsert() to a multi-insert approach with tuple slots:
- ALTER TEXT SEARCH CONFIGURATION ADD/ALTER MAPPING when inserting new
entries.  The number of entries to insert is known in advance, so is the
number of slots needed.  Note that CatalogTupleInsertWithInfo() is now
used for the entry updates.
- CREATE TEXT SEARCH CONFIGURATION, where up to ~20-ish records could be
inserted at once.  The number of slots is not known in advance, hence
a slot initialization is delayed until a tuple is stored in it.

Like all the changes of this kind (1ff4161, 63110c6 or e3931d01), an
insert batch is capped at 64kB.

Author: Michael Paquier, Ranier Vilela
Reviewed-by: Kyotaro Horiguchi
Discussion: https://postgr.es/m/Y3M5bovrkTQbAO4W@paquier.xyz

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/63c833f4bdca3251347dd622102de0908a934330

Modified Files
--------------
src/backend/commands/tsearchcmds.c | 120 ++++++++++++++++++++++++++++++-------
1 file changed, 97 insertions(+), 23 deletions(-)



Message-ID: <E1ovB3h-000PWA-6T@gemulon.postgresql.org>
Permalink:  ../E1ovB3h-000PWA-6T@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ovB3h-000PWA-6T@gemulon.postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: Use multi-inserts for pg_ts_config_map
  In-Reply-To: <E1ovB3h-000PWA-6T@gemulon.postgresql.org>
  References: <E1ovB3h-000PWA-6T@gemulon.postgresql.org>

* 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