473,320 Members | 1,744 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Dropping schemas and "illegal seek"

I have a perl test program which has about 80 test cases, each of
which creates its own schema so I can remove them with DROP SCHEMA xxx
CASCADE. Normally each test case creates and drops the same schema,
but it can run a mode to preserve each schema and all the disk files
for each test. I recently changed my cleanup code to run psql with
all -c commands on one command line rather than a separate psql -c for
each one ...

psql -c 'DROP SCHEMA x1 CASCADE'
psql -c 'DROP SCHEMA x2 CASCADE'
...

changed to

psql -c 'DROP SCHEMA x1 CASCADE' -c 'DROP SCHEMA x2 CASCADE' ...

and began getting this complaint from psql:

Can't drop schemas: Illegal seek

But nothing in the server log. I have set log_min_messages = warning
and maybe that accounts for it, but illegal seek sounds bad enough to
be at least a warning.

I changed it back to separate commands, and the illegal seek complant
only shows up for the last one (which is dropped). I tried adding
sleep 5 between each command, no difference.

VACUUM ANALYZE doesn't clear it. I can recreate all 80 schema and
delete them all and get the same message.

Have I hosed this database?

--
... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
Felix Finch: scarecrow repairman & rocket surgeon / fe***@crowfix.com
GPG = E987 4493 C860 246C 3B1E 6477 7838 76E9 182E 8151 ITAR license #4933
I've found a solution to Fermat's Last Theorem but I see I've run out of room o

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 23 '05 #1
4 2421
Felix Finch <fe***@crowfix.com> writes:
changed to
psql -c 'DROP SCHEMA x1 CASCADE' -c 'DROP SCHEMA x2 CASCADE' ...
AFAICT psql will only execute the last -c string if you try to specify
more than one on the command line, so the above is pretty hopeless anyway,
but
and began getting this complaint from psql:
Can't drop schemas: Illegal seek
I don't see this here. What platform is this on, and what PG version?
Have I hosed this database?


AFAICT whatever this is is local to psql's command processing, so no
your database isn't hosed.

My guess is that the "Illegal seek" message is coming from trying to
fseek stdin, but why it's trying to do that is impossible to guess
without seeing the complete command line.

Is "Can't drop schemas" coming from your script? I don't believe that
such a message text appears anywhere in psql or the backend.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 23 '05 #2
Felix Finch <fe***@crowfix.com> writes:
changed to
psql -c 'DROP SCHEMA x1 CASCADE' -c 'DROP SCHEMA x2 CASCADE' ...
AFAICT psql will only execute the last -c string if you try to specify
more than one on the command line, so the above is pretty hopeless anyway,
but
and began getting this complaint from psql:
Can't drop schemas: Illegal seek
I don't see this here. What platform is this on, and what PG version?
Have I hosed this database?


AFAICT whatever this is is local to psql's command processing, so no
your database isn't hosed.

My guess is that the "Illegal seek" message is coming from trying to
fseek stdin, but why it's trying to do that is impossible to guess
without seeing the complete command line.

Is "Can't drop schemas" coming from your script? I don't believe that
such a message text appears anywhere in psql or the backend.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 23 '05 #3
>>In article <16***********************@crowfix.com>, Felix Finch <fe***@crowfix.com> writes:
I have a perl test program ... and began getting this complaint
from psql: Can't drop schemas: Illegal seek


Ahhh yesss... otherwise known as the subroutine not returning any
specific value and the caller expecting an error code, which explains
why adding debugging code changed it, running it under the debugger
changed it, and just about everything I did changed it, on a random
hit or miss basis.

My apologies for being too quick on the draw :-(

--
... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
Felix Finch: scarecrow repairman & rocket surgeon / fe***@crowfix.com
GPG = E987 4493 C860 246C 3B1E 6477 7838 76E9 182E 8151 ITAR license #4933
I've found a solution to Fermat's Last Theorem but I see I've run out of room o

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #4
>>In article <16***********************@crowfix.com>, Felix Finch <fe***@crowfix.com> writes:
I have a perl test program ... and began getting this complaint
from psql: Can't drop schemas: Illegal seek


Ahhh yesss... otherwise known as the subroutine not returning any
specific value and the caller expecting an error code, which explains
why adding debugging code changed it, running it under the debugger
changed it, and just about everything I did changed it, on a random
hit or miss basis.

My apologies for being too quick on the draw :-(

--
... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
Felix Finch: scarecrow repairman & rocket surgeon / fe***@crowfix.com
GPG = E987 4493 C860 246C 3B1E 6477 7838 76E9 182E 8151 ITAR license #4933
I've found a solution to Fermat's Last Theorem but I see I've run out of room o

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: jphelan | last post by:
I ran a MS Access Analyzer program that suggested changing, "rst.FindFirst strcriteria" to using the, "Seek" instead. I tried making the change. I get a Compile error that says, "Argument is not...
0
by: Felix Finch | last post by:
I have a perl test program which has about 80 test cases, each of which creates its own schema so I can remove them with DROP SCHEMA xxx CASCADE. Normally each test case creates and drops the same...
59
by: Rico | last post by:
Hello, I have an application that I'm converting to Access 2003 and SQL Server 2005 Express. The application uses extensive use of DAO and the SEEK method on indexes. I'm having an issue when...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.