Skip site navigation (1) Skip section navigation (2)

Re: Write workload is causing severe slowdown in Production

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: gnanam(at)zoniac(dot)com, pgsql-performance(at)postgresql(dot)org
Subject: Re: Write workload is causing severe slowdown in Production
Date: 2012-03-22 16:18:43
Message-ID: CAHyXU0xyVixmLdiMaD2wUU6DgN2AiXi1_Avm+k7vB49BFYEPPA@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-performance
On Thu, Mar 22, 2012 at 10:13 AM, Kevin Grittner
<Kevin(dot)Grittner(at)wicourts(dot)gov> wrote:
> In particular, I recommend that you *never* leave transactions open
> or hold locks while waiting for user response or input.  They *will*
> answer phone calls or go to lunch with things pending, potentially
> blocking other users for extended periods.

This -- transactions aren't meant to intentionally block users but to
allow you to ensure data remains in a valid state in the face of
concurrent activity.  In-transaction locks should be as short as
possible while still giving those guarantees and should hopefully
never be user facing.  If you want user controlled locks, they should
be cooperative and non transactional -- advisory locks.

http://www.postgresql.org/docs/current/static/explicit-locking.html#ADVISORY-LOCKS

merlin

In response to

Responses

pgsql-performance by date

Next:From: Sebastian MelchiorDate: 2012-03-22 22:52:49
Subject: Sudden Query slowdown on our Postgresql Server
Previous:From: Kevin GrittnerDate: 2012-03-22 15:13:45
Subject: Re: Write workload is causing severe slowdown in Production

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group