From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Optimize update of tables with generated columns
Date: Mon, 17 Feb 2020 16:16:40 +0100
Message-ID: <f7f78f54-d984-da56-0df1-963cc2d2e736@2ndquadrant.com> (raw)
In-Reply-To: <CAFj8pRA417+4wrHMSXLY_D==Ca7fRd0kNHOT6DaLc906AyKiJg@mail.gmail.com>
References: <b05e781a-fa16-6b52-6738-761181204567@2ndquadrant.com>
<65fb745d-4c1a-7582-d61b-1686d8c5c85d@2ndquadrant.com>
<CAFj8pRA417+4wrHMSXLY_D==Ca7fRd0kNHOT6DaLc906AyKiJg@mail.gmail.com>
On 2020-02-13 16:16, Pavel Stehule wrote:
> čt 13. 2. 2020 v 14:40 odesílatel Peter Eisentraut
> <peter.eisentraut@2ndquadrant.com
> <mailto:peter.eisentraut@2ndquadrant.com>> napsal:
>
> On 2019-12-21 07:47, Peter Eisentraut wrote:
> > When updating a table row with generated columns, we only need to
> > recompute those generated columns whose base columns have changed in
> > this update and keep the rest unchanged. This can result in a
> > significant performance benefit (easy to reproduce for example with a
> > tsvector column). The required information was already kept in
> > RangeTblEntry.extraUpdatedCols; we just have to make use of it.
> >
> > A small problem is that right now ExecSimpleRelationUpdate() does not
> > populate extraUpdatedCols. That needs fixing first.
>
> Here is an updated patch set that contains a fix for the issue above
> (should be backpatched IMO) and the actual performance patch as before.
>
>
> + 1
>
> I tested check-world without problems, and changes of patch has sense
> for me.
committed, thanks
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
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: peter.eisentraut@2ndquadrant.com, pavel.stehule@gmail.com
Subject: Re: Optimize update of tables with generated columns
In-Reply-To: <f7f78f54-d984-da56-0df1-963cc2d2e736@2ndquadrant.com>
* 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