Help on copy function

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • frederic.germaneau@bull.net

    #1

    Help on copy function

    I'm trying to stress PostgreSQL 8beta3 on AIX5.2 with TPCH 1 Go

    I have created and configurated a database on 2 tablespaces : first one for
    indexes and second one for tables
    First script for database creation:

    $ more scrCreateDataBa se.sh
    psql template1<<!
    create tablespace dataTbl location '/postgres_data/TpchDataTableSp ace';
    create tablespace indexTbl location '/postgres_data/TpchIndexTableS pace';
    !
    createdb tpch
    psql tpch<<!
    create schema postgres tablespace dataTbl;
    !

    An example of table script:
    $ more cre_tab_part.sq l
    CREATE TABLE part(
    p_partkey bigint NOT NULL,
    p_type varchar(25) ,
    p_size integer ,
    p_brand char(10) ,
    p_name varchar(55) ,
    p_container char(10) ,
    p_mfgr char(25) ,
    p_retailprice decimal ,
    p_comment varchar(23)
    )
    ;
    ALTER TABLE part ADD CONSTRAINT pk_part PRIMARY KEY(p_partkey) USING INDEX
    TABLE
    SPACE indexTbl;
    \q

    I populate my database with a shell script which is launching in parallel
    each copy statement:
    $ more load.sh
    for i in `ls *.loader.psql`
    do
    psql -f $i tpch &
    done

    An example of copy statement file:
    $ more lineitem.loader .psql
    \copy lineitem from lineitem.tbl.ps ql delimiter '|'

    And an error occurs :
    psql:lineitem.l oader.psql:1: ERROR: could not extend relation
    24342131/24342133
    /24342324: There is not enough space in the file system.
    HINT: Check free disk space.
    CONTEXT: COPY lineitem, line 1:
    "1996-03-13|1|0.04|21168 .23|7706|17|N|1 55190|O|
    0.02|1996-02-12|1996-03-22|TRUCK|1|DELI VER IN PERSON|b..."

    but my fileSystem has something like 2Go free when copy fails!

    Has anybody an explication? Which error I have done?

    Thanks

    Frédéric GERMANEAU



    ---------------------------(end of broadcast)---------------------------
    TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddres sHere" to majordomo@postg resql.org)

  • Tom Lane

    #2
    Re: Help on copy function

    frederic.german eau@bull.net writes:[color=blue]
    > And an error occurs :
    > psql:lineitem.l oader.psql:1: ERROR: could not extend relation
    > 24342131/24342133
    > /24342324: There is not enough space in the file system.
    > HINT: Check free disk space.[/color]
    [color=blue]
    > but my fileSystem has something like 2Go free when copy fails![/color]

    Maybe you are running the postmaster under a disk-space-usage limit?
    I'm not sure that there's a separate errno for "you can't have any
    more space" as opposed to "there isn't any more space".

    regards, tom lane

    ---------------------------(end of broadcast)---------------------------
    TIP 8: explain analyze is your friend

    Comment

    • Doug McNaught

      #3
      Re: Help on copy function

      Tom Lane <tgl@sss.pgh.pa .us> writes:
      [color=blue]
      > frederic.german eau@bull.net writes:[color=green]
      >> And an error occurs :
      >> psql:lineitem.l oader.psql:1: ERROR: could not extend relation
      >> 24342131/24342133
      >> /24342324: There is not enough space in the file system.
      >> HINT: Check free disk space.[/color]
      >[color=green]
      >> but my fileSystem has something like 2Go free when copy fails![/color]
      >
      > Maybe you are running the postmaster under a disk-space-usage limit?
      > I'm not sure that there's a separate errno for "you can't have any
      > more space" as opposed to "there isn't any more space".[/color]

      It's also possible that PG is trying to create a new table file and
      he's out of inodes...

      -Doug
      --
      Let us cross over the river, and rest under the shade of the trees.
      --T. J. Jackson, 1863

      ---------------------------(end of broadcast)---------------------------
      TIP 2: you can get off all lists at once with the unregister command
      (send "unregister YourEmailAddres sHere" to majordomo@postg resql.org)

      Comment

      • Tom Lane

        #4
        Re: Help on copy function

        Doug McNaught <doug@mcnaught. org> writes:[color=blue][color=green][color=darkred]
        >>> psql:lineitem.l oader.psql:1: ERROR: could not extend relation
        >>> 24342131/24342133
        >>> /24342324: There is not enough space in the file system.
        >>> HINT: Check free disk space.[/color]
        >>
        >> Maybe you are running the postmaster under a disk-space-usage limit?
        >> I'm not sure that there's a separate errno for "you can't have any
        >> more space" as opposed to "there isn't any more space".[/color][/color]
        [color=blue]
        > It's also possible that PG is trying to create a new table file and
        > he's out of inodes...[/color]

        Good thought, although I think that this particular error message would
        only come out from a seek/write failure and not from an open failure.
        In any case it's some sort of externally imposed resource limit ...

        regards, tom lane

        ---------------------------(end of broadcast)---------------------------
        TIP 5: Have you checked our extensive FAQ?



        Comment

        • Doug McNaught

          #5
          Re: Help on copy function

          Tom Lane <tgl@sss.pgh.pa .us> writes:
          [color=blue]
          > Doug McNaught <doug@mcnaught. org> writes:[/color]
          [color=blue][color=green]
          >> It's also possible that PG is trying to create a new table file and
          >> he's out of inodes...[/color]
          >
          > Good thought, although I think that this particular error message would
          > only come out from a seek/write failure and not from an open failure.
          > In any case it's some sort of externally imposed resource limit ...[/color]

          Yeah. My first reaction to "inexplicab le ENOSPC" is always "are you
          out of inodes?" just because I've been bitten by it several times and
          felt like an idiot afterwards. ;)

          -Doug
          --
          Let us cross over the river, and rest under the shade of the trees.
          --T. J. Jackson, 1863

          ---------------------------(end of broadcast)---------------------------
          TIP 5: Have you checked our extensive FAQ?



          Comment

          Working...