pgsql: Use multi-inserts for pg_ts_config_map

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Use multi-inserts for pg_ts_config_map
Date: 2022-11-16 05:34:01
Message-ID: E1ovB3h-000PWA-6T@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Daniel Gustafsson 2022-11-16 09:33:24 pgsql: doc: update metacpan.org links to avoid redirects
Previous Message Jeff Davis 2022-11-16 04:08:13 pgsql: Fix test in ae168c794f, per buildfarm.