Re: How jsonb updates affect GIN indexes - Mailing list pgsql-general

From Francisco Olarte
Subject Re: How jsonb updates affect GIN indexes
Date
Msg-id CA+bJJbyvjR_3KV1d9BMmTX9suxZjWBKedO5pB=e4DT+XTPRCKA@mail.gmail.com
Whole thread Raw
In response to How jsonb updates affect GIN indexes  (Eric Mortensen <eric@appstax.com>)
List pgsql-general
Eric:

On Sat, Feb 27, 2016 at 11:46 AM, Eric Mortensen <eric@appstax.com> wrote:
> When a jsonb column is updated, as far as I understand the entire column is
> updated, even though perhaps only one of the keys has a modified value.

Also, bear in mind when a column is updated the tuple is too, and
MVCC treats it similarly to a delete+insert, so it may move around (
as the old version may be needed by some transaction, and not enough
space may be free on the original location ). and every index
reference ( GIN or whatever, to any column ) needs to be updated. I do
not know the details, I just know it's a complex decision, someone
with more knowledge of the internals may give you a more acurate
descriptin if needed.

Francisco Olarte.


pgsql-general by date:

Previous
From: Eric Mortensen
Date:
Subject: How jsonb updates affect GIN indexes
Next
From: Francisco Olarte
Date:
Subject: Re: How jsonb updates affect GIN indexes