Re: DB Creations/ Drop DB :: Not working...

From: Avinash Kumar <avinash(dot)vallarapu(at)gmail(dot)com>
To: soumik(dot)bhattacharjee(at)kpn(dot)com
Cc: shreeyansh2014(at)gmail(dot)com, pgsql-admin(at)postgresql(dot)org
Subject: Re: DB Creations/ Drop DB :: Not working...
Date: 2018-12-06 11:14:45
Message-ID: CAN0TujcpWkL-6AAA1oo8T9xaA6ZE=yVBAeYOV5V-uA5vn4BQ7w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi Sounim,

Lets make it simple.

Do the following steps.

$ psql
\db

You should see the list of tablespaces and their locations.

Check if the location specified for the tablespace => *sym_m_data1 *exists.
If not, create it or fix the permission issues, if any.

Regards,
Avinash Vallarapu.

On Thu, Dec 6, 2018 at 4:19 PM <soumik(dot)bhattacharjee(at)kpn(dot)com> wrote:

> postgres=# SELECT spcname FROM pg_tablespace;
>
> spcname
>
> --------------
>
> pg_default
>
> pg_global
>
> *sym_m_data1*
>
> *sym_m_index1*
>
> (4 rows)
>
>
>
> postgres=#
>
>
>
> *From:* Bhattacharjee, Soumik
> *Sent:* Thursday, December 06, 2018 11:48 AM
> *To:* 'Shreeyansh Dba' <shreeyansh2014(at)gmail(dot)com>
> *Cc:* pgsql-admin <pgsql-admin(at)postgresql(dot)org>
> *Subject:* RE: DB Creations/ Drop DB :: Not working...
>
>
>
> Thanks,
>
>
>
> But i can see the below in server.
>
>
>
> postgres(at)postgresdb-uat-postgresql-5b9fb67fcd-dbpb4:~/data/pgdata/postgresql-db/pg_tblspc$
> ls -ltr
>
> total 0
>
> *lrwxrwxrwx. 1 postgres postgres 24 Dec 5 15:21 16386 ->
> /var/lib/postgresql/data*
>
> *lrwxrwxrwx. 1 postgres postgres 28 Dec 5 15:27 16389 ->
> /var/lib/postgresql/data/idx*
>
> postgres(at)postgresdb-uat-postgresql-5b9fb67fcd-dbpb4:~/data/pgdata/postgresql-db/pg_tblspc$
> pwd
>
> */var/lib/postgresql/data/pgdata/postgresql-db/pg_tblspc*
>
>
>
>
>
> Do I need to re-create the pg_tblspc or user defined tablespaces?
>
>
>
> Thanks
>
> Soumik
>
>
>
>
>
> *From:* Shreeyansh Dba <shreeyansh2014(at)gmail(dot)com>
> *Sent:* Thursday, December 06, 2018 11:42 AM
> *To:* Bhattacharjee, Soumik <soumik(dot)bhattacharjee(at)kpn(dot)com>
> *Cc:* pgsql-admin <pgsql-admin(at)postgresql(dot)org>
> *Subject:* Re: DB Creations/ Drop DB :: Not working...
>
>
>
> Hi Soumik,
>
> It seems your tablespace directory deleted by someone and you need to
> recreate tablespace for your database.
>
> Go through the below link for more details.
>
> https://www.postgresql.org/docs/10/manage-ag-tablespaces.html
>
> Hope this will helps.
>
> <http://www.shreeyansh.com>
>
>
>
> On Wed, Dec 5, 2018 at 10:40 PM <soumik(dot)bhattacharjee(at)kpn(dot)com> wrote:
>
> Hi All,
>
>
>
> Any idea how to solve this error, tried with pgadmin4 and also using psql
> CLI
>
>
>
> And why this comes in?
>
>
>
> postgres=# CREATE DATABASE symuatdb
>
> postgres-# WITH
>
> postgres-# OWNER = postgres
>
> postgres-# ENCODING = 'UTF8'
>
> postgres-# LC_COLLATE = 'en_US.utf8'
>
> postgres-# LC_CTYPE = 'en_US.utf8'
>
> postgres-# TABLESPACE = sym_m_data1
>
> postgres-# CONNECTION LIMIT = 10;
>
> *ERROR: could not create directory
> "pg_tblspc/16386/PG_10_201707211/24576": No such file or directory*
>
> postgres=#
>
>
>
> Thanks
>
> Soumik
>
>

--
9000799060

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Shreeyansh Dba 2018-12-06 11:35:10 Re: DB Creations/ Drop DB :: Not working...
Previous Message soumik.bhattacharjee 2018-12-06 10:49:32 RE: DB Creations/ Drop DB :: Not working...