From: Abhijit Menon-Sen <ams@2ndQuadrant.com>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: Josh Berkus <josh@agliodbs.com>
Cc: Simon Riggs <simon@2ndquadrant.com>
Cc: Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Gavin Flower <gavinflower@archidevsys.co.nz>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [PERFORM] In progress INSERT wrecks plans on table
Date: Sat, 13 Jul 2013 14:19:23 +0530
Message-ID: <20130713084923.GA1011@toroid.org> (raw)
In-Reply-To: <CAMkU=1z8iyZ6ajtBHVGcZ05fMUhu3HCekqqsT6BKnksAzmk8fA@mail.gmail.com>
References: <CA+U5nMKMfZUEimZ9=oF2wJ-WkiGhMw3mQjUFT6PBGofUpmXL8A@mail.gmail.com>
<51870CB6.6090404@catalyst.net.nz>
<CA+U5nMJHgHczmWrKzst=PJeP+9BHJAsTgRNXyVZX5Oyys2zn_g@mail.gmail.com>
<20130624044350.GA32322@toroid.org>
<WM!ecf8a06e8ffb427fca7f6e0f4ff5638515a78282eced37d2e4f9981c1e769de67caec13f84aa60888557e9af7b43dca1!@asav-2.01.com>
<51DAF2C8.6010705@agliodbs.com>
<WM!26a3c5a0f97d399bf3d258d64ee1eee5843f0b45f9801c411e8f5e0770f3c25a892f527c93229c57bfa8f0f3eb6066dc!@asav-2.01.com>
<51DD9026.2030107@agliodbs.com>
<20130711050958.GA23755@toroid.org>
<CAMkU=1z8iyZ6ajtBHVGcZ05fMUhu3HCekqqsT6BKnksAzmk8fA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
At 2013-07-12 16:25:14 -0700, jeff.janes@gmail.com wrote:
>
> I think the reviewer of a performance patch should do some independent
> testing of the performance, to replicate the author's numbers; and
> hopefully with a few different scenarios.
You're quite right. I apologise for being lazy; doubly so because I
can't actually see any difference while running the test case with
the patches applied.
unpatched:
before: 1629.831391, 1559.793758, 1498.765018, 1639.384038
during: 37.434492, 37.044989, 37.112422, 36.950895
after : 46.591688, 46.341256, 46.042169, 46.260684
patched:
before: 1813.091975, 1798.923524, 1629.301356, 1606.849033
during: 37.344987, 37.207359, 37.406788, 37.316925
after : 46.657747, 46.537420, 46.746377, 46.577052
("before" is before starting session 2; "during" is after session 2
inserts, but before it commits; "after" is after session 2 issues a
rollback.)
The timings above are with both xid_in_snapshot_cache.v1.patch and
cache_TransactionIdInProgress.v2.patch applied, but the numbers are
not noticeably different with only the first patch applied. After I
"vacuum plan", the timings in both cases return to normal.
In a quick test with gdb (and also in perf report output), I didn't see
the following block in procarray.c being entered at all:
+ if (max_prepared_xacts == 0 && pgprocno >= 0 &&
+ (TransactionIdEquals(xid, pxid) || TransactionIdEquals(xid, cxid)))
+ {
…
I'll keep looking, but comments are welcome. I'm setting this back to
"Needs Review" in the meantime.
-- Abhijit
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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: ams@2ndQuadrant.com, jeff.janes@gmail.com, josh@agliodbs.com, simon@2ndquadrant.com, mark.kirkwood@catalyst.net.nz, tgl@sss.pgh.pa.us, gavinflower@archidevsys.co.nz, pgsql-hackers@postgresql.org
Subject: Re: [PERFORM] In progress INSERT wrecks plans on table
In-Reply-To: <20130713084923.GA1011@toroid.org>
* 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