Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1goVN7-0003Av-Mr for pgsql-admin@arkaria.postgresql.org; Tue, 29 Jan 2019 15:32:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1goVN6-0000n6-8W for pgsql-admin@arkaria.postgresql.org; Tue, 29 Jan 2019 15:32:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1goVN5-0000jB-NS for pgsql-admin@lists.postgresql.org; Tue, 29 Jan 2019 15:32:20 +0000 Received: from sonic316-13.consmr.mail.bf2.yahoo.com ([74.6.130.123]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1goVN2-0005z4-8r for pgsql-admin@lists.postgresql.org; Tue, 29 Jan 2019 15:32:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1548775934; bh=Z065ayLC1DRPie460ILsPqHLpuugvXq99coWsozEgog=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:From:Subject; b=sI1n5nYJhOoLniCAPe00bGE7cg766xRZ8QN1V2TexLMBrub6/NUFbyTRNF7Q9HCKkSnBL9I3iVXCLr+IcsbU3As/IzxxZAr58eHp6FxVAkJKzGyWqzu8VWUS3Iiuzh5Vl90uZbAUpuX+VYO4fcTv+sclSMsFedVVp6KmMDdgNErVUHNmpX+qScBeRPurHmOiZ9zet0o8/vlWqKN9SZIRV8unLFDnmdcvzSYciLkEb3yjQIIt3JCKCBclAPNOo1IAT+KJ2z+QTLLcpDoLLZDKaw2KrV99R40Ek90vYDjhuE5a+SurjaYXUZ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SnkMzYWO60jEuP TjEzwV1BuTxhWiRMt80dh73w94aDMcAqPDhmGagjDoSv9lAvrLLsAWxZFWKWyStj543t6pdKQ Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.bf2.yahoo.com with HTTP; Tue, 29 Jan 2019 15:32:14 +0000 Date: Tue, 29 Jan 2019 15:32:09 +0000 (UTC) From: Pepe TD Vo Reply-To: Pepe TD Vo To: Shreeyansh Dba Cc: Pgsql-admin Message-ID: <1974757844.3059117.1548775929314@mail.yahoo.com> In-Reply-To: <1551327578.3016836.1548773045825@mail.yahoo.com> References: <583336373.3022264.1548770846372.ref@mail.yahoo.com> <583336373.3022264.1548770846372@mail.yahoo.com> <1551327578.3016836.1548773045825@mail.yahoo.com> Subject: Re: import tablespaces from oracle to postgres MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_3059115_1704591428.1548775929311" X-Mailer: WebService/1.1.13027 YahooMailNeo Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36 Content-Length: 25229 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_3059115_1704591428.1548775929311 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable seem to me, each datafile doesn't want to share the data_directory folder. I tried to drop and recreate the tablespace success but it's not take the 2= nd one psql# drop tablespace "cidr_data_lg";DROP TABLESPACEpsql# CREATE TABLESPACE= cidr_data_lg LOCATION '/opt/postgres11/data/cidr';CREATE TABLESPACEpsql# C= REATE TABLESPACE cidr_data_md LOCATION '/opt/postgres11/data/cidr'; ERROR: directory "/opt/postgres11/data/cidr/PG_11_201809051" already in use= as a tablespacepsql# CREATE TABLESPACE cidr_data_dg LOCATION '/opt/postgre= s11/data/cidr'; ERROR: directory "/opt/postgres11/data/cidr/PG_11_201809051" already in use= as a tablespace under /opt/postgres11/data/cidr folder, I see PG_11_201809051 folder and th= ere's a datafile there. aren't they supposed to share the folder /opt/postgres11/data/cidr? Bach-Nga No one in this world is pure and perfect.=C2=A0 If you avoid people for the= ir mistakes you will be alone. So judge less, love and forgive more.To call= him a dog hardly seems to do him justice though in as much as he had four = legs, a tail, and barked, I admit he was, to all outward appearances. But t= o those who knew him well, he was a perfect gentleman (Hermione Gingold) **Live simply **Love generously **Care deeply **Speak kindly.*** Genuinely = rich *** Faithful talent *** Sharing success=20 On Tuesday, January 29, 2019 9:44 AM, Pepe TD Vo wro= te: =20 Yes, sir/mam'm, I manually created those extra tablespaces and still get error above.=C2=A0= Seems to me one tablespace for each directory?=C2=A0 I can't have multiple= tablespaces under /opt/postgres11/data/cidr right?=C2=A0 currently the cid= r datbase default tablespace is cidr_data.=C2=A0 How can I create database = with default_tablespaces with cidr_dba, cidr_lg, cidr_dg, etc...?=C2=A0 can= a database has multi-tablespaces? thank you,=C2=A0 Bach-Nga No one in this world is pure and perfect.=C2=A0 If you avoid people for the= ir mistakes you will be alone. So judge less, love and forgive more.To call= him a dog hardly seems to do him justice though in as much as he had four = legs, a tail, and barked, I admit he was, to all outward appearances. But t= o those who knew him well, he was a perfect gentleman (Hermione Gingold) **Live simply **Love generously **Care deeply **Speak kindly.*** Genuinely = rich *** Faithful talent *** Sharing success=20 On Tuesday, January 29, 2019 9:37 AM, Shreeyansh Dba wrote: =20 Hi Pepe, Yes, you can create the tablespaces manually just by changing your tablespa= ce name along with the location. Also, you can use the existing tablespace at the time of importing into the= Postgres. Thanks & Regards, Shreeyansh DBA Team www.shreeyansh.com On Tue, Jan 29, 2019 at 7:37 PM Pepe TD Vo wrote: Hi experts, I am using Ora2pg to export cidr in oracle to postgres.=C2=A0 When the expo= rt Tablespace.sql is done, I import into the Postgres, Cidr.=C2=A0 I get ER= ROR below $psql -U posgres -d CIDR < TABLESPACE_cidrdba.sql SET CREATE TABLESPACE ERROR: directory"/opt/postgres11/data/cidr/PG_11_201809051" already in use = as a tablespace. even trying to create tablespace manually still said it's already in use, b= ut PG_11_20109051 is belong to cidr_data tablespace, how can I create new t= ablespaces for cidr postgres db? $psql -U posgres -d CIDR=C2=A0$psql> create tablespace cidr_lg location 'op= t/postgres11/data/cidr'; SET CREATE TABLESPACE ERROR: directory"/opt/postgres11/data/cidr/PG_11_201809051" already in use = as a tablespace. $psql> create tablespace cidr_dg location 'opt/postgres11/data/cidr';SET CREATE TABLESPACE ERROR: directory"/opt/postgres11/data/cidr/PG_11_201809051" already in use = as a tablespace. how can I create new tablespaces for cidr postgres db? v/r, Bach-Nga No one in this world is pure and perfect.=C2=A0 If you avoid people for the= ir mistakes you will be alone. So judge less, love and forgive more.To call= him a dog hardly seems to do him justice though in as much as he had four = legs, a tail, and barked, I admit he was, to all outward appearances. But t= o those who knew him well, he was a perfect gentleman (Hermione Gingold) **Live simply **Love generously **Care deeply **Speak kindly.*** Genuinely = rich *** Faithful talent *** Sharing success =20 =20 ------=_Part_3059115_1704591428.1548775929311 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
seem to me, each datafile doesn't want to share the = data_directory folder.

I tried to drop and recreate the tablespace success but it's not= take the 2nd one

psql# drop tablespace "cidr_data_lg";
DROP TABLESPACE=
psql# = CREATE TABLESPACE cidr_data_lg LOCATION '/opt/postgres11/data/cidr';
<= div dir=3D"ltr" id=3D"yui_3_16_0_ym19_1_1548767629811_121731">CREATE TABLES= PACE
ps= ql# CREATE TABLESPACE cidr_data_md LOCATION '/opt/postgres11/data/cidr';
ERROR:= directory "/opt/postgres11/data/cidr/PG_11_201809051" already in use as a = tablespace
psql# CREATE TABLESPACE cidr_data_dg LOCATIO= N '/opt/postgres11/data/cidr';
ERROR: directory "/= opt/postgres11/data/cidr/PG_11_201809051" already in use as a tablespace

under /opt/postgr= es11/data/cidr folder, I see PG_11_201809051 folder and there's a datafile = there.
=
ar= en't they supposed to share the folder /opt/postgres11/data/cidr?

Bach-Nga

No on= e in this world is pure and perfect.  If you avoid people for their mi= stakes you will be alone. So judge less, love and forgive more.
To call him a dog hardly seems to do him justi= ce though in as much as he had four legs, a tail, and barked, I admit he wa= s, to all outward appearances. But to those who knew him well, he was a per= fect gentleman (Hermione Gingold)

**Live simply **Love generously **Care deeply **Speak kindly.<= /span>
*** Genuinely rich *** Faithful talent *** Sharing success


On= Tuesday, January 29, 2019 9:44 AM, Pepe TD Vo <pepevo@yahoo.com> wro= te:


Yes, sir/mam'm,

I m= anually created those extra tablespaces and still get error above.  Se= ems to me one tablespace for each directory?  I can't have multiple ta= blespaces under /opt/postgres11/data/cidr right?  currently the cidr d= atbase default tablespace is cidr_data.  How can I create database wit= h default_tablespaces with cidr_dba, cidr_lg, cidr_dg, etc...?  can a = database has multi-tablespaces?

thank you,
 
Bach-Nga

No one in this world is pure and perfect.  If you avoid people for th= eir mistakes you will be alone. So judge less, love and forgive more.
T= o call him a dog hardly seems to do him justice though in as much as he had= four legs, a tail, and barked, I admit he was, to all outward appearances.= But to those who knew him well, he was a perfect gentleman (Hermione Gingo= ld)

**Li= ve simply **Love generously **Care deeply **Speak kindly.
*** Genuinely rich *** Faithful talent= *** Sharing success


On Tuesday= , January 29, 2019 9:37 AM, Shreeyansh Dba <shreeyansh2014@gmail.com>= wrote:


=
Hi Pepe,

Yes, you can create the tablespaces manually just by changing your tabl= espace name along with the location.

A= lso, you can use the existing tablespace at the time of importing into the = Postgres.

Thanks & Regards,
Shreeyansh DBA Team<= br clear=3D"none">www.shreeyansh.com
=


On Tue, Jan 29, 2019 at 7:37 PM Pepe TD Vo <pepevo@yahoo.com> wrote:

I am using Ora2pg to export cidr in oracle to postgres.  = When the export Tablespace.sql is done, I import into the Postgres, Cidr.&n= bsp; I get ERROR below

=
$psql -U posgres -d CIDR < TABLESPACE_cidrdba.= sql
SETCREATE TABLESPACE=
ERROR: directory"/opt/postgres11/data/cidr/PG_11_201809051" already i= n use as a tablespace.

even trying to create tablespace m= anually still said it's already in use, but PG_11_20109051 is belong to cid= r_data tablespace, how can I create new tablespaces for cidr postgres db?


$psql -U posgres -d CIDR 
$psql> create tablespace cidr_lg location 'opt/p= ostgres11/data/cidr';
SET
CREATE= TABLESPACE
ER= ROR: directory"/opt/postgres11/data/cidr/PG_11_201809051" already in use as= a tablespace.

$psql> create tablespace cidr_dg locati= on 'opt/postgres11/data/cidr';SET
CREATE TABLESPACE
= ERROR: directory"/opt/postgres11/data/cidr/PG_11_201809= 051" already in use as a tablespace.

h= ow can I create new tablespaces for cidr postgres db?
v/r,

Bach-Nga

= No one in this world is pure and perfect.  If you avoid people for the= ir mistakes you will be alone. So judge less, love and forgive more.
=
To call him a dog hardly seems to d= o him justice though in as much as he had four legs, a tail, and barked, I = admit he was, to all outward appearances. But to those who knew him well, h= e was a perfect gentleman (Hermione Gingold)

**Live simpl= y **Love generously **Care deeply **Speak kindly.
*** Genuinely rich *** Faithfu= l talent *** Sharing success


<= /div>


=
------=_Part_3059115_1704591428.1548775929311--