473,396 Members | 1,770 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,396 software developers and data experts.

Dropping a tablespace - windows

I have a tablespace that is not being used and I want to drop it. When I try to drop the tablespace either via pgAdmin III or an sql command I get the following error:

cannot read directory "pg_tblspc/20612": No such file or directory

I have tired to manually create those directories in the location listed as the target folder for the tablespace. Error still occurs. The tablespace may have encountered errors during creation.

Ideas how I get rid of this tablesapce?

Thanks
Mark
Aug 21 '09 #1
5 3486
rski
700 Expert 512MB
What does the query show
Expand|Select|Wrap|Line Numbers
  1. select * from pg_tablespace;
  2.  
Aug 21 '09 #2
spcname | spcowner | spclocation | spcacl
-------------+----------+--------------------+--------
pg_default | 10 | |
pg_global | 10 | |
cmatblspace | 10 | /dbdata/cmadbfiles |
(3 rows)
Aug 21 '09 #3
rski
700 Expert 512MB
Can you connect via psql client and run query
Expand|Select|Wrap|Line Numbers
  1. drop tablespace tablespace_you_want_to_delete;
  2.  
I guess you want to drop cmatblspace, don't you?

You can also try to run this query via pgadmin3.
Aug 21 '09 #4
correct, i wish to drop the cmatblspace tablespace.

drop tablespace cmatblspace;

ERROR: could not read directory "pg_tblspc/20612": No such file or directory
Aug 21 '09 #5
Some additional info:

I found information in the 8.1 documentation (I am using 8.4) that pg_tblspc is a directory under the data dir for postgres for holding soft links to files. Sure enough there is a pg_tblspc/20612 folder under the data folder for postgres. When I click on the 20612 folder, I get the following:

C:\Program Files (x86)\PostgresSQL\8.4\data\pg_tblspc\20612refers to a location that is unavailable. It could be a hard drive on this computer, or on the network. Check to make sure that the disk is properly inserted, or that you are connected to the Internet or your network, and then try again. If it still cannot be located, the information might have been moved to a differenct location.
Aug 21 '09 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: sandeep G | last post by:
I've a table which has a number & a blob column, both of which are NOT NULL type. This table is composite partitioned using range & hash on the same column. Each partition is sub partitioned into...
6
by: robert | last post by:
just got out of a "class" on EXPLAIN, from a 390/v6 maven. was told that ACCESSTYPE = 'R' in the plan_table meant a TableSpace scan. hmmmm. next step up (or down, depending on your outlook)...
1
by: db2group88 | last post by:
currently we are using db2 udb v8.1 on windows, if i create a new regular tablespace with 8k page size, on a new bufferpool pagesize 8k, when i create a system temporary tablespace relate to this...
1
by: Michel Esber | last post by:
Hello, DB2 V8 FP 10 running Linux RedHat 4.0. I have created a system temporary tablespace and now I want to delete it. However: $ db2 "drop tablespace reorg" DB21034E The command was...
5
by: Christian Traber | last post by:
Hi! just playing with tablespaces... - moved a existing table to a new tablespace - tried to move it back to default tablespace (ALTER TABLE accounts SET TABLESPACE pg_default;) Got the...
7
by: Ross Mallett | last post by:
I have to drop large numbers of test tables (> 200) fairly often. This operation seems to be very slow. Is there some way to speed up the process of dropping tables?
4
by: Joachim Klassen | last post by:
DB2 V8.2 FP10 on Windows I tested the following HADR scenario: - a new tablespace on a new filesytem is created on the primary System - the replay on standby fails because of lacking permissions...
3
by: BD | last post by:
Hi, folks. Sorry about this - I have been R'ing all TFM's I can find, but am just getting more frustrated. Background: db2 UDB 8.1 on Windows. I'm quite new to db2, but have several...
3
by: sekhar.mekala | last post by:
Hello, I am a DB2 DBA on IBM Mainframe environment. I recently started learning DB2 on Unix/Windows environment. Can any one answer the following questions: 1. What is the qualifier that is...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.