File tree Expand file tree Collapse file tree 3 files changed +53
-0
lines changed
Expand file tree Collapse file tree 3 files changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ # -------------------------------------------------------------------------
2+ #
3+ # Makefile--
4+ # Makefile for storage/lsm
5+ #
6+ # IDENTIFICATION
7+ # src/backend/storage/lsm/Makefile
8+ #
9+ # -------------------------------------------------------------------------
10+
11+ subdir = src/backend/storage/lsm
12+ top_builddir = ../../../..
13+ include $(top_builddir ) /src/Makefile.global
14+
15+ OBJS = \
16+ lsm.o
17+
18+ include $(top_srcdir ) /src/backend/common.mk
Original file line number Diff line number Diff line change 1+ /*-------------------------------------------------------------------------
2+ *
3+ * lsm.c
4+ * Log structure merge (LSM) tree methods
5+ *
6+ * IDENTIFICATION
7+ * src/backend/storage/buffer/lsm.c
8+ *
9+ *-------------------------------------------------------------------------
10+ */
11+ #include "postgres.h"
12+
13+ #include "storage/lsm.h"
14+ #include "storage/shmem.h"
15+
16+ char * LsmLogBlocks ;
17+
18+ /*
19+ * Initialize LSM log blocks
20+ */
21+ void
22+ InitLsmLogBlocks (void )
23+ {
24+ bool foundBufs ;
25+ LsmLogBlocks = (char * )
26+ ShmemInitStruct ("LSM Log Blocks" ,
27+ NBuffers * (Size ) LSM_LOG_BLOCKSZ , & foundBufs );
28+ }
Original file line number Diff line number Diff line change 1010
1111#include "c.h"
1212
13+ extern PGDLLIMPORT int NBuffers ;
14+
1315/*
1416 * The log file contents are a sequence of 32KB blocks.
1517 * The only exception is that the tail of the file may contain a partial block.
@@ -39,3 +41,8 @@ typedef struct
3941} LsmLogRecord ;
4042
4143#endif /* LSM_H */
44+
45+ /*
46+ * prototypes for functions in lsm.c
47+ */
48+ extern void InitLsmLogBlocks (void );
You can’t perform that action at this time.
0 commit comments