Fix assorted defects in 09adc9a8c09c9640de05c7023b27fb83c761e91c.
Robert Haas <rhaas@postgresql.org>
Fix assorted defects in 09adc9a8c09c9640de05c7023b27fb83c761e91c. That commit increased all shared memory allocations to the next higher multiple of PG_CACHE_LINE_SIZE, but it didn't ensure that allocation started on a cache line boundary. It also failed to remove a couple other pieces of now-useless code. BUFFERALIGN() is perhaps obsolete at this point, and likely should be removed at some point, too, but that seems like it can be left to a future cleanup. Mistakes all pointed out by Andres Freund. The patch is mine, with a few extra assertions which I adopted from his version of this fix.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/storage/buffer/buf_init.c | modified | +6 −9 |
| src/backend/storage/ipc/shmem.c | modified | +11 −4 |