postgresql/src/backend
Tomas Vondra c1ec02be1d Reuse BrinDesc and BrinRevmap in brininsert
The brininsert code used to initialize (and destroy) BrinDesc and
BrinRevmap for each tuple, which is not free. This patch initializes
these structures only once, and reuses them for all inserts in the same
command. The data is passed through indexInfo->ii_AmCache.

This also introduces an optional AM callback "aminsertcleanup" that
allows performing custom cleanup in case simply pfree-ing ii_AmCache is
not sufficient (which is the case when the cache contains TupleDesc,
Buffers, and so on).

Author: Soumyadeep Chakraborty
Reviewed-by: Alvaro Herrera, Matthias van de Meent, Tomas Vondra
Discussion: https://postgr.es/m/CAE-ML%2B9r2%3DaO1wwji1sBN9gvPz2xRAtFUGfnffpd0ZqyuzjamA%40mail.gmail.com
2023-11-25 20:27:28 +01:00
..
access Reuse BrinDesc and BrinRevmap in brininsert 2023-11-25 20:27:28 +01:00
archive Redesign archive modules 2023-02-17 14:26:42 +09:00
backup Change how a base backup decides which files have checksums. 2023-11-14 10:51:05 -05:00
bootstrap Remove distprep 2023-11-06 15:18:04 +01:00
catalog Optimize check_search_path() by using SearchPathCache. 2023-11-20 15:53:42 -08:00
commands C comment: fix typos with unnecessary apostrophes 2023-11-22 23:41:15 -05:00
executor Reuse BrinDesc and BrinRevmap in brininsert 2023-11-25 20:27:28 +01:00
foreign Expand some more uses of "deleg" to "delegation" or "delegated". 2023-05-21 10:55:18 -04:00
jit Make ResourceOwners more easily extensible. 2023-11-08 13:30:50 +02:00
lib Make binaryheap available to frontend code. 2023-09-18 12:18:33 -07:00
libpq Fix timing-dependent failure in GSSAPI data transmission. 2023-11-23 13:30:18 -05:00
main Remove obsolete defense against strxfrm() bugs. 2023-04-20 13:20:14 +12:00
nodes Remove distprep 2023-11-06 15:18:04 +01:00
optimizer Ensure we preprocess expressions before checking their volatility. 2023-11-16 10:05:14 -05:00
parser Compute aggregate argument types correctly in transformAggregateCall(). 2023-11-06 10:38:00 -05:00
partitioning Add trailing commas to enum definitions 2023-10-26 09:20:54 +02:00
po Translation updates 2023-08-07 12:39:30 +02:00
port Remove distprep 2023-11-06 15:18:04 +01:00
postmaster Use ResourceOwner to track WaitEventSets. 2023-11-23 13:31:36 +02:00
regex Add trailing commas to enum definitions 2023-10-26 09:20:54 +02:00
replication Fix the initial sync tables with no columns. 2023-11-22 11:44:14 +05:30
rewrite Add TupleDescGetDefault() 2023-09-27 18:52:40 +01:00
snowball Remove distprep 2023-11-06 15:18:04 +01:00
statistics Retire MemoryContextResetAndDeleteChildren() macro. 2023-11-15 13:42:30 -06:00
storage Use ResourceOwner to track WaitEventSets. 2023-11-23 13:31:36 +02:00
tcop Retire MemoryContextResetAndDeleteChildren() macro. 2023-11-15 13:42:30 -06:00
tsearch Limit to_tsvector_byid's initial array allocation to something sane. 2023-09-25 11:50:28 -04:00
utils Use SECS_PER_HOUR macro in tzparser.c, instead of constants 2023-11-24 22:36:23 -05:00
.gitignore
Makefile Remove distprep 2023-11-06 15:18:04 +01:00
common.mk Blind attempt to fix LLVM dependency in the backend 2022-09-15 10:53:48 +07:00
meson.build Add win32ver data to meson-built postgres.exe. 2023-06-12 07:40:38 -07:00
nls.mk Remove distprep 2023-11-06 15:18:04 +01:00