pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrey Lepikhov <a.lepikhov@postgrespro.ru>
To: Dmitry Dolgov <9erthalion6@gmail.com>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: a.lubennikova@postgrespro.ru, PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: Reduce amount of WAL generated by CREATE INDEX for gist, gin and sp-gist
Date: Tue, 18 Dec 2018 10:41:48 +0500
Message-ID: <1cdb9c52-e8fb-124b-3949-d3be8a6a7451@postgrespro.ru> (raw)
In-Reply-To: <CA+q6zcUmB4i1jQUBc1YU6zppV+u4ADjc05M1f-S3UJGW_0A7Sw@mail.gmail.com>
References: <a055f129-518e-3eac-1242-833d58edfddb@postgrespro.ru>
	<b929d56e-1c1d-dd5a-e21b-1baf06f6bffe@iki.fi>
	<18f0b868-6888-27eb-22cc-982709c3d0f7@postgrespro.ru>
	<CA+q6zcUmB4i1jQUBc1YU6zppV+u4ADjc05M1f-S3UJGW_0A7Sw@mail.gmail.com>



On 30.11.2018 15:10, Dmitry Dolgov wrote:
> Thank you. I played a bit with this patch, and can confirm visible WAL size
> reduction (it's rather obvious, but still). Although, probably due to lack of
> my knowledge here, I wonder how does it work when an index is build
> concurrently?

Routine generate_xlog_for_rel() works only at phase 2 of concurrent 
index building.
At the phase 3, during validate_index() execution we use aminsert() -> 
PlaceToPage() mechanism as before the patch.
In the concurrent mode, I do not expect any problems, caused by the patch.

> 
>> Benchmarks:
>> -----------
>>
>> Test: pgbench -f gin-WAL-test.sql -t 5:
>> ---------------------------------------
>> master:
>> Latency average: 27696.299 ms
>> WAL size: 2.66 GB
> 
> Does it makes sense to measure latency of the entire script, since it contains
> also some preparation work? Of course it still shows the difference between
> patched version and master, but probably in a more noisy way.

Ok. It is used only for demonstration.

-- 
Andrey Lepikhov
Postgres Professional
https://postgrespro.com
The Russian Postgres Company




view thread (17+ messages)  latest in thread

Message-ID: <1cdb9c52-e8fb-124b-3949-d3be8a6a7451@postgrespro.ru>
Permalink:  ../1cdb9c52-e8fb-124b-3949-d3be8a6a7451@postgrespro.ru/
Also on:    postgresql.org/message-id/1cdb9c52-e8fb-124b-3949-d3be8a6a7451@postgrespro.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: a.lepikhov@postgrespro.ru, 9erthalion6@gmail.com, hlinnaka@iki.fi
  Subject: Re: Reduce amount of WAL generated by CREATE INDEX for gist, gin and sp-gist
  In-Reply-To: <1cdb9c52-e8fb-124b-3949-d3be8a6a7451@postgrespro.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox