diff options
author | Andres Freund | 2020-05-28 21:57:20 +0000 |
---|---|---|
committer | Andres Freund | 2020-06-24 23:21:00 +0000 |
commit | 09a70b9b3191c6a0f520b074d2e09ca5848e439c (patch) | |
tree | a047799dba25b1f4bf2baafb82a08241becdb931 | |
parent | d9358e2902c9b8057a2c5475da5519f1b31895ee (diff) |
tmp
-rw-r--r-- | contrib/pg_prewarm/pg_prewarm.c | 4 | ||||
-rw-r--r-- | src/backend/port/sysv_shmem.c | 4 | ||||
-rw-r--r-- | src/backend/storage/buffer/freelist.c | 9 | ||||
-rw-r--r-- | src/backend/storage/ipc/aio.c | 7 | ||||
-rw-r--r-- | src/backend/storage/ipc/aio_util.c | 2 | ||||
-rw-r--r-- | src/test/subscription/t/013_partition.pl | 4 |
6 files changed, 18 insertions, 12 deletions
diff --git a/contrib/pg_prewarm/pg_prewarm.c b/contrib/pg_prewarm/pg_prewarm.c index 0ba508aa4d..d093441349 100644 --- a/contrib/pg_prewarm/pg_prewarm.c +++ b/contrib/pg_prewarm/pg_prewarm.c @@ -309,7 +309,7 @@ pg_prewarm(PG_FUNCTION_ARGS) p.curblock = 0; p.lastblock = last_block; - pgsr = pg_streaming_read_alloc(512, (uintptr_t) &p, + pgsr = pg_streaming_read_alloc(1024, (uintptr_t) &p, prewarm_buffer_next, prewarm_buffer_release); @@ -343,7 +343,7 @@ pg_prewarm(PG_FUNCTION_ARGS) p.curblock = 0; p.lastblock = last_block; - pgsr = pg_streaming_read_alloc(512, (uintptr_t) &p, + pgsr = pg_streaming_read_alloc(1024, (uintptr_t) &p, prewarm_smgr_next, prewarm_smgr_release); diff --git a/src/backend/port/sysv_shmem.c b/src/backend/port/sysv_shmem.c index 198a6985bf..7c52c429a7 100644 --- a/src/backend/port/sysv_shmem.c +++ b/src/backend/port/sysv_shmem.c @@ -551,7 +551,7 @@ CreateAnonymousSegment(Size *size) allocsize += hugepagesize - (allocsize % hugepagesize); ptr = mmap(NULL, allocsize, PROT_READ | PROT_WRITE, - PG_MMAP_FLAGS | mmap_flags, -1, 0); + PG_MMAP_FLAGS | MAP_POPULATE | mmap_flags, -1, 0); mmap_errno = errno; if (huge_pages == HUGE_PAGES_TRY && ptr == MAP_FAILED) elog(DEBUG1, "mmap(%zu) with MAP_HUGETLB failed, huge pages disabled: %m", @@ -567,7 +567,7 @@ CreateAnonymousSegment(Size *size) */ allocsize = *size; ptr = mmap(NULL, allocsize, PROT_READ | PROT_WRITE, - PG_MMAP_FLAGS, -1, 0); + PG_MMAP_FLAGS | MAP_POPULATE, -1, 0); mmap_errno = errno; } diff --git a/src/backend/storage/buffer/freelist.c b/src/backend/storage/buffer/freelist.c index 7348a9c6ed..6fc308208c 100644 --- a/src/backend/storage/buffer/freelist.c +++ b/src/backend/storage/buffer/freelist.c @@ -557,13 +557,16 @@ GetAccessStrategy(BufferAccessStrategyType btype) return NULL; case BAS_BULKREAD: - ring_size = (16 * 1024 * 1024) / BLCKSZ; + // orig 256 KiB + ring_size = (2 * 1024 * 1024) / BLCKSZ; break; case BAS_BULKWRITE: - ring_size = 16 * 1024 * 1024 / BLCKSZ; + // orig 16 MiB + ring_size = (16 * 1024 * 1024) / BLCKSZ; break; case BAS_VACUUM: - ring_size = 256 * 1024 / BLCKSZ; + // orig 256 KiB + ring_size = (256 * 1024) / BLCKSZ; break; default: diff --git a/src/backend/storage/ipc/aio.c b/src/backend/storage/ipc/aio.c index d23e3dde29..21ec19e1ef 100644 --- a/src/backend/storage/ipc/aio.c +++ b/src/backend/storage/ipc/aio.c @@ -12,6 +12,8 @@ */ #include "postgres.h" +//#define ILIST_DEBUG 1 + #include <fcntl.h> #include <liburing.h> #include <sys/stat.h> @@ -410,7 +412,7 @@ extern int max_aio_in_flight; extern int max_aio_bounce_buffers; int max_aio_in_progress = 32768; /* XXX: Multiple of MaxBackends instead? */ int max_aio_in_flight = 4096; -int max_aio_bounce_buffers = 1024; +int max_aio_bounce_buffers = 4096; /* global list of in-progress IO */ static PgAioCtl *aio_ctl; @@ -1451,8 +1453,7 @@ again: goto out; } - if (holding_reference && - (init_flags & PGAIOIP_PENDING) && + if ((init_flags & PGAIOIP_PENDING) && (!IsUnderPostmaster || io->owner_id == my_aio_id)) { if (init_flags & PGAIOIP_PENDING) diff --git a/src/backend/storage/ipc/aio_util.c b/src/backend/storage/ipc/aio_util.c index 7c1bfa08c4..cef08c63b2 100644 --- a/src/backend/storage/ipc/aio_util.c +++ b/src/backend/storage/ipc/aio_util.c @@ -1,3 +1,5 @@ +//#define ILIST_DEBUG 1 + #include "postgres.h" #include "storage/aio.h" diff --git a/src/test/subscription/t/013_partition.pl b/src/test/subscription/t/013_partition.pl index a04c03a7e2..f3683a4257 100644 --- a/src/test/subscription/t/013_partition.pl +++ b/src/test/subscription/t/013_partition.pl @@ -485,12 +485,12 @@ $result = $node_subscriber2->safe_psql('postgres', "SELECT a FROM tab3"); is($result, qq(), 'delete from tab3 replicated'); # truncate +# these will NOT be replicated +$node_publisher->safe_psql('postgres', "TRUNCATE tab1_2, tab2_1, tab3_1"); $node_publisher->safe_psql('postgres', "INSERT INTO tab1 VALUES (1), (2), (5)"); $node_publisher->safe_psql('postgres', "INSERT INTO tab2 VALUES (1), (2), (5)"); -# these will NOT be replicated -$node_publisher->safe_psql('postgres', "TRUNCATE tab1_2, tab2_1, tab3_1"); $node_publisher->wait_for_catchup('sub_viaroot'); $node_publisher->wait_for_catchup('sub2'); |