postgres/contrib/postgres_fdw
David Rowley 5983a4cffc Introduce CompactAttribute array in TupleDesc, take 2
The new compact_attrs array stores a few select fields from
FormData_pg_attribute in a more compact way, using only 16 bytes per
column instead of the 104 bytes that FormData_pg_attribute uses.  Using
CompactAttribute allows performance-critical operations such as tuple
deformation to be performed without looking at the FormData_pg_attribute
element in TupleDesc which means fewer cacheline accesses.

For some workloads, tuple deformation can be the most CPU intensive part
of processing the query.  Some testing with 16 columns on a table
where the first column is variable length showed around a 10% increase in
transactions per second for an OLAP type query performing aggregation on
the 16th column.  However, in certain cases, the increases were much
higher, up to ~25% on one AMD Zen4 machine.

This also makes pg_attribute.attcacheoff redundant.  A follow-on commit
will remove it, thus shrinking the FormData_pg_attribute struct by 4
bytes.

Author: David Rowley
Reviewed-by: Andres Freund, Victor Yegorov
Discussion: https://postgr.es/m/CAApHDvrBztXP3yx=NKNmo3xwFAFhEdyPnvrDg3=M0RhDs+4vYw@mail.gmail.com
2024-12-20 22:31:26 +13:00
..
expected Enable BUFFERS with EXPLAIN ANALYZE by default 2024-12-11 22:35:11 +13:00
sql Enable BUFFERS with EXPLAIN ANALYZE by default 2024-12-11 22:35:11 +13:00
.gitignore
connection.c Remove unused #include's from contrib, pl, test .c files 2024-10-28 08:02:17 +01:00
deparse.c Remove unused #include's from contrib, pl, test .c files 2024-10-28 08:02:17 +01:00
Makefile postgres_fdw: Add "used_in_xact" column to postgres_fdw_get_connections(). 2024-07-26 22:15:51 +09:00
meson.build postgres_fdw: Add "used_in_xact" column to postgres_fdw_get_connections(). 2024-07-26 22:15:51 +09:00
option.c Add INT64_HEX_FORMAT and UINT64_HEX_FORMAT to c.h. 2024-11-22 12:41:57 -06:00
postgres_fdw--1.1--1.2.sql postgres_fdw: Extend postgres_fdw_get_connections to return user name. 2024-09-18 12:51:48 +09:00
postgres_fdw--1.0--1.1.sql postgres_fdw: Add functions to discard cached connections. 2021-01-26 15:35:54 +09:00
postgres_fdw--1.0.sql
postgres_fdw.c Introduce CompactAttribute array in TupleDesc, take 2 2024-12-20 22:31:26 +13:00
postgres_fdw.control postgres_fdw: Add "used_in_xact" column to postgres_fdw_get_connections(). 2024-07-26 22:15:51 +09:00
postgres_fdw.h Treat number of disabled nodes in a path as a separate cost metric. 2024-08-21 10:12:30 -04:00
shippable.c Update copyright for 2024 2024-01-03 20:49:05 -05:00