473,545 Members | 2,085 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_message s = 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.c om
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 2442
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************ ***********@cro wfix.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.c om
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*******@postg resql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #4
>>In article <16************ ***********@cro wfix.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.c om
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*******@postg resql.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
4461
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 optional". Does anyone have any ideas on how I should change the FindFirst to using Seek the method?
0
314
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 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...
59
7446
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 the recordset opens a table. When I write Set rst = db.OpenRecordset("MyTable",dbOpenTable, dbReadOnly) I get an error. I believe it's...
0
7468
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7401
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7808
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7423
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7757
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5329
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4945
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3450
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3443
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.