GIN fast update technique and work_mem

Started by Amit Langoteover 12 years ago3 messagesgeneral
Jump to latest
#1Amit Langote
Langote_Amit_f8@lab.ntt.co.jp

Hi,

While going through the documentation for GIN fast update technique, I read -

"...or if the pending list becomes too large (larger than work_mem),
the entries are moved to the main GIN data structure using the same
bulk insert techniques used during initial index creation."

The "work_mem" links to work_mem setting documentation.

Whereas in the src/backend/access/gin/README, as one of the features
of GIN, I read -

"...* Optimized index creation (Makes use of maintenance_work_mem to accumulate
postings in memory.)"

So, which one is it - work_mem or maintenance_work_mem?

Or are these things unrelated?

--
Amit

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#2Andres Freund
andres@anarazel.de
In reply to: Amit Langote (#1)
Re: GIN fast update technique and work_mem

On 2013-10-24 18:40:46 +0900, Amit Langote wrote:

While going through the documentation for GIN fast update technique, I read -

"...or if the pending list becomes too large (larger than work_mem),
the entries are moved to the main GIN data structure using the same
bulk insert techniques used during initial index creation."

The "work_mem" links to work_mem setting documentation.

Whereas in the src/backend/access/gin/README, as one of the features
of GIN, I read -

"...* Optimized index creation (Makes use of maintenance_work_mem to accumulate
postings in memory.)"

So, which one is it - work_mem or maintenance_work_mem?

Or are these things unrelated?

Yes. One is about the initial index creation, the other about insertions
into an existing index.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3Amit Langote
Langote_Amit_f8@lab.ntt.co.jp
In reply to: Andres Freund (#2)
Re: GIN fast update technique and work_mem

On Thu, Oct 24, 2013 at 7:26 PM, Andres Freund <andres@2ndquadrant.com> wrote:

On 2013-10-24 18:40:46 +0900, Amit Langote wrote:

While going through the documentation for GIN fast update technique, I read -

"...or if the pending list becomes too large (larger than work_mem),
the entries are moved to the main GIN data structure using the same
bulk insert techniques used during initial index creation."

The "work_mem" links to work_mem setting documentation.

Whereas in the src/backend/access/gin/README, as one of the features
of GIN, I read -

"...* Optimized index creation (Makes use of maintenance_work_mem to accumulate
postings in memory.)"

So, which one is it - work_mem or maintenance_work_mem?

Or are these things unrelated?

Yes. One is about the initial index creation, the other about insertions
into an existing index.

Greetings,

Hmm, okay. So, work_mem allocations are also involved in case of GIN
index updates (if FASTUPDATE is on)?

Thanks.

--
Amit

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general