postgresql/src/backend
Michael Paquier 060f9f5ea5 Revert recent changes related to handling of 2PC files at recovery
This commit reverts 8f67f994e8 (down to v13) and c3de0f9eed (down to
v17), as these are proving to not be completely correct regarding two
aspects:
- In v17 and newer branches, c3de0f9eed38's check for epoch handling is
incorrect, and does not correctly handle frozen epochs.  A logic closer
to widen_snapshot_xid() should be used.  The 2PC code should try to
integrate deeper with FullTransactionIds, 5a1dfde833 being not enough.
- In v13 and newer branches, 8f67f994e8 is a workaround for the real
issue, which is that we should not attempt CLOG lookups without reaching
consistency.  This exists since 728bd991c3, and this is reachable with
ProcessTwoPhaseBuffer() called by restoreTwoPhaseData() at the beginning
of recovery.

Per discussion with Noah Misch.

Discussion: https://postgr.es/m/20250116010051.f3.nmisch@google.com
Backpatch-through: 13
2025-01-17 13:27:47 +09:00
..
access Revert recent changes related to handling of 2PC files at recovery 2025-01-17 13:27:47 +09:00
bootstrap Rethink definition of pg_attribute.attcompression. 2021-05-27 13:24:27 -04:00
catalog Restore smgrtruncate() prototype in back-branches. 2025-01-08 10:48:01 +13:00
commands In REASSIGN OWNED of a database, lock the tuple as mandated. 2024-12-28 07:16:27 -08:00
executor Fix Assert failure in WITH RECURSIVE UNION queries 2024-12-19 13:13:31 +13:00
foreign Restrict accesses to non-system views and foreign tables during pg_dump. 2024-08-05 06:05:23 -07:00
jit Fix NULLIF()'s handling of read-write expanded objects. 2024-11-25 18:09:10 -05:00
lib Accommodate very large dshash tables. 2024-12-17 15:24:45 -06:00
libpq Fix HBA option count 2025-01-12 23:44:39 +01:00
main Fix elog(FATAL) before PostmasterMain() or just after fork(). 2024-12-10 13:52:02 -08:00
nodes Remove inappropriate raw_expression_tree_walker() code 2023-06-29 10:35:53 +02:00
optimizer Fix setrefs.c's failure to do expression processing on prune steps. 2025-01-16 20:40:07 -05:00
parser Remove incorrect Assert. 2024-09-11 11:42:14 -04:00
partitioning Fix creation of partition descriptor during concurrent detach+drop 2024-08-12 18:17:56 -04:00
po Translation updates 2024-11-11 13:57:37 +01:00
port Check for STATUS_DELETE_PENDING on Windows. 2024-11-08 09:34:00 +10:30
postmaster Exclude parallel workers from connection privilege/limit checks. 2024-12-28 16:08:50 -05:00
regex Fix recently-exposed portability issue in regex optimization. 2024-11-17 14:14:06 -05:00
replication Fix memory leak in pgoutput with relation attribute map 2025-01-08 08:47:19 +09:00
rewrite Ensure cached plans are correctly marked as dependent on role. 2024-11-11 09:00:00 -06:00
snowball In the Snowball dictionary, don't try to stem excessively-long words. 2022-08-31 10:42:05 -04:00
statistics Fix incorrectly reported stats kind in "can't happen" ERROR 2024-03-05 16:18:42 +13:00
storage Fix C error reported by Oracle compiler. 2025-01-08 17:04:26 +13:00
tcop Simplify executor's determination of whether to use parallelism. 2024-12-09 14:38:19 -05:00
tsearch Limit to_tsvector_byid's initial array allocation to something sane. 2023-09-25 11:50:28 -04:00
utils Fix catcache invalidation of a list entry that's being built 2025-01-14 14:29:13 +02:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
Makefile Use sort_template.h for qsort_tuple() and qsort_ssup(). 2021-03-03 17:02:32 +13:00
nls.mk Translation updates 2021-09-20 16:23:13 +02:00