Commit 35988b3
committed
Simplify hash_xlog_split_allocate_page()
Instead of complicated pointer arithmetic, overlay a uint32 array and
just access the array members. That's safe thanks to
XLogRecGetBlockData() returning a MAXALIGNed buffer.
Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Reviewed-by: Jacob Champion <jacob.champion@enterprisedb.com>
Discussion: https://www.postgresql.org/message-id/flat/aSQy2JawavlVlEB0%40ip-10-97-1-34.eu-west-3.compute.internal1 parent ec782f5 commit 35988b3
1 file changed
+17
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
317 | | - | |
318 | | - | |
319 | 317 | | |
320 | 318 | | |
321 | 319 | | |
| |||
375 | 373 | | |
376 | 374 | | |
377 | 375 | | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
378 | 380 | | |
379 | 381 | | |
380 | 382 | | |
381 | 383 | | |
382 | 384 | | |
383 | 385 | | |
384 | 386 | | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
385 | 394 | | |
386 | 395 | | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
| 396 | + | |
| 397 | + | |
393 | 398 | | |
394 | 399 | | |
395 | 400 | | |
396 | | - | |
397 | | - | |
398 | | - | |
| 401 | + | |
399 | 402 | | |
400 | 403 | | |
401 | 404 | | |
402 | 405 | | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
| 406 | + | |
| 407 | + | |
409 | 408 | | |
410 | 409 | | |
411 | | - | |
412 | 410 | | |
| 411 | + | |
413 | 412 | | |
414 | 413 | | |
415 | 414 | | |
| |||
0 commit comments