Re: ERROR: tablespace "archive2" is not empty

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Josip Rodin <joy(at)entuzijast(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: ERROR: tablespace "archive2" is not empty
Date: 2015-10-19 19:02:17
Message-ID: 56253E39.2080206@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/19/2015 11:25 AM, Josip Rodin wrote:
> On Mon, Oct 19, 2015 at 11:15:08AM -0700, Adrian Klaver wrote:
>>> Sorry, that's another typo. It's the latter. The symlink is indeed pointing to the 5 GB of leftovers.
>>
>> This:
>>
>> % sudo find /media/ssd/archive2/ -type f -ls
>> 36962439 393940 -rw------- 1 postgres postgres 403390464 Jun 27
>> 2014 /media/ssd/archive2
>>
>> is a typo or is there another symlink involved?
>>
>> So, is there anything at /media/archive2/psql?
>
> This time I'll just paste command output to make sure it's verbatim :)
>
> % sudo ls -la /media/ssd/postgresql/9.1/main/pg_tblspc/7849107
> lrwxrwxrwx 1 postgres postgres 30 Sep 30 2014 /media/ssd/postgresql/9.1/main/pg_tblspc/7849107 -> /media/ssd/archive2/postgresql
>
> % sudo ls -la $(sudo readlink -f /media/ssd/postgresql/9.1/main/pg_tblspc/7849107)
> total 12
> drwx------ 3 postgres root 4096 Jun 25 2014 .
> drwxr-xr-x 3 root root 4096 Sep 30 2014 ..
> drwx------ 3 postgres postgres 4096 Jun 25 2014 PG_9.1_201105231
>
> % sudo ls -la /media/archive2/psql
> ls: cannot access /media/archive2/psql: No such file or directory
>
>> Or more to the point how did spclocation and the symlink get to be
>> different?
>
> No idea, I inherited this machine. But like Tom said, spclocation being
> wrong is apparently harmless.

Other then you cannot DROP the tablespace:) This will probably needed to
be resolved for the reasons that came up in this thread:

http://www.postgresql.org/message-id/CAAW2xfeA1mPw4RW3-4LUTW+y4ruQFPT5Bx4c3DKUb01f4ejabw@mail.gmail.com

it is a very long thread so you might to take a look at this:

http://www.postgresql.org/message-id/7681.1389548920@sss.pgh.pa.us

What happens if you change spclocation to the correct location?

>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2015-10-19 19:08:41 Re: interperting type oid in C code
Previous Message Ken Been 2015-10-19 18:51:19 Re: interperting type oid in C code