From: | "Bender, Cheryl" <cbender(at)mriresearch(dot)org> |
---|---|
To: | "Bender, Cheryl" <cbender(at)mriresearch(dot)org>, <mike(at)thegodshalls(dot)com>, <h_harush(at)hotmail(dot)com> |
Cc: | <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Dumping partial database content |
Date: | 2004-07-02 18:56:52 |
Message-ID: | D5DB5D0D27171247AFEC9648EE98752F032125CA@KCEX2KV1.mri-kc.int |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Never mind--answered my own question.
You can dump from a temporary table, which provides Hanan another way to
dump a subset of data.
Use CREATE TEMPORARY TABLE as select ....
Cheryl Bender
-----Original Message-----
From: pgsql-admin-owner(at)postgresql(dot)org
[mailto:pgsql-admin-owner(at)postgresql(dot)org] On Behalf Of Bender, Cheryl
Sent: Friday, July 02, 2004 11:48 AM
To: mike(at)thegodshalls(dot)com; h_harush(at)hotmail(dot)com
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] Dumping partial database content
Just wondering--is it possible to dump on a temporary table?
Cheryl Bender
-----Original Message-----
From: pgsql-admin-owner(at)postgresql(dot)org
[mailto:pgsql-admin-owner(at)postgresql(dot)org] On Behalf Of mike g
Sent: Thursday, July 01, 2004 11:11 PM
To: h_harush(at)hotmail(dot)com
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] Dumping partial database content
I don't believe there is an option in pg_dump that current handles that.
It is the whole table / object or nothing at all. Depending on the
volume of transactions and frequency that you need to dump the data will
determine which solution works best for you.
Heavy volume and/or dumps multiple times per hour: Replication would
probably be the best solution-perhaps Slony.
Occasionaly or small volume: A Perl script / cron job that executes a
SELECT * FROM x WHERE date > $passed parameter when calling the script.
One time: Use pgadminIII or psql to execute a SELECT query and direct
the results into a file.
Mike
On Wed, 2004-06-30 at 07:07, h_harush(at)hotmail(dot)com wrote:
> Hi,
>
> I need to dump only partial content of my database, for example i want
> to dump only records that has been insterted to the database from a
> specific date. I tried to use pg_dump/pg_export but did not find
> anything usefull.
>
> I'm using postgres version 7.3 on Linux RH 7.3
>
> any idea/direction ?
>
> Regards,
> Hanan
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Browne | 2004-07-02 19:15:13 | Re: Dumping partial database content |
Previous Message | Edoardo Ceccarelli | 2004-07-02 18:50:26 | finding a max value |