Hello,

Could anyone tell me how to use 2GB of shared buffers on Windows?  I'm
sorry for attaching large text files and for sending this mail to this
ML.
When I try to start PostgreSQL 8.2.1 on Windows 2003 Server with
shared_buffers=1024MB, I get the following error messages in the Event
Log (with log_min_messages=debug5) and can't start PostgreSQL:

DEBUG:  mapped win32 error code 8 to 12

FATAL:  shmat(id=1880) failed: Not enough space


This means the Win32 API MapViewOfFile() failed with error code =
ERROR_NOT_ENOUGH_MEMORY.  However, the machine has 4GB of RAM and the
maximum size of paging file is 8GB.

But I could start PostgreSQL with shared_buffers=900MB.  Then, I
peeked the memory map of postgres.  The attached files are the memory
usage of postgres obtained by vadump. which is a tool included in
Microsoft Resource Kit (vadump is downloadable freely.)
(I'm using packaged PostgreSQL 8.2.1 available from
www.postgresql.org.)

--------------------------------------------------
Symbols loaded: 10000000 : 10107000  libeay32.dll
Symbols loaded: 1c000000 : 1c006000  comerr32.dll
Symbols loaded: 5ba20000 : 5ba77000  hnetcfg.dll
Symbols loaded: 61770000 : 61779000  LPK.DLL
--------------------------------------------------

These modules appear to be criminals.  They are spliting the address
space of postgres and preventing postgres from allocating a large
shared memory.  They seem to be the open source libraries (but what is
hnetcfg.dll?)
Why are they located on strange (evil) places?  What can I do?

Address: 00000000 Size: 00010000
    State Free

Address: 00010000 Size: 00001000
    State Committed
    Protect Read/Write
    Type Private

Address: 00011000 Size: 0000F000
    State Free

Address: 00020000 Size: 00001000
    State Committed
    Protect Read/Write
    Type Private

Address: 00021000 Size: 0000F000
    State Free

Address: 00030000 Size: 00005000
    State Committed
    Protect Read Only
    Type Mapped

Address: 00035000 Size: 0000B000
    State Free

Address: 00040000 Size: 00019000 RegionSize: 100000
    State Committed
    Protect Read/Write
    Type Private

Address: 00140000 Size: 00003000 RegionSize: 10000
    State Committed
    Protect Read/Write
    Type Mapped

Address: 00150000 Size: 00016000
    State Committed
    Protect Read Only
    Type Mapped

Address: 00166000 Size: 0000A000
    State Free

Address: 00170000 Size: 00034000
    State Committed
    Protect Read Only
    Type Mapped

Address: 001A4000 Size: 0000C000
    State Free

Address: 001B0000 Size: 00041000
    State Committed
    Protect Read Only
    Type Mapped

Address: 001F1000 Size: 0000F000
    State Free

Address: 00200000 Size: 00006000
    State Committed
    Protect Read Only
    Type Mapped

Address: 00206000 Size: 0000A000
    State Free

Address: 00210000 Size: 00041000
    State Committed
    Protect Read Only
    Type Mapped

Address: 00251000 Size: 0000F000
    State Free

Address: 00260000 Size: 00001000 RegionSize: d000
    State Committed
    Protect Read Only
    Type Image

Address: 0026D000 Size: 00003000
    State Free

Address: 00270000 Size: 00001000 RegionSize: db000
    State Committed
    Protect Read Only
    Type Image

Address: 0034B000 Size: 00005000
    State Free

Address: 00350000 Size: 00001000 RegionSize: 81000
    State Committed
    Protect Read Only
    Type Image

Address: 003D1000 Size: 0000F000
    State Free

Address: 003E0000 Size: 00010000
    State Committed
    Protect Read/Write
    Type Private

Address: 003F0000 Size: 00003000
    State Committed
    Protect Read Only
    Type Mapped

Address: 003F3000 Size: 0000D000
    State Free

Address: 00400000 Size: 00001000 RegionSize: 33a000
    State Committed
    Protect Read Only
    Type Image

Address: 0073A000 Size: 00006000
    State Free

Address: 00740000 Size: 003F7000 RegionSize: 400000
    State Reserved
    Type Private

Address: 00B40000 Size: 00001000 RegionSize: 31000
    State Committed
    Protect Read Only
    Type Image

Address: 00B71000 Size: 0000F000
    State Free

Address: 00B80000 Size: 00002000 RegionSize: c8000
    State Committed
    Protect Execute Read
    Type Mapped

Address: 00C48000 Size: 00008000
    State Free

Address: 00C50000 Size: 00103000
    State Committed
    Protect Read Only
    Type Mapped

Address: 00D53000 Size: 0000D000
    State Free

Address: 00D60000 Size: 00001000 RegionSize: 80000
    State Committed
    Protect Execute Read
    Type Mapped

Address: 00DE0000 Size: 00008000 RegionSize: 10000
    State Committed
    Protect Read/Write
    Type Private

Address: 00DF0000 Size: 00001000
    State Committed
    Protect Read/Write
    Type Private

Address: 00DF1000 Size: 0000F000
    State Free

Address: 00E00000 Size: 00001000
    State Committed
    Protect Read/Write
    Type Private

Address: 00E01000 Size: 0000F000
    State Free

Address: 00E10000 Size: 00008000 RegionSize: 40000
    State Committed
    Protect Read/Write
    Type Private

Address: 00E50000 Size: 00001000 RegionSize: 20000
    State Committed
    Protect Read/Write
    Type Private

Address: 00E70000 Size: 00004000 RegionSize: 10000
    State Committed
    Protect Read/Write
    Type Private

Address: 00E80000 Size: 003FE000 RegionSize: 400000
    State Reserved
    Type Private

Address: 01280000 Size: 00015000 RegionSize: 100000
    State Committed
    Protect Read/Write
    Type Private

Address: 01380000 Size: 00006000 RegionSize: 40000
    State Committed
    Protect Read/Write
    Type Private

Address: 013C0000 Size: 003EF000 RegionSize: 400000
    State Reserved
    Type Private

Address: 017C0000 Size: 00003000 RegionSize: 40000
    State Committed
    Protect Read/Write
    Type Private

Address: 01800000 Size: 00003000 RegionSize: 10000
    State Committed
    Protect Read/Write
    Type Private

Address: 01810000 Size: 003EF000 RegionSize: 400000
    State Reserved
    Type Private

Address: 01C10000 Size: 003EF000 RegionSize: 400000
    State Reserved
    Type Private

Address: 02010000 Size: 0DFF0000
    State Free

Address: 10000000 Size: 00001000 RegionSize: 107000
    State Committed
    Protect Read Only
    Type Image

Address: 10107000 Size: 0BEF9000
    State Free

Address: 1C000000 Size: 00001000 RegionSize: 6000
    State Committed
    Protect Read Only
    Type Image

Address: 1C006000 Size: 0000A000
    State Free

Address: 1C010000 Size: 39754000
    State Committed
    Protect Read/Write
    Type Mapped

Address: 55764000 Size: 062BC000
    State Free

Address: 5BA20000 Size: 00001000 RegionSize: 57000
    State Committed
    Protect Read Only
    Type Image

Address: 5BA77000 Size: 05CF9000
    State Free

Address: 61770000 Size: 00001000 RegionSize: 9000
    State Committed
    Protect Read Only
    Type Image

Address: 61779000 Size: 10207000
    State Free

Address: 71980000 Size: 00001000 RegionSize: 8000
    State Committed
    Protect Read Only
    Type Image

Address: 71988000 Size: 00038000
    State Free

Address: 719C0000 Size: 00001000 RegionSize: 41000
    State Committed
    Protect Read Only
    Type Image

Address: 71A01000 Size: 0004F000
    State Free

Address: 71A50000 Size: 00001000 RegionSize: b000
    State Committed
    Protect Read Only
    Type Image

Address: 71A5B000 Size: 00035000
    State Free

Address: 71A90000 Size: 00001000 RegionSize: 8000
    State Committed
    Protect Read Only
    Type Image

Address: 71A98000 Size: 00008000
    State Free

Address: 71AA0000 Size: 00001000 RegionSize: 17000
    State Committed
    Protect Read Only
    Type Image

Address: 71AB7000 Size: 03769000
    State Free

Address: 75220000 Size: 00001000 RegionSize: 61000
    State Committed
    Protect Read Only
    Type Image

Address: 75281000 Size: 00E9F000
    State Free

Address: 76120000 Size: 00001000 RegionSize: 1d000
    State Committed
    Protect Read Only
    Type Image

Address: 7613D000 Size: 00483000
    State Free

Address: 765C0000 Size: 00001000 RegionSize: 9000
    State Committed
    Protect Read Only
    Type Image

Address: 765C9000 Size: 00817000
    State Free

Address: 76DE0000 Size: 00001000 RegionSize: 2a000
    State Committed
    Protect Read Only
    Type Image

Address: 76E0A000 Size: 00016000
    State Free

Address: 76E20000 Size: 00001000 RegionSize: 2e000
    State Committed
    Protect Read Only
    Type Image

Address: 76E4E000 Size: 00032000
    State Free

Address: 76E80000 Size: 00001000 RegionSize: 7000
    State Committed
    Protect Read Only
    Type Image

Address: 76E87000 Size: 00009000
    State Free

Address: 76E90000 Size: 00001000 RegionSize: 5000
    State Committed
    Protect Read Only
    Type Image

Address: 76E95000 Size: 00CAB000
    State Free

Address: 77B40000 Size: 00001000 RegionSize: 5a000
    State Committed
    Protect Read Only
    Type Image

Address: 77B9A000 Size: 00006000
    State Free

Address: 77BA0000 Size: 00001000 RegionSize: 48000
    State Committed
    Protect Read Only
    Type Image

Address: 77BE8000 Size: 00008000
    State Free

Address: 77BF0000 Size: 00001000 RegionSize: 9f000
    State Committed
    Protect Read Only
    Type Image

Address: 77C8F000 Size: 00151000
    State Free

Address: 77DE0000 Size: 00001000 RegionSize: ab000
    State Committed
    Protect Read Only
    Type Image

Address: 77E8B000 Size: 00005000
    State Free

Address: 77E90000 Size: 00001000 RegionSize: 91000
    State Committed
    Protect Read Only
    Type Image

Address: 77F21000 Size: 048DF000
    State Free

Address: 7C800000 Size: 00001000 RegionSize: 141000
    State Committed
    Protect Read Only
    Type Image

Address: 7C941000 Size: 0000F000
    State Free

Address: 7C950000 Size: 00001000 RegionSize: da000
    State Committed
    Protect Read Only
    Type Image

Address: 7CA2A000 Size: 02CC6000
    State Free

Address: 7F6F0000 Size: 00007000 RegionSize: 100000
    State Committed
    Protect Execute Read
    Type Mapped

Address: 7F7F0000 Size: 007C0000
    State Free

Address: 7FFB0000 Size: 0002A000
    State Committed
    Protect Read Only
    Type Mapped

Address: 7FFDA000 Size: 00001000
    State Committed
    Protect Read/Write
    Type Private

Address: 7FFDB000 Size: 00001000
    State Committed
    Protect Read/Write
    Type Private

Address: 7FFDC000 Size: 00001000
    State Committed
    Protect Read/Write
    Type Private

Address: 7FFDD000 Size: 00001000
    State Committed
    Protect Read/Write
    Type Private

Address: 7FFDE000 Size: 00001000
    State Committed
    Protect Read/Write
    Type Private

Address: 7FFDF000 Size: 00001000
    State Committed
    Protect Read/Write
    Type Private

Address: 7FFE0000 Size: 00001000 RegionSize: 10000
    State Committed
    Protect Read Only
    Type Private

Total  Image Commitment 12808192
    READONLY:            3280896
    READWRITE:            290816
    WRITECOPY:            466944
    EXECUTEREAD:         8769536

Total postgres.exe Commitment  3383296
    READONLY:             897024
    READWRITE:             90112
    WRITECOPY:            266240
    EXECUTEREAD:         2129920

Total ntdll.dll Commitment   892928
    READONLY:             319488
    READWRITE:             12288
    WRITECOPY:              8192
    EXECUTEREAD:          552960

Total kernel32.dll Commitment  1314816
    READONLY:             729088
    READWRITE:             12288
    WRITECOPY:              8192
    EXECUTEREAD:          565248

Total ADVAPI32.DLL Commitment   700416
    READONLY:             225280
    READWRITE:              8192
    WRITECOPY:              8192
    EXECUTEREAD:          458752

Total RPCRT4.dll Commitment   651264
    READONLY:              28672
    READWRITE:              4096
    EXECUTEREAD:          618496

Total comerr32.dll Commitment    24576
    READONLY:              16384
    READWRITE:              4096
    EXECUTEREAD:            4096

Total MSVCRT.dll Commitment   368640
    READONLY:              20480
    READWRITE:             20480
    WRITECOPY:              8192
    EXECUTEREAD:          319488

Total USER32.dll Commitment   593920
    READONLY:             188416
    READWRITE:              4096
    WRITECOPY:              4096
    EXECUTEREAD:          397312

Total GDI32.dll Commitment   294912
    READONLY:              16384
    READWRITE:              8192
    EXECUTEREAD:          270336

Total libeay32.dll Commitment  1077248
    READONLY:             311296
    READWRITE:              8192
    WRITECOPY:             61440
    EXECUTEREAD:          696320

Total WSOCK32.dll Commitment    45056
    READONLY:              28672
    READWRITE:              4096
    EXECUTEREAD:           12288

Total WS2_32.dll Commitment    94208
    READONLY:              12288
    READWRITE:              4096
    EXECUTEREAD:           77824

Total WS2HELP.dll Commitment    32768
    READONLY:              12288
    READWRITE:              4096
    EXECUTEREAD:           16384

Total libintl-2.dll Commitment    53248
    READONLY:               4096
    READWRITE:             12288
    WRITECOPY:              8192
    EXECUTEREAD:           28672

Total libiconv-2.dll Commitment   897024
    READONLY:               4096
    READWRITE:             12288
    WRITECOPY:             12288
    EXECUTEREAD:          868352

Total krb5_32.dll Commitment   528384
    READONLY:              73728
    READWRITE:             16384
    WRITECOPY:             12288
    EXECUTEREAD:          425984

Total SHFOLDER.DLL Commitment    36864
    READONLY:              20480
    READWRITE:              4096
    EXECUTEREAD:           12288

Total ssleay32.dll Commitment   200704
    READONLY:              49152
    READWRITE:             12288
    EXECUTEREAD:          139264

Total wldap32.dll Commitment   188416
    READONLY:              16384
    READWRITE:              4096
    WRITECOPY:             28672
    EXECUTEREAD:          139264

Total IMM32.DLL Commitment   118784
    READONLY:              28672
    READWRITE:              4096
    EXECUTEREAD:           86016

Total LPK.DLL Commitment    36864
    READONLY:              12288
    READWRITE:              4096
    EXECUTEREAD:           20480

Total USP10.dll Commitment   397312
    READONLY:              94208
    READWRITE:             12288
    WRITECOPY:             28672
    EXECUTEREAD:          262144

Total mswsock.dll Commitment   266240
    READONLY:              28672
    READWRITE:              4096
    WRITECOPY:              4096
    EXECUTEREAD:          229376

Total hnetcfg.dll Commitment   356352
    READONLY:              86016
    READWRITE:              4096
    EXECUTEREAD:          266240

Total wshtcpip.dll Commitment    32768
    READONLY:              12288
    READWRITE:              4096
    EXECUTEREAD:           16384

Total DNSAPI.dll Commitment   172032
    READONLY:              20480
    READWRITE:              4096
    WRITECOPY:              8192
    EXECUTEREAD:          139264

Total winrnr.dll Commitment    28672
    READONLY:              12288
    READWRITE:              4096
    EXECUTEREAD:           12288

Total rasadhlp.dll Commitment    20480
    READONLY:              12288
    READWRITE:              4096
    EXECUTEREAD:            4096

Total Mapped Commitment 966172672
    READONLY:            2125824
    READWRITE:         963997696
    EXECUTEREAD:           49152

Total   Priv Commitment   688128
    READONLY:               4096
    READWRITE:            684032

Dynamic Reserved Memory 26062848

PageFaults:                 4882
PeakWorkingSetSize      19886080
WorkingSetSize          19873792
PeakPagedPoolUsage        977700
PagedPoolUsage            977540
PeakNonPagedPoolUsage      35400
NonPagedPoolUsage          34560
PagefileUsage            3170304
PeakPagefileUsage        3186688
Total  Image Commitment 12808192
    READONLY:            3280896
    READWRITE:            290816
    WRITECOPY:            466944
    EXECUTEREAD:         8769536

Total postgres.exe Commitment  3383296
    READONLY:             897024
    READWRITE:             90112
    WRITECOPY:            266240
    EXECUTEREAD:         2129920

Total ntdll.dll Commitment   892928
    READONLY:             319488
    READWRITE:             12288
    WRITECOPY:              8192
    EXECUTEREAD:          552960

Total kernel32.dll Commitment  1314816
    READONLY:             729088
    READWRITE:             12288
    WRITECOPY:              8192
    EXECUTEREAD:          565248

Total ADVAPI32.DLL Commitment   700416
    READONLY:             225280
    READWRITE:              8192
    WRITECOPY:              8192
    EXECUTEREAD:          458752

Total RPCRT4.dll Commitment   651264
    READONLY:              28672
    READWRITE:              4096
    EXECUTEREAD:          618496

Total comerr32.dll Commitment    24576
    READONLY:              16384
    READWRITE:              4096
    EXECUTEREAD:            4096

Total MSVCRT.dll Commitment   368640
    READONLY:              20480
    READWRITE:             20480
    WRITECOPY:              8192
    EXECUTEREAD:          319488

Total USER32.dll Commitment   593920
    READONLY:             188416
    READWRITE:              4096
    WRITECOPY:              4096
    EXECUTEREAD:          397312

Total GDI32.dll Commitment   294912
    READONLY:              16384
    READWRITE:              8192
    EXECUTEREAD:          270336

Total libeay32.dll Commitment  1077248
    READONLY:             311296
    READWRITE:              8192
    WRITECOPY:             61440
    EXECUTEREAD:          696320

Total WSOCK32.dll Commitment    45056
    READONLY:              28672
    READWRITE:              4096
    EXECUTEREAD:           12288

Total WS2_32.dll Commitment    94208
    READONLY:              12288
    READWRITE:              4096
    EXECUTEREAD:           77824

Total WS2HELP.dll Commitment    32768
    READONLY:              12288
    READWRITE:              4096
    EXECUTEREAD:           16384

Total libintl-2.dll Commitment    53248
    READONLY:               4096
    READWRITE:             12288
    WRITECOPY:              8192
    EXECUTEREAD:           28672

Total libiconv-2.dll Commitment   897024
    READONLY:               4096
    READWRITE:             12288
    WRITECOPY:             12288
    EXECUTEREAD:          868352

Total krb5_32.dll Commitment   528384
    READONLY:              73728
    READWRITE:             16384
    WRITECOPY:             12288
    EXECUTEREAD:          425984

Total SHFOLDER.DLL Commitment    36864
    READONLY:              20480
    READWRITE:              4096
    EXECUTEREAD:           12288

Total ssleay32.dll Commitment   200704
    READONLY:              49152
    READWRITE:             12288
    EXECUTEREAD:          139264

Total wldap32.dll Commitment   188416
    READONLY:              16384
    READWRITE:              4096
    WRITECOPY:             28672
    EXECUTEREAD:          139264

Total IMM32.DLL Commitment   118784
    READONLY:              28672
    READWRITE:              4096
    EXECUTEREAD:           86016

Total LPK.DLL Commitment    36864
    READONLY:              12288
    READWRITE:              4096
    EXECUTEREAD:           20480

Total USP10.dll Commitment   397312
    READONLY:              94208
    READWRITE:             12288
    WRITECOPY:             28672
    EXECUTEREAD:          262144

Total mswsock.dll Commitment   266240
    READONLY:              28672
    READWRITE:              4096
    WRITECOPY:              4096
    EXECUTEREAD:          229376

Total hnetcfg.dll Commitment   356352
    READONLY:              86016
    READWRITE:              4096
    EXECUTEREAD:          266240

Total wshtcpip.dll Commitment    32768
    READONLY:              12288
    READWRITE:              4096
    EXECUTEREAD:           16384

Total DNSAPI.dll Commitment   172032
    READONLY:              20480
    READWRITE:              4096
    WRITECOPY:              8192
    EXECUTEREAD:          139264

Total winrnr.dll Commitment    28672
    READONLY:              12288
    READWRITE:              4096
    EXECUTEREAD:           12288

Total rasadhlp.dll Commitment    20480
    READONLY:              12288
    READWRITE:              4096
    EXECUTEREAD:            4096

Total Mapped Commitment 966172672
    READONLY:            2125824
    READWRITE:         963997696
    EXECUTEREAD:           49152

Total   Priv Commitment   688128
    READONLY:               4096
    READWRITE:            684032

Dynamic Reserved Memory 26062848

PageFaults:                 4882
PeakWorkingSetSize      19886080
WorkingSetSize          19873792
PeakPagedPoolUsage        977700
PagedPoolUsage            977540
PeakNonPagedPoolUsage      35400
NonPagedPoolUsage          34560
PagefileUsage            3170304
PeakPagefileUsage        3186688
Symbols loaded: 00400000 : 0073a000  postgres.exe
Symbols loaded: 7c950000 : 7ca2a000  ntdll.dll
Symbols loaded: 7c800000 : 7c941000  kernel32.dll
Symbols loaded: 77de0000 : 77e8b000  ADVAPI32.DLL
Symbols loaded: 77bf0000 : 77c8f000  RPCRT4.dll
Symbols loaded: 1c000000 : 1c006000  comerr32.dll
Symbols loaded: 77b40000 : 77b9a000  MSVCRT.dll
Symbols loaded: 77e90000 : 77f21000  USER32.dll
Symbols loaded: 77ba0000 : 77be8000  GDI32.dll
Symbols loaded: 10000000 : 10107000  libeay32.dll
Symbols loaded: 71a50000 : 71a5b000  WSOCK32.dll
Symbols loaded: 71aa0000 : 71ab7000  WS2_32.dll
Symbols loaded: 71a90000 : 71a98000  WS2HELP.dll
Symbols loaded: 00260000 : 0026d000  libintl-2.dll
Symbols loaded: 00270000 : 0034b000  libiconv-2.dll
Symbols loaded: 00350000 : 003d1000  krb5_32.dll
Symbols loaded: 765c0000 : 765c9000  SHFOLDER.DLL
Symbols loaded: 00b40000 : 00b71000  ssleay32.dll
Symbols loaded: 76e20000 : 76e4e000  wldap32.dll
Symbols loaded: 76120000 : 7613d000  IMM32.DLL
Symbols loaded: 61770000 : 61779000  LPK.DLL
Symbols loaded: 75220000 : 75281000  USP10.dll
Symbols loaded: 719c0000 : 71a01000  mswsock.dll
Symbols loaded: 5ba20000 : 5ba77000  hnetcfg.dll
Symbols loaded: 71980000 : 71988000  wshtcpip.dll
Symbols loaded: 76de0000 : 76e0a000  DNSAPI.dll
Symbols loaded: 76e80000 : 76e87000  winrnr.dll
Symbols loaded: 76e90000 : 76e95000  rasadhlp.dll
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to