From: Tom Lane <tgl@sss.pgh.pa.us>
To: alex-lists-pgsql@yuriev.com
Cc: pgsql-sql@postgresql.org
Subject: Re: INSERT waiting under heavy load
Date: Fri, 06 Jan 2006 15:52:08 -0500
Message-ID: <22727.1136580728@sss.pgh.pa.us> (raw)
In-Reply-To: <20060106184227.GA1890@s2.yuriev.com>
References: <20060106184227.GA1890@s2.yuriev.com>
alex-lists-pgsql@yuriev.com writes:
> After digging through all the discussions of "INSERT waiting" problems I am
> still not clear about the concensus about solving it.
> ...
> The only thing that I do not particulary like is that every INSERT
> into this table has to adjust a counter column in a corresponding row of the
> (table1) via (table3->table2->table1) path.
Well, if there are only a few rows in table1, then this design is
inherently going to lose big. Any two transactions trying to update the
same table1 row are going to conflict and one will have to wait for the
other to complete. Rethink the need for those counters.
regards, tom lane
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-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, alex-lists-pgsql@yuriev.com
Subject: Re: INSERT waiting under heavy load
In-Reply-To: <22727.1136580728@sss.pgh.pa.us>
* 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