forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc788115
committed
Paper over bt_metap() oldest_xact bug in backbranches.
The data types that contrib/pageinspect's bt_metap() function weredeclared to return as OUT arguments were wrong in some cases. Inparticular, the oldest_xact column (a TransactionId/xid field) wasdeclared integer/int4 within the pageinspect extension's sql file. Thisled to errors when an oldest_xact value that exceeded 2^31-1 wasencountered.We cannot fix the declaration on Postgres 11 or 12. All we can do isameliorate the problem. Use "%d" instead of "%u" to format the outputof the oldest_xact value. This makes the C code match the declaration,suppressing unhelpful error messages that might otherwise makebt_metap() totally unusable. A bogus negative oldest_xact value will bedisplayed instead of raising an error.This commit addresses the same issue as master branch commit691e8b2,which actually fixed the problem. Backpatch to the 11 and 12 branchesonly, since they are the only branches (other than master) that haveoldest_xact. All of the other problematic columns already display bogusoutput for out of range values.Reported-By: Victor YegorovBug: #16285Discussion:https://postgr.es/m/20200309223557.aip5n6ewln4ixbbi@alap3.anarazel.deBackpatch: 11 and 12 only1 parente70187c commitc788115
1 file changed
+6
-1
lines changedLines changed: 6 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
562 | 562 |
| |
563 | 563 |
| |
564 | 564 |
| |
565 |
| - | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
566 | 571 |
| |
567 | 572 |
| |
568 | 573 |
| |
|
0 commit comments
Comments
(0)