pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
To: Simon Riggs <simon@2ndQuadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Gavin Flower <gavinflower@archidevsys.co.nz>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: In progress INSERT wrecks plans on table
Date: Mon, 06 May 2013 13:51:50 +1200
Message-ID: <51870CB6.6090404@catalyst.net.nz> (raw )
In-Reply-To: <CA+U5nMKMfZUEimZ9=oF2wJ-WkiGhMw3mQjUFT6PBGofUpmXL8A@mail.gmail.com >
References: <5179E77B.7050601@catalyst.net.nz >
<5179ECC5.2010206@archidevsys.co.nz >
<5179F259.3010509@catalyst.net.nz >
<5179F5C6.8070702@archidevsys.co.nz >
<5180E3C8.3010201@catalyst.net.nz >
<2121.1367417215@sss.pgh.pa.us >
<5181B80D.70404@catalyst.net.nz >
<CA+U5nMKYYZDekhtxz1E1B11dAm9UJoHBQHrB6DiiZDJo3fLd0Q@mail.gmail.com >
<916bff05a5ab130c76d7835abbaf7762.squirrel@mail.catalyst.net.nz >
<CA+U5nMJHjQccVSB3SkAHdRn2AfuuO49wA8-ZGB366cddTynjdQ@mail.gmail.com >
<CA+U5nMKMfZUEimZ9=oF2wJ-WkiGhMw3mQjUFT6PBGofUpmXL8A@mail.gmail.com >
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
On 05/05/13 00:49, Simon Riggs wrote:
> On 3 May 2013 13:41, Simon Riggs <simon@2ndquadrant.com> wrote:
>
>> (3) to make the check on TransactionIdIsInProgress() into a heuristic,
>> since we don't *need* to check that, so if we keep checking the same
>> xid repeatedly we can reduce the number of checks or avoid xids that
>> seem to be long running. That's slightly more coding than my quick
>> hack here but seems worth it.
>>
>> I think we need both (1) and (3) but the attached patch does just (1).
>>
>> This is a similar optimisation to the one I introduced for
>> TransactionIdIsKnownCompleted(), except this applies to repeated
>> checking of as yet-incomplete xids, and to bulk concurrent
>> transactions.
>
> ISTM we can improve performance of TransactionIdIsInProgress() by
> caching the procno of our last xid.
>
> Mark, could you retest with both these patches? Thanks.
>
Thanks Simon, will do and report back.
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
view thread (42+ messages) latest in thread
Message-ID: <51870CB6.6090404@catalyst.net.nz>
Permalink: ../51870CB6.6090404@catalyst.net.nz/
Also on: postgresql.org/message-id/51870CB6.6090404@catalyst.net.nz
copy link · copy postgr.es
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-performance@postgresql.org
Cc: mark.kirkwood@catalyst.net.nz, simon@2ndQuadrant.com, tgl@sss.pgh.pa.us, gavinflower@archidevsys.co.nz
Subject: Re: In progress INSERT wrecks plans on table
In-Reply-To: <51870CB6.6090404@catalyst.net.nz>
* 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