postgresql/contrib/test_decoding/sql
Andres Freund 5f79580ad6 Fix memory lifetime issues of replication slot stats.
When accessing replication slot stats, introduced in 9868167500,
pgstat_read_statsfiles() reads the data into newly allocated
memory. Unfortunately the current memory context at that point is the
callers, leading to leaks and use-after-free dangers.

The fix is trivial, explicitly use pgStatLocalContext. There's some
potential for further improvements, but that's outside of the scope of
this bugfix.

No backpatch necessary, feature is only in HEAD.

Author: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/20210317230447.c7uc4g3vbs4wi32i@alap3.anarazel.de
2021-03-17 16:21:46 -07:00
..
binary.sql
ddl.sql Add regression tests for REPLICA IDENTITY with dropped indexes 2020-08-26 20:42:27 +09:00
decoding_in_xact.sql
decoding_into_rel.sql
messages.sql
permissions.sql
prepared.sql
replorigin.sql Replace superuser check by ACLs for replication origin functions 2020-06-14 12:40:37 +09:00
rewrite.sql
slot.sql
spill.sql
stats.sql Fix memory lifetime issues of replication slot stats. 2021-03-17 16:21:46 -07:00
stream.sql Fix the logical streaming test. 2020-08-08 12:13:18 +05:30
time.sql
toast.sql Propagate ALTER TABLE ... SET STORAGE to indexes 2020-05-08 08:39:17 +02:00
truncate.sql Implement streaming mode in ReorderBuffer. 2020-08-08 07:47:06 +05:30
twophase_stream.sql Add option to enable two_phase commits via pg_create_logical_replication_slot. 2021-03-03 07:34:11 +05:30
twophase.sql Add option to enable two_phase commits via pg_create_logical_replication_slot. 2021-03-03 07:34:11 +05:30
xact.sql