From: Kevin Keith <kkeith@borderware.com>
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: pgsql-admin@postgresql.org
Subject: Re: ERROR: could not read block
Date: Tue, 15 Nov 2005 18:36:45 -0500
Message-ID: <437A710D.7060107@borderware.com> (raw)
In-Reply-To: <4379FE9B020000250000072F@gwmta.wicourts.gov>
References: <4379FE9B020000250000072F@gwmta.wicourts.gov>
If I have followed the chain correctly, I saw that you were trying to
run an update statement on a large number of records in a large table
right? I have changed my strategy in the past for this type of problem.
I don't know if it would have fixed this problem or not, but I have seen
with Postgres and Oracle that updates like this on a large table may
take very long and cause contention processes.
Anyway, the method I normally use is to write a script that selects the
records into a cursor and updates one at a time by the primary key, and
then committing the transaction every so often (i.e. 500 - 1000
records). This way there will not be the overhead associated with an
extremely large transaction, and the script will complete much faster (I
have seen hours vs. minutes).
Hope this helps.
Kevin
Kevin Grittner wrote:
>I got the error log working on Windows (with redirect_stderr). I had
>to stop and restart postgres to do so. I ran the query (for the fourth
>time), and it completed successfully.
>
>I'm not inclined to believe that changing the redirect_stderr setting
>would change this behavior, so I guess that either it is a
>coincidence or the restart cleared some bad state within postgres.
>
>Is there anything that anyone wants me to do at this point, to try
>to pin down a cause, or do I drop it here?
>
>-Kevin
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 2: Don't 'kill -9' the postmaster
>
>
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-admin@postgresql.org
Cc: kkeith@borderware.com, Kevin.Grittner@wicourts.gov
Subject: Re: ERROR: could not read block
In-Reply-To: <437A710D.7060107@borderware.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