Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit089ae3b

Browse files
committed
Properly access a buffer's LSN using existing access macros instead of abusing
knowledge of page layout.Stolen from Jonah Harris' CRC patch
1 parent97227e9 commit089ae3b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/backend/storage/buffer/bufmgr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/storage/buffer/bufmgr.c,v 1.238 2008/09/17 13:15:55 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/storage/buffer/bufmgr.c,v 1.239 2008/10/20 21:11:15 alvherre Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -48,7 +48,7 @@
4848

4949
/* Note: these two macros only work on shared buffers, not local ones! */
5050
#defineBufHdrGetBlock(bufHdr)((Block) (BufferBlocks + ((Size) (bufHdr)->buf_id) * BLCKSZ))
51-
#defineBufferGetLSN(bufHdr)(*((XLogRecPtr*)BufHdrGetBlock(bufHdr)))
51+
#defineBufferGetLSN(bufHdr)(PageGetLSN(BufHdrGetBlock(bufHdr)))
5252

5353
/* Note: this macro only works on local buffers, not shared ones! */
5454
#defineLocalBufHdrGetBlock(bufHdr) \

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp