Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2011
    Posts
    33

    Unanswered: Index in its own tablespace-PostgreSQL9.2 AS

    I have two tablespaces tb1 and tb2. tb1 and tb2 have their own file systems.tb1 is for a huge table with 2 billion rows .tb2 is for rest of the tables.So , I have my huge table created in tb1 and now when I am trying to create an index on this table the index is being created in tb2 even though I explicitly mentioned to create the index in tb1 in CREATE INDEX statement.Eventually , the index creation is failing due to less disk space in tb2.
    I also do not see any kind of information in pg_log.

    OS: Redhat Linux
    PostgreSQLVersion : 9.2 AS

    Please help!!

  2. #2
    Join Date
    Aug 2011
    Posts
    33
    Any Idea why the index is being created in a different tablespace other than the one explicitly mentioned?

  3. #3
    Join Date
    Mar 2012
    Posts
    6
    if table contains large data set as u are mentioning billions of rows then creating index on such a large table sometimes cost space more than consumed by that table.

    if it didnt find enough space it would have chosen the default tablespace .

  4. #4
    Join Date
    Aug 2011
    Posts
    33
    We have the target tb1 with 1TB free space( this is where I am trying to create the indexes) and the default tablespace tb2 with 100GB. So I don't believe its not finding enough space in the tb1.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •