Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I am using PostgreSQL and I want to add a new data files to existing tablespace ( like in oracle )

I could not found any description on this on PostgreSQL documentation. How to do this ?

share|improve this question
2  
What is a "data file" in this context? This doesn't make a ton of sense. What are you trying to accomplish? What's the underlying problem you are attempting to solve? –  Craig Ringer Jun 11 at 9:26
    
when current tablespace is not enough ( in size ) how we can extend the size of tablespace while table is is been used by application ( may be by transactions) ? –  Viraj Jun 11 at 9:37
    
This is why it helps if you explain what you intend to do, and why. Don't just say "how do I do X from Oracle in PostgreSQL" - try to explain what X is and why you want it. –  Craig Ringer Jun 11 at 11:21

1 Answer 1

up vote 5 down vote accepted

PotgreSQL works different than Oracle. It has a much simpler concept for data storage. Data blocks, extents and segments don't exist. In the same spirit, a tablespace is not split into multiple data files. You just create the tablespace and PostgreSQL creates the necessary files to store the data.

When creating a tablespace, you can provide a location, where PostgreSQL should store the data:

CREATE TABLESPACE dbspace LOCATION '/data/dbs';

This works similar to bigfile tablespaces in Oracle, where you also don't have to manage data files.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.