pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Paul B. Anderson <paul@pnlassociates.com>
To: pgsql-admin@postgresql.org
Subject: Re: Large transaction problem
Date: Thu, 11 Nov 2004 14:50:26 -0500
Message-ID: <4193C282.2040904@pnlassociates.com> (raw)

I think I've solved this problem.  It involved the vacuumdb command 
rather than the large insert.  I found this out when a nightly vacuumdb 
script reported the problem even though no records had been loaded at all.

My postgresql.conf file had a 10 second timeout and the large database 
required more than 10 seconds for the vacuum.  It seems that this left 
postmaster and/or the particular database in a state where any SQL 
against that database gave the same error response about being canceled 
by the user.

I'm guessing postgresql had left some internal state set for the 
database and was trying to complete the vacuum first.   Anyway, I set 
the statement_timeout = 0 and the problem isn't recurring.

Paul


"Paul B. Anderson" <paul@pnlassociates.com> writes:

>> Ulimit says
>  
>

>> # su - postgres
>> -bash-2.05b$ ulimit -a
>> core file size        (blocks, -c) 0
>> data seg size         (kbytes, -d) unlimited
>> file size             (blocks, -f) unlimited
>> max locked memory     (kbytes, -l) 4
>> max memory size       (kbytes, -m) unlimited
>> open files                    (-n) 1024
>> pipe size          (512 bytes, -p) 8
>> stack size            (kbytes, -s) 10240
>> cpu time             (seconds, -t) unlimited
>> max user processes            (-u) 3072
>> virtual memory        (kbytes, -v) unlimited
>  
>

>> None of the actual limits seems to be a problem.  I can't seem to change 
>> max locked memory using ulimit but I'll try increasing stack size.  
>> Could that be involved?
>  
>

No, the 'file size' and 'cpu time' limits are the ones I'd expect to
cause this sort of behavior.

One possible gotcha is that depending on how you start the postmaster,
it might be living under different ulimit settings than what you see
interactively.

			regards, tom lane

view thread (9+ messages)  latest in thread

Message-ID: <4193C282.2040904@pnlassociates.com>
Permalink:  ../4193C282.2040904@pnlassociates.com/
Also on:    postgresql.org/message-id/4193C282.2040904@pnlassociates.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-admin@postgresql.org
  Cc: paul@pnlassociates.com
  Subject: Re: Large transaction problem
  In-Reply-To: <4193C282.2040904@pnlassociates.com>
  References: <4193C282.2040904@pnlassociates.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