could not open relation: Invalid argument

Started by Roberts, Jonabout 18 years ago5 messages
#1Roberts, Jon
Jon.Roberts@asurion.com

Version: PostgreSQL 8.2.5 on i686-pc-mingw32

I recently started getting this error message randomly, "could not open
relation 42904/42906/42985: Invalid argument". I also got it for a couple
of other files. All three files are related to tables that have just a
single row each.

I googled the error message and found that this looks like a problem on
Windows (which I'm running until we get access to our Linux server) and
probably related to anti-virus scanning. Having run Oracle on Windows
before, I have experienced the problem with an anti-virus scanner locking a
file and causing the database to error. I thought I understood and fixed
the problem.

Today, I used pgAdmin to Vacuum Analyze the entire database. It flew
through this task as my database is fairly small. However, when it got to
the three tables that exhibited this error message, it hung. It took maybe
2-3 seconds to vacuum analyze each one of these tables.

Now I don't get it. Was there something corrupt in the file and it wasn't
related to the anti-virus scanner?

Jon

#2Alvaro Herrera
alvherre@commandprompt.com
In reply to: Roberts, Jon (#1)
Re: could not open relation: Invalid argument

Roberts, Jon wrote:

Version: PostgreSQL 8.2.5 on i686-pc-mingw32

I recently started getting this error message randomly, "could not open
relation 42904/42906/42985: Invalid argument". I also got it for a couple
of other files. All three files are related to tables that have just a
single row each.

This has been reported before, and we've patched the system so that the
error reported is better. In HEAD we also patched it so that the system
would automatically retry a number of times if the problem is
ERROR_SHARING_VIOLATION (or something like that). That patch was not
backported to 8.2 due to lack of testing -- the original reported did
not come back to try the patched version.

If you want to try, the patch is here:
https://projects.commandprompt.com/public/pgsql/changeset/29853

Let us know how it goes. If your problem is easily reproducible and the
patch makes it go away, we would consider back-patching the fix.

Thanks.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

#3Jaime Casanova
systemguards@gmail.com
In reply to: Alvaro Herrera (#2)
Re: could not open relation: Invalid argument

On Jan 14, 2008 11:03 AM, Alvaro Herrera <alvherre@commandprompt.com> wrote:

Roberts, Jon wrote:

Version: PostgreSQL 8.2.5 on i686-pc-mingw32

I recently started getting this error message randomly, "could not open
relation 42904/42906/42985: Invalid argument". I also got it for a couple
of other files. All three files are related to tables that have just a
single row each.

This has been reported before, and we've patched the system so that the
error reported is better. In HEAD we also patched it so that the system
would automatically retry a number of times if the problem is
ERROR_SHARING_VIOLATION (or something like that). That patch was not
backported to 8.2 due to lack of testing -- the original reported did
not come back to try the patched version.

If you want to try, the patch is here:
https://projects.commandprompt.com/public/pgsql/changeset/29853

Let us know how it goes. If your problem is easily reproducible and the
patch makes it go away, we would consider back-patching the fix.

I have builded a patched version of 8.2, if you want i can send it to you...
if your mail server doesn't accept large files (the zip file is 5.6
mb) then maybe someone can share some space for temporarily store
it...

--
regards,
Jaime Casanova

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs and the universe trying
to produce bigger and better idiots.
So far, the universe is winning."
Richard Cook

#4Magnus Hagander
magnus@hagander.net
In reply to: Jaime Casanova (#3)
Re: could not open relation: Invalid argument

On Mon, Jan 14, 2008 at 10:12:55PM -0500, Jaime Casanova wrote:

On Jan 14, 2008 11:03 AM, Alvaro Herrera <alvherre@commandprompt.com> wrote:

Roberts, Jon wrote:

Version: PostgreSQL 8.2.5 on i686-pc-mingw32

I recently started getting this error message randomly, "could not open
relation 42904/42906/42985: Invalid argument". I also got it for a couple
of other files. All three files are related to tables that have just a
single row each.

This has been reported before, and we've patched the system so that the
error reported is better. In HEAD we also patched it so that the system
would automatically retry a number of times if the problem is
ERROR_SHARING_VIOLATION (or something like that). That patch was not
backported to 8.2 due to lack of testing -- the original reported did
not come back to try the patched version.

If you want to try, the patch is here:
https://projects.commandprompt.com/public/pgsql/changeset/29853

Let us know how it goes. If your problem is easily reproducible and the
patch makes it go away, we would consider back-patching the fix.

I have builded a patched version of 8.2, if you want i can send it to you...
if your mail server doesn't accept large files (the zip file is 5.6
mb) then maybe someone can share some space for temporarily store
it...

Sure, I can do that.

//Magnus

#5Jaime Casanova
systemguards@gmail.com
In reply to: Magnus Hagander (#4)
Re: could not open relation: Invalid argument

On Jan 15, 2008 4:25 AM, Magnus Hagander <magnus@hagander.net> wrote:

On Mon, Jan 14, 2008 at 10:12:55PM -0500, Jaime Casanova wrote:

On Jan 14, 2008 11:03 AM, Alvaro Herrera <alvherre@commandprompt.com> wrote:

Roberts, Jon wrote:

Version: PostgreSQL 8.2.5 on i686-pc-mingw32

I recently started getting this error message randomly, "could not open
relation 42904/42906/42985: Invalid argument". I also got it for a couple
of other files. All three files are related to tables that have just a
single row each.

This has been reported before, and we've patched the system so that the
error reported is better. In HEAD we also patched it so that the system
would automatically retry a number of times if the problem is
ERROR_SHARING_VIOLATION (or something like that). That patch was not
backported to 8.2 due to lack of testing -- the original reported did
not come back to try the patched version.

If you want to try, the patch is here:
https://projects.commandprompt.com/public/pgsql/changeset/29853

Let us know how it goes. If your problem is easily reproducible and the
patch makes it go away, we would consider back-patching the fix.

I have builded a patched version of 8.2, if you want i can send it to you...
if your mail server doesn't accept large files (the zip file is 5.6
mb) then maybe someone can share some space for temporarily store
it...

Sure, I can do that.

Good... can you tell me where can i upload de file?

--
regards
Jaime Casanova

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs and the universe trying
to produce bigger and better idiots.
So far, the universe is winning."
Richard Cook