pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
create tablespace - cannot run inside a transaction block
2+ messages / 2 participants
[nested] [flat]

* create tablespace - cannot run inside a transaction block
@ 2019-09-25 14:50  Pepe TD Vo <pepevo@yahoo.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Pepe TD Vo @ 2019-09-25 14:50 UTC (permalink / raw)
  To: pgsql-admin; Pgsql-admin <pgsql-admin@lists.postgresql.org>

Good morning Experts,
I'm so sorry for asking a stupid question in postgres again.  I am working on AWS server/Postgresql.  When I execute a query for creaing the database and/or from the pgAdmin wizzard, I get an error, " CREATE database cannot run inside a transaction block"Finally, I created a database and when I try to create tablespace, I get the same error that cannot run inside a transaction block.   I used to create tablespaces fine before migrate to Postgres 11.x,  


CREATE TABLESPACE pkihtts_data  OWNER "PSmasteruser"  LOCATION '/rdsdbdata/db/base/tablespace/pkihtts_data';
or CREATE TABLESPACE pkihtts_data  OWNER "PSmasteruser"  LOCATION '/rdsdbdata/db/base/tablespace/';
orCREATE TABLESPACE pkihtts_data  OWNER "PSmasteruser"  LOCATION '/rdsdbdata/';


none of them work.  Normally, in Oracle we need to create database, tablespace then username/schema and tables, objects, etc...
is the procedure as same as in Postgres?  I see the login and schema are totally different in Postgres.
any input would appreciated.
thank you,



Bach-Nga

No one in this world is pure and perfect.  If you avoid people for their 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 to 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

Attachments:

1569422040015blob.jpg (image/png, 14.9K) download view image
1569422852131blob.jpg (image/png, 27.5K) download view image
^ permalink raw reply [nested|flat] 2+ messages in thread

* Re: create tablespace - cannot run inside a transaction block
@ 2019-09-25 19:16  Laurenz Albe <laurenz.albe@cybertec.at>
  parent: Pepe TD Vo <pepevo@yahoo.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Laurenz Albe @ 2019-09-25 19:16 UTC (permalink / raw)
  To: Pepe TD Vo <pepevo@yahoo.com>; pgsql-admin; Pgsql-admin <pgsql-admin@lists.postgresql.org>

On Wed, 2019-09-25 at 14:50 +0000, Pepe TD Vo wrote:
> Normally, in Oracle we need to create database, tablespace then
> username/schema and tables, objects, etc...
> 
> is the procedure as same as in Postgres?  I see the login and schema
> are totally different in Postgres.

No, normally you don't create tablespaces in PostgreSQL.
They are a few use cases for them, but not many.

There is nothing wrong with creating a schema with the same name
as the user in PostgreSQL, as long as you make sure that the
user owns the schema.

Then you have emulated Oracle's behaviour somewhat.

Yours,
Laurenz Albe
-- 
+43-670-6056265
Cybertec Schönig & Schönig GmbH
Gröhrmühlgasse 26, A-2700 Wiener Neustadt
Web: https://www.cybertec-postgresql.com






^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2019-09-25 19:16 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-09-25 14:50 create tablespace - cannot run inside a transaction block Pepe TD Vo <pepevo@yahoo.com>
2019-09-25 19:16 ` Laurenz Albe <laurenz.albe@cybertec.at>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox