pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <scott.marlowe@gmail.com>
To: Eduardo Piombino <drakorg@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: a heavy duty operation on an "unused" table kills my server
Date: Wed, 13 Jan 2010 11:11:32 -0700
Message-ID: <dcc563d11001131011w6c06d5aeo153c060633def9c9@mail.gmail.com> (raw)
In-Reply-To: <e24c1d9d1001130954y3553f145raf2a0a367b8a5397@mail.gmail.com>
References: <e24c1d9d1001122059ic5d4721o98ccf85033b1fead@mail.gmail.com>
	<dcc563d11001130852k30b89980j77942338f1cc4e76@mail.gmail.com>
	<e24c1d9d1001130954y3553f145raf2a0a367b8a5397@mail.gmail.com>

On Wed, Jan 13, 2010 at 10:54 AM, Eduardo Piombino <drakorg@gmail.com> wrote:
>
>> OK, I'm not entirely sure this table is not still locking something
>> else.  If you make a copy by doing something like:
>>
>> select * into test_table from a;
>>
>> and then alter test_table do you still get the same problems?  If so,
>> then it is an IO issue, most likely.  If not, then there is some
>> client connection still referencing this table or something and that
>> could cause this type of behaviour as well.
>
> I can guarantee you that the table is not being referenced by any other
> thread, table or process, and that it is totally unrelated to everything
> else in the system.

If you rename a table that WAS being referenced by other threads, then
it might still be being accessed or waited on etc by those threads, as
their transaction would have started earlier.

The only way you can guarantee it's not being reference in some way is
to create it fresh and new as I suggested and test on that.  Until
then, your guarantee is based on a belief, not verifiable fact.  I too
tend to believe this is an IO problem btw, but claiming that it can't
be a problem with some locks without looking at pg_locks at least, is
a bit premature.



view thread (25+ messages)  latest in thread

Message-ID: <dcc563d11001131011w6c06d5aeo153c060633def9c9@mail.gmail.com>
Permalink:  ../dcc563d11001131011w6c06d5aeo153c060633def9c9@mail.gmail.com/
Also on:    postgresql.org/message-id/dcc563d11001131011w6c06d5aeo153c060633def9c9@mail.gmail.com

 · 

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 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-performance@postgresql.org
  Cc: scott.marlowe@gmail.com, drakorg@gmail.com
  Subject: Re: a heavy duty operation on an "unused" table kills my server
  In-Reply-To: <dcc563d11001131011w6c06d5aeo153c060633def9c9@mail.gmail.com>
  References: <e24c1d9d1001122059ic5d4721o98ccf85033b1fead@mail.gmail.com> <dcc563d11001130852k30b89980j77942338f1cc4e76@mail.gmail.com> <e24c1d9d1001130954y3553f145raf2a0a367b8a5397@mail.gmail.com> <dcc563d11001131011w6c06d5aeo153c060633def9c9@mail.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