Home > Archive > PostgreSQL Discussion > May 2005 > Query for importing and exporting data from a database









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Query for importing and exporting data from a database
Yateen Joshi

2005-05-26, 11:23 am

Hi,

I am using postgres 7.4.2 on Solaris. My unix system does not place a
limitation of 2 GB on file size. If I export a data from my database
that causes the file size to be more than 2 GB, then that export fails
(and vice versa for importing, i.e. if the file size is more than 3 GB,
it can not import). Two questions -
Why does this happen?
Is there any way to avoid this?

Basically, I want to export huge chunk of data to files and then import
the same, please help me.

Thanks and regards,

Yateen V. Joshi


Douglas McNaught

2005-05-26, 11:23 am

"Yateen Joshi" < yjoshi@starentnetwor
ks.com> writes:

> Link: File-List
>
> Hi,
>
>
>
> I am using postgres 7.4.2 on Solaris. My unix system does not place a
> limitation of 2 GB on file size. If I export a data from my database that
> causes the file size to be more than 2 GB, then that export fails (and
> vice versa for importing, i.e. if the file size is more than 3 GB, it can
> not import). Two questions -
>
> Why does this happen?
>
> Is there any way to avoid this?


Probably, your Postgres was not compiled with the LARGEFILE option (I
forget exactly what it's called).

You may be able to work around it by doing something like:

pg_dump -t mytable mydb | cat > output.sql

-Doug

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql
.org

Yateen Joshi

2005-05-27, 9:23 am

Thanks for that!
Is there any way I can check if my Postgres was compiled using that
option or not?

Yateen V. Joshi


-----Original Message-----
From: Douglas McNaught & #91;mailto:doug@mcna
ught.org]
Sent: Thursday, May 26, 2005 8:49 PM
To: Yateen Joshi
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Query for importing and exporting data from a
database

"Yateen Joshi" < yjoshi@starentnetwor
ks.com> writes:

> Link: File-List
>
> Hi,
>
>
>
> I am using postgres 7.4.2 on Solaris. My unix system does not place a
> limitation of 2 GB on file size. If I export a data from my database

that
> causes the file size to be more than 2 GB, then that export fails (and
> vice versa for importing, i.e. if the file size is more than 3 GB, it

can
> not import). Two questions -
>
> Why does this happen?
>
> Is there any way to avoid this?


Probably, your Postgres was not compiled with the LARGEFILE option (I
forget exactly what it's called).

You may be able to work around it by doing something like:

pg_dump -t mytable mydb | cat > output.sql

-Doug

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

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com