postgresql/src/test/regress/serial_schedule
Andres Freund 90c885cdab Increment xactCompletionCount during subtransaction abort.
Snapshot caching, introduced in 623a9ba79b, did not increment
xactCompletionCount during subtransaction abort. That could lead to an older
snapshot being reused. That is, at least as far as I can see, not a
correctness issue (for MVCC snapshots there's no difference between "in
progress" and "aborted"). The only difference between the old and new
snapshots would be a newer ->xmax.

While HeapTupleSatisfiesMVCC makes the same visibility determination, reusing
the old snapshot leads HeapTupleSatisfiesMVCC to not set
HEAP_XMIN_INVALID. Which subsequently causes the kill_prior_tuple optimization
to not kick in (via HeapTupleIsSurelyDead() returning false). The performance
effects of doing the same index-lookups over and over again is how the issue
was discovered...

Fix the issue by incrementing xactCompletionCount in
XidCacheRemoveRunningXids. It already acquires ProcArrayLock exclusively,
making that an easy proposition.

Add a test to ensure that kill_prior_tuple prevents index growth when it
involves aborted subtransaction of the current transaction.

Author: Andres Freund
Discussion: https://postgr.es/m/20210406043521.lopeo7bbigad3n6t@alap3.anarazel.de
Discussion: https://postgr.es/m/20210317055718.v6qs3ltzrformqoa%40alap3.anarazel.de
2021-04-06 09:24:50 -07:00

211 lines
3.4 KiB
Text

# src/test/regress/serial_schedule
# This should probably be in an order similar to parallel_schedule.
test: tablespace
test: boolean
test: char
test: name
test: varchar
test: text
test: int2
test: int4
test: int8
test: oid
test: xid
test: mvcc
test: float4
test: float8
test: bit
test: numeric
test: txid
test: uuid
test: enum
test: money
test: rangetypes
test: multirangetypes
test: pg_lsn
test: regproc
test: strings
test: numerology
test: point
test: lseg
test: line
test: box
test: path
test: polygon
test: circle
test: date
test: time
test: timetz
test: timestamp
test: timestamptz
test: interval
test: inet
test: macaddr
test: macaddr8
test: tstypes
test: geometry
test: horology
test: regex
test: type_sanity
test: opr_sanity
test: misc_sanity
test: comments
test: expressions
test: unicode
test: create_function_1
test: create_type
test: create_table
test: create_function_2
test: copy
test: copyselect
test: copydml
test: insert
test: insert_conflict
test: create_misc
test: create_operator
test: create_procedure
test: create_index
test: create_index_spgist
test: create_view
test: index_including
test: index_including_gist
test: create_aggregate
test: create_function_3
test: create_cast
test: constraints
test: triggers
test: select
test: inherit
test: typed_table
test: vacuum
test: drop_if_exists
test: updatable_views
test: roleattributes
test: create_am
test: hash_func
test: errors
test: infinite_recurse
test: sanity_check
test: select_into
test: select_distinct
test: select_distinct_on
test: select_implicit
test: select_having
test: subselect
test: incremental_sort
test: union
test: case
test: join
test: aggregates
test: transactions
ignore: random
test: random
test: portals
test: arrays
test: btree_index
test: hash_index
test: update
test: delete
test: namespace
test: prepared_xacts
test: brin
test: brin_bloom
test: brin_multi
test: gin
test: gist
test: spgist
test: privileges
test: init_privs
test: security_label
test: collate
test: matview
test: lock
test: replica_identity
test: rowsecurity
test: object_address
test: tablesample
test: groupingsets
test: drop_operator
test: password
test: identity
test: generated
test: join_hash
test: create_table_like
test: alter_generic
test: alter_operator
test: misc
test: async
test: dbsize
test: misc_functions
test: sysviews
test: tsrf
test: tid
test: tidscan
test: tidrangescan
test: collate.icu.utf8
test: rules
test: psql
test: psql_crosstab
test: amutils
test: stats_ext
test: collate.linux.utf8
test: select_parallel
test: write_parallel
test: publication
test: subscription
test: select_views
test: portals_p2
test: foreign_key
test: cluster
test: dependency
test: guc
test: bitmapops
test: combocid
test: tsearch
test: tsdicts
test: foreign_data
test: window
test: xmlmap
test: functional_deps
test: advisory_lock
test: indirect_toast
test: equivclass
test: json
test: jsonb
test: json_encoding
test: jsonpath
test: jsonpath_encoding
test: jsonb_jsonpath
test: plancache
test: limit
test: plpgsql
test: copy2
test: temp
test: domain
test: rangefuncs
test: prepare
test: conversion
test: truncate
test: alter_table
test: sequence
test: polymorphism
test: rowtypes
test: returning
test: largeobject
test: with
test: xml
test: partition_join
test: partition_prune
test: reloptions
test: hash_part
test: indexing
test: partition_aggregate
test: partition_info
test: tuplesort
test: explain
test: compression
test: resultcache
test: event_trigger
test: oidjoins
test: fast_default
test: stats