postgresql/src/backend/replication/logical
Masahiko Sawada efb8acc0d0 Replace binaryheap + index with pairingheap in reorderbuffer.c
A pairing heap can perform the same operations as the binary heap +
index, with as good or better algorithmic complexity, and that's an
existing data structure so that we don't need to invent anything new
compared to v16. This commit makes the new binaryheap functionality
that was added in commits b840508644 and bcb14f4abc unnecessary, but
they will be reverted separately.

Remove the optimization to only build and maintain the heap when the
amount of memory used is close to the limit, becuase the bookkeeping
overhead with the pairing heap seems to be small enough that it
doesn't matter in practice.

Reported-by: Jeff Davis
Author: Heikki Linnakangas
Reviewed-by: Michael Paquier, Hayato Kuroda, Masahiko Sawada
Discussion: https://postgr.es/m/12747c15811d94efcc5cda72d6b35c80d7bf3443.camel%40j-davis.com
2024-04-11 17:04:38 +09:00
..
Makefile Add a slot synchronization function. 2024-02-14 09:45:36 +05:30
applyparallelworker.c Replace BackendIds with 0-based ProcNumbers 2024-03-03 19:38:22 +02:00
decode.c Merge prune, freeze and vacuum WAL record formats 2024-03-25 14:59:58 +02:00
launcher.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
logical.c Ensure that the sync slots reach a consistent state after promotion without losing data. 2024-04-03 14:04:59 +05:30
logicalfuncs.c Introduce a new GUC 'standby_slot_names'. 2024-03-08 08:10:45 +05:30
meson.build Add a slot synchronization function. 2024-02-14 09:45:36 +05:30
message.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
origin.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
proto.c Remove unused 'countincludesself' argument to pq_sendcountedtext() 2024-03-04 12:56:05 +02:00
relation.c Admit deferrable PKs into rd_pkindex, but flag them as such 2024-03-08 16:32:29 +01:00
reorderbuffer.c Replace binaryheap + index with pairingheap in reorderbuffer.c 2024-04-11 17:04:38 +09:00
slotsync.c Fixup various StringInfo function usages 2024-04-10 11:53:32 +12:00
snapbuild.c Ensure that the sync slots reach a consistent state after promotion without losing data. 2024-04-03 14:04:59 +05:30
tablesync.c Fixup various StringInfo function usages 2024-04-10 11:53:32 +12:00
worker.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00