From: Rob Sargent <robjsargent@gmail.com>
To: Scott Marlowe <scott.marlowe@gmail.com>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: idle in transaction, why
Date: Tue, 7 Nov 2017 09:22:51 -0700
Message-ID: <306c7695-84d0-e0b4-4755-57d14b6fd8e0@gmail.com> (raw)
In-Reply-To: <CAOR=d=0f8rw5PJS6i7+bfMqjSwjPUqYEsBOLOrPdymnMioqQfg@mail.gmail.com>
References: <4a365db4-8608-65c8-e3dc-23524f881bc3@gmail.com>
<CAKFQuwaOZPo6ArqXrJ=E1jVYxV-F9=YuY8uypyY+OymuZAKKsA@mail.gmail.com>
<16893.1509999467@sss.pgh.pa.us>
<6ed9ca9b-fb80-e505-2522-be9b5f63a759@gmail.com>
<19493.1510000892@sss.pgh.pa.us>
<81aa980b-fb4c-e9b4-fa82-9f14df71a2df@gmail.com>
<CAHyXU0wbTn2pE0Mf1wtMd90xpYXRMYgwiba7Bf-fkOy+uVkVfg@mail.gmail.com>
<5d130fce-3f5c-fb0a-4bf0-3163c14fc49a@gmail.com>
<otrmk6$63m$1@blaine.gmane.org>
<19B059B9-E4D6-41CA-AB0A-CBAB58C10EC7@gmail.com>
<CAOR=d=0f8rw5PJS6i7+bfMqjSwjPUqYEsBOLOrPdymnMioqQfg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>
On 11/07/2017 09:09 AM, Scott Marlowe wrote:
> On Tue, Nov 7, 2017 at 7:44 AM, Rob Sargent <robjsargent@gmail.com> wrote:
>>
>>> On Nov 7, 2017, at 12:16 AM, Thomas Kellerer <spam_eater@gmx.net> wrote:
>>>
>>> I would figure values in "minutes" to be more realistic depending on the workload and characteristics of the application.
>>>
>>> A transaction that has several seconds of "think time" between individual statements doesn't seem that unrealistic.
>>>
>> I started with the default zero and the save went through perfectly. It takes ten minutes so I’ll have a concurrency issue I imagine.
> 10 minutes is long-ish but if it's not run all the time etc it may be
> what you're stuck with. Idle in transaction doesn't necessarily mean
> concurrency issues, as long as you're not operating on a whole table
> other people need to update as well. I guess now's a good time to
> profile what your code is doing, what's take the longest, and see if
> maybe you can split that big transaction up into bite sized pieces.
Short story: The save operation in question is insert only. Done in a
single transaction (currently).
The last run generated 1.7M new 'segments', each of those grouped into
one of 131K segmentsets (so another 1.7M members), those 131K sets
recorded as 'outputs'. In production we'll start 22 jobs, one per
chromosome (no XY) for each pedigree. We spread those across machines,
starting roughly at the same time. Analysis time is measured in days
and is pretty much linear with chromosome size (and inversely to
processor count) but pretty sure at some point two of those send their
payload within minutes of each other. You know they will.
Do two sets of writes to same table interfere with each other horribly?
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: robjsargent@gmail.com, scott.marlowe@gmail.com
Subject: Re: idle in transaction, why
In-Reply-To: <306c7695-84d0-e0b4-4755-57d14b6fd8e0@gmail.com>
References: <4a365db4-8608-65c8-e3dc-23524f881bc3@gmail.com> <CAKFQuwaOZPo6ArqXrJ=E1jVYxV-F9=YuY8uypyY+OymuZAKKsA@mail.gmail.com> <16893.1509999467@sss.pgh.pa.us> <6ed9ca9b-fb80-e505-2522-be9b5f63a759@gmail.com> <19493.1510000892@sss.pgh.pa.us> <81aa980b-fb4c-e9b4-fa82-9f14df71a2df@gmail.com> <CAHyXU0wbTn2pE0Mf1wtMd90xpYXRMYgwiba7Bf-fkOy+uVkVfg@mail.gmail.com> <5d130fce-3f5c-fb0a-4bf0-3163c14fc49a@gmail.com> <otrmk6$63m$1@blaine.gmane.org> <19B059B9-E4D6-41CA-AB0A-CBAB58C10EC7@gmail.com> <CAOR=d=0f8rw5PJS6i7+bfMqjSwjPUqYEsBOLOrPdymnMioqQfg@mail.gmail.com> <306c7695-84d0-e0b4-4755-57d14b6fd8e0@gmail.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