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

I want to drop a tablespace, but it says tablespace is not empty. What am I missing?

Hello everyone,

I moved all tables and indices out of a tablespace to a different tablespace (different hard drive and different mountpoint). Now I want to drop the old tablespace but it says the tablespace is not empty.

If I go into the tablespace directory i see bunch of files. I was told that these cannot be deleted, but if I'm trying to drop this tablespace anyway, can I just delete these files? Will this affect the tables that are moved to the new tablespace

Expand|Select|Wrap|Line Numbers
  1. <code>PG_9.5_201510051/259388 # du -sh *
  2. 1.1G    2935335227
  3. 1.1G    2935335227.1
  4. 1.1G    2935335227.2
  5. 138M    2935335227.3
  6. 1.1G    2935335230
  7. 1.1G    2935335230.1
  8. 1.1G    2935335230.2
  9. 1.1G    2935335230.3
  10. 1.1G    2935335230.4
  11. 1.1G    2935335230.5
  12. 266M    2935335230.6
  13. 139M    2935335232</code>
Any guidance would be appreciated
Thanks in advance
May 21 '19 #1
3 14632
zmbd
5,501 Expert Mod 4TB
!! Very important, make absolutely sure you have a backup of your database. It's very difficult to recover !!

Have you tried the following:
https://www.postgresql.org/docs/8.4/...ag-dropdb.html
Login to the database as the owner or superuser
Expand|Select|Wrap|Line Numbers
  1. DROP DATABASE dbYourDbNameHere;
  2. DROP TABLESPACE yourTableSpaceNameHere;
May 22 '19 #2
Gevoergun
1 Bit
The tablespace files take up too little space for you to delete them for no good reason.
Mar 6 '22 #3
Zentro
1 Bit
You can delete tablespace files. However, you cannot be completely sure that you are not deleting something important. I, too, thought these files were not that important and ended up deleting important system files that were worth keeping on disk. Of course, that was stupid. Don't repeat my mistakes if you don't want to go to salvagedata.com later. I turned to them because I knew that there was no other way to get back the important table space configurations that I had foolishly erased from my computer's memory irretrievably. Thankfully, there are now services like this, where they can save and restore everything.
Mar 7 '22 #4

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...
2
by: robert | last post by:
the real DBAs aren't around for a few days, so rather than shoot myself in a tender spot, i thought i'd ask first. what docs i can find say that the syntax is: DROP TABLESPACE FOO seems...
1
by: news.sbcglobal.net | last post by:
Can anyone tell me how to fix this so that my drop down list is not empty when the page loads (ASP.NET 2.0). Thanks!: ------------------------------ HTML ----------------------------- <%@...
1
by: jainarayan5484 | last post by:
hi All, Sir i want to know That What is the need to Create Tablespace,Alter TableSpace,Drop Tablespace.Whereas database use default tablespace. plz help me ...
0
by: wugon.net | last post by:
Env: DB2 LUW V8 + FP14 AIX 5.3 Problem Description: Our production database create one big temporary tablespace to do off- line reorg, after reorg complete, we drop this tablespace online...
1
by: bujjus173 | last post by:
Hi, I need to drop a tablespace, I am unable to drop because it says the containers it uses is inaccessible, because a process deleted the container. the tablespace went into pending state. I just...
1
by: deshaipet | last post by:
Hi friends - I created a automatic storage tablespace with a pagesize of 16 K and initial size of 64 MB. create large tablespace test_tbsp1 pagesize 16k managed by automatic storage autoresize...
1
by: Kelly K | last post by:
I am trying to send out letters. PhysicianName PrimaryHospital Address1 Address2 Address3 CityStateZipCode Some of the fields are blank (example: address3 tends to be blank unless there is...
4
by: Stevestan1 | last post by:
I have a query that is connected to a form. There are 2 dropdown boxes in the form that are connected to two columns on the query. I would like the query to search for all records if those 2...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
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...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
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...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.