Skip to content

Commit 4c49f27

Browse files
author
Artur Zakirov
committed
Merge branch 'PGPRO9_5' into PGPRO_contrib_dicts
2 parents 0829b20 + dccfe47 commit 4c49f27

File tree

20 files changed

+1721
-550
lines changed

20 files changed

+1721
-550
lines changed

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy