]> granicus.if.org Git - postgresql/commit
Convert the arithmetic for shared memory size calculation from 'int'
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 20 Aug 2005 23:26:37 +0000 (23:26 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 20 Aug 2005 23:26:37 +0000 (23:26 +0000)
commit0007490e0964d194a606ba79bb11ae1642da3372
tree91db8ec49d812ba2c4307fcf858dfb7fd3890819
parent2299ceab1cc5e141431f19eaf70c30f0d84eb28b
Convert the arithmetic for shared memory size calculation from 'int'
to 'Size' (that is, size_t), and install overflow detection checks in it.
This allows us to remove the former arbitrary restrictions on NBuffers
etc.  It won't make any difference in a 32-bit machine, but in a 64-bit
machine you could theoretically have terabytes of shared buffers.
(How efficiently we could manage 'em remains to be seen.)  Similarly,
num_temp_buffers, work_mem, and maintenance_work_mem can be set above
2Gb on a 64-bit machine.  Original patch from Koichi Suzuki, additional
work by moi.
50 files changed:
configure
configure.in
src/backend/access/transam/clog.c
src/backend/access/transam/multixact.c
src/backend/access/transam/slru.c
src/backend/access/transam/subtrans.c
src/backend/access/transam/twophase.c
src/backend/access/transam/xlog.c
src/backend/commands/vacuumlazy.c
src/backend/port/sysv_shmem.c
src/backend/postmaster/bgwriter.c
src/backend/postmaster/postmaster.c
src/backend/storage/buffer/buf_init.c
src/backend/storage/buffer/buf_table.c
src/backend/storage/buffer/freelist.c
src/backend/storage/buffer/localbuf.c
src/backend/storage/freespace/freespace.c
src/backend/storage/ipc/ipci.c
src/backend/storage/ipc/pmsignal.c
src/backend/storage/ipc/procarray.c
src/backend/storage/ipc/shmem.c
src/backend/storage/ipc/sinval.c
src/backend/storage/ipc/sinvaladt.c
src/backend/storage/lmgr/lock.c
src/backend/storage/lmgr/lwlock.c
src/backend/storage/lmgr/proc.c
src/backend/utils/hash/dynahash.c
src/backend/utils/misc/guc.c
src/backend/utils/misc/postgresql.conf.sample
src/include/access/clog.h
src/include/access/multixact.h
src/include/access/slru.h
src/include/access/subtrans.h
src/include/access/twophase.h
src/include/access/xlog.h
src/include/pg_config.h.in
src/include/postmaster/bgwriter.h
src/include/postmaster/postmaster.h
src/include/storage/buf_internals.h
src/include/storage/bufmgr.h
src/include/storage/freespace.h
src/include/storage/lock.h
src/include/storage/lwlock.h
src/include/storage/pg_shmem.h
src/include/storage/proc.h
src/include/storage/procarray.h
src/include/storage/shmem.h
src/include/storage/sinval.h
src/include/storage/sinvaladt.h
src/include/utils/hsearch.h