forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitda32a99
committed
Limit memory usage of pg_walinspect functions.
GetWALRecordsInfo() and pg_get_wal_fpi_info() can leak memory acrossWAL record iterations. Fix this by using a temporary memory contextthat's reset for each WAL record iteraion.Also use a temporary context for loops in GetXLogSummaryStats(). Thenumber of iterations is a small constant, so the previous behavior wasnot a leak, but fix for clarity (but no need to backport).Backport GetWALRecordsInfo() change to version15. pg_get_wal_fpi_info() didn't exist in version 15.Reported-by: Peter GeogheganAuthor: Bharath RupireddyDiscussion:https://www.postgresql.org/message-id/CAH2-WznLEJjn7ghmKOABOEZYuJvkTk%3DGKU3m0%2B-XBAH%2BerPiJQ%40mail.gmail.comBackpatch-through: 151 parent305d89a commitda32a99
1 file changed
+14
-0
lines changedLines changed: 14 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
332 | 332 |
| |
333 | 333 |
| |
334 | 334 |
| |
| 335 | + | |
| 336 | + | |
335 | 337 |
| |
336 | 338 |
| |
337 | 339 |
| |
| |||
340 | 342 |
| |
341 | 343 |
| |
342 | 344 |
| |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
343 | 349 |
| |
344 | 350 |
| |
345 | 351 |
| |
| 352 | + | |
| 353 | + | |
| 354 | + | |
346 | 355 |
| |
347 | 356 |
| |
348 | 357 |
| |
349 | 358 |
| |
350 | 359 |
| |
351 | 360 |
| |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
352 | 365 |
| |
353 | 366 |
| |
354 | 367 |
| |
| 368 | + | |
355 | 369 |
| |
356 | 370 |
| |
357 | 371 |
| |
|
0 commit comments
Comments
(0)