Unix Technical Forum

Re: ERROR: could not read block

This is a discussion on Re: ERROR: could not read block within the pgsql Admins forums, part of the PostgreSQL category; --> I got the error log working on Windows (with redirect_stderr). I had to stop and restart postgres to do ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Admins

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 05:29 AM
Kevin Grittner
 
Posts: n/a
Default Re: ERROR: could not read block

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 05:29 AM
Kevin Keith
 
Posts: n/a
Default Re: ERROR: could not read block

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
>
>



---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-10-2008, 05:29 AM
Qingqing Zhou
 
Posts: n/a
Default Re: ERROR: could not read block



On Tue, 15 Nov 2005, 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.


Strange - the phyiscal read for the 2nd, 3rd, 4th time should be the
same, if we intent to think of the IO presure.

>
> 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?
>


Since you can reproduce the error with big chance, I think it is a good
chance to pin down a cause now. It would be useful to know the
GetLastError() instead of a tranlated errno. Can you patch the code like
this (patch smgrread()):

http://archives.postgresql.org/pgsql...0/msg00050.php


Regards,
Qingqing


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:37 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com