From: | Peter Geoghegan <pg(at)bowt(dot)ie> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Cc: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
Subject: | Moving nbtree preprocessing code into a new .c file |
Date: | 2025-01-09 18:01:38 |
Message-ID: | CAH2-WznwNn1BDOpWxHBUK1f3Rdw8pO9UCenWXnvT=n9GO8GnLA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
At one point during my work on nbtree SAOP scans (during the Postgres
17 cycle), Heikki suggested that I move all nbtree preprocessing code
into its own file. For whatever reason I didn't follow-up on his
suggestion at the time. The nbtree skip scan patch will add quite a
bit more preprocessing code, though, so now seems like a good time to
follow up -- better late than never.
Attached mechanical patch relocates all code that only runs during
nbtree preprocessing into a new file, nbtpreprocesskeys.c. I verified
that the changes in the patch were strictly mechanical using "git diff
--no-ext-diff --color --color-moved=dimmed-zebra master".
Note that there was some minor reordering of the functions in the new
nbtpreprocesskeys.c, relative to their original nbtutils.c order. The
reordering puts _bt_preprocess_array_keys and related routines towards
the end of the file (not at the start, as in nbtutils.c). Naturally,
nbtpreprocesskeys.c starts with _bt_preprocess_keys() itself, since
that is the only externally callable function. There was also some
minor reordering within _bt_preprocess_keys-owned functions, to make
the order consistent with the actual order in which each function is
first called by _bt_preprocess_keys (I wouldn't usually bother with
this kind of reordering, but it's worth doing now).
--
Peter Geoghegan
Attachment | Content-Type | Size |
---|---|---|
v1-0001-Move-nbtree-preprocessing-into-new-.c-file.patch | application/octet-stream | 132.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Nathan Bossart | 2025-01-09 18:06:29 | Re: New GUC autovacuum_max_threshold ? |
Previous Message | Mahendra Singh Thalor | 2025-01-09 17:26:42 | Re: Non-text mode for pg_dumpall |