Table data exclusion patch for pg_dump - Mailing list pgsql-hackers

From Vadim Trochinsky
Subject Table data exclusion patch for pg_dump
Date
Msg-id 200905010622.11667.me@vadim.ws
Whole thread Raw
Responses Re: Table data exclusion patch for pg_dump  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hello!

This is a patch that allows choosing not to dump the data for the selected 
tables.

The intended usage is to make backups smaller and faster, by allowing skipping 
unneeded data, while still generating a backup that can be restored and obtain 
a fully working application.

I use it to avoid dumping log data, and the content of tables that keep data 
that has a short lifetime (which in the event of a restore would have expired 
by then anyway)

The patch adds the -d and -D arguments: -d  --data=TABLE            dump data for the named table(s) -D
--exclude-data=TABLE   do NOT dump data for the named table(s)
 


I believe the patch to be complete, though I'm very new to the postgresql 
codebase and might have missed something. 

The patch applies to HEAD, compiles and worked properly in my tests.



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: idea: global temp tables
Next
From: Greg Stark
Date:
Subject: Re: idea: global temp tables