mirror of
https://github.com/postgres/postgres.git
synced 2025-09-03 15:22:11 +03:00
For bulk write operations (eg COPY IN), use a ring buffer of 16MB instead
of the 256KB limit originally enforced by a patch committed 2008-11-06. Per recent test results, the smaller size resulted in an undesirable decrease in bulk data loading speed, due to COPY processing frequently getting blocked for WAL flushing. This area might need more tweaking later, but this setting seems to be good enough for 8.4.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/storage/buffer/freelist.c,v 1.66 2009/01/01 17:23:47 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/storage/buffer/freelist.c,v 1.67 2009/06/22 20:04:28 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -368,9 +368,7 @@ GetAccessStrategy(BufferAccessStrategyType btype)
|
||||
int ring_size;
|
||||
|
||||
/*
|
||||
* Select ring size to use. See buffer/README for rationales. (Currently
|
||||
* all cases are the same size, but keep this code structure for
|
||||
* flexibility.)
|
||||
* Select ring size to use. See buffer/README for rationales.
|
||||
*
|
||||
* Note: if you change the ring size for BAS_BULKREAD, see also
|
||||
* SYNC_SCAN_REPORT_INTERVAL in access/heap/syncscan.c.
|
||||
@@ -385,7 +383,7 @@ GetAccessStrategy(BufferAccessStrategyType btype)
|
||||
ring_size = 256 * 1024 / BLCKSZ;
|
||||
break;
|
||||
case BAS_BULKWRITE:
|
||||
ring_size = 256 * 1024 / BLCKSZ;
|
||||
ring_size = 16 * 1024 * 1024 / BLCKSZ;
|
||||
break;
|
||||
case BAS_VACUUM:
|
||||
ring_size = 256 * 1024 / BLCKSZ;
|
||||
|
Reference in New Issue
Block a user