Skip to content

Commit 7564cac

Browse files
committed
Merge branch 'pathman_pgpro9_5' into PGPRO9_5
2 parents 5445434 + f3b1eac commit 7564cac

File tree

13 files changed

+1538
-421
lines changed

13 files changed

+1538
-421
lines changed

contrib/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ SUBDIRS = \
3434
oid2name \
3535
pageinspect \
3636
passwordcheck \
37-
pg_arman \
3837
pg_buffercache \
3938
pg_freespacemap \
4039
pg_prewarm \

contrib/pg_pathman/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# contrib/pg_pathman/Makefile
22

3-
43
MODULE_big = pg_pathman
54
OBJS = init.o pg_pathman.o dsm_array.o rangeset.o pl_funcs.o worker.o $(WIN32RES)
65

@@ -37,4 +36,4 @@ isolationcheck: | submake-isolation
3736
$(pg_isolation_regress_check) \
3837
--temp-config=$(top_srcdir)/$(subdir)/conf.add \
3938
--outputdir=./isolation_output \
40-
$(ISOLATIONCHECKS)
39+
$(ISOLATIONCHECKS)

contrib/pg_pathman/dsm_array.c

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,13 @@ typedef struct DsmConfig
2828

2929
static DsmConfig *dsm_cfg = NULL;
3030

31-
typedef int BlockHeader;
31+
/*
32+
* Block header
33+
*
34+
* Its size must be 4 bytes for 32bit and 8 bytes for 64bit. Otherwise it could
35+
* screw up an alignment (for example on Sparc9)
36+
*/
37+
typedef uintptr_t BlockHeader;
3238
typedef BlockHeader* BlockHeaderPtr;
3339

3440
#define FREE_BIT 0x80000000
@@ -43,6 +49,16 @@ typedef BlockHeader* BlockHeaderPtr;
4349
#define set_length(header, length) \
4450
((length) | ((*header) & FREE_BIT))
4551

52+
/*
53+
* Amount of memory that need to be requested in shared memory to store dsm
54+
* config
55+
*/
56+
Size
57+
get_dsm_shared_size()
58+
{
59+
return (Size) MAXALIGN(sizeof(DsmConfig));
60+
}
61+
4662
/*
4763
* Initialize dsm config for arrays
4864
*/

0 commit comments

Comments
 (0)