Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Hackers > pg_dump restore...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 32 Topic 9487 of 10966
Post > Topic >>

pg_dump restore time and Foreign Keys

by simon@[EMAIL PROTECTED] (Simon Riggs) Jun 5, 2008 at 07:23 AM

pg_dump restore times can be high when they include many ALTER TABLE ADD
FORIEGN KEY statements, since each statement checks the data to see if
it is fully valid in all cases.

I've been asked "why we run that at all?", since if we dumped the tables
together, we already know they match.

If we had a way of pg_dump passing on the information that the test
already p*****, we would be able to skip the checks.

Proposal:

* Introduce a new mode for ALTER TABLE ADD FOREIGN KEY [WITHOUT CHECK];
When we run WITHOUT CHECK, iff both the source and target table are
newly created in this transaction, then we skip the check. If the check
is skipped we mark the constraint as being unchecked, so we can tell
later if this has been used.

* Have pg_dump write the new syntax into its dumps, when both the source
and target table are dumped in same run

I'm guessing that the WITHOUT CHECK option would not be acceptable as an
unprotected trap for our lazy and wicked users. :-)

-- 
 Simon Riggs           www.2ndQuadrant.com
 PostgreSQL Training, Services and Sup****t


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
 




 32 Posts in Topic:
pg_dump restore time and Foreign Keys
simon@[EMAIL PROTECTED]   2008-06-05 07:23:23 
Re: pg_dump restore time and Foreign Keys
heikki@[EMAIL PROTECTED]   2008-06-05 10:19:29 
Re: pg_dump restore time and Foreign Keys
simon@[EMAIL PROTECTED]   2008-06-05 08:45:38 
Re: pg_dump restore time and Foreign Keys
heikki@[EMAIL PROTECTED]   2008-06-05 15:23:14 
Re: pg_dump restore time and Foreign Keys
heikki@[EMAIL PROTECTED]   2008-06-05 16:01:26 
Re: pg_dump restore time and Foreign Keys
dev@[EMAIL PROTECTED] (R  2008-06-05 09:54:36 
Re: pg_dump restore time and Foreign Keys
andrew@[EMAIL PROTECTED]   2008-06-05 07:57:27 
Re: pg_dump restore time and Foreign Keys
simon@[EMAIL PROTECTED]   2008-06-05 13:56:35 
Re: pg_dump restore time and Foreign Keys
simon@[EMAIL PROTECTED]   2008-06-05 14:27:50 
Re: pg_dump restore time and Foreign Keys
heikki@[EMAIL PROTECTED]   2008-06-05 16:35:10 
Re: pg_dump restore time and Foreign Keys
xzilla@[EMAIL PROTECTED]   2008-06-07 13:08:00 
Re: pg_dump restore time and Foreign Keys
simon@[EMAIL PROTECTED]   2008-06-07 18:41:55 
Re: pg_dump restore time and Foreign Keys
andrew@[EMAIL PROTECTED]   2008-06-07 15:00:36 
Re: pg_dump restore time and Foreign Keys
andrew@[EMAIL PROTECTED]   2008-06-09 10:00:29 
Re: pg_dump restore time and Foreign Keys
tgl@[EMAIL PROTECTED] (T  2008-06-09 10:57:12 
Re: pg_dump restore time and Foreign Keys
tgl@[EMAIL PROTECTED] (T  2008-06-07 16:22:56 
Re: pg_dump restore time and Foreign Keys
xzilla@[EMAIL PROTECTED]   2008-06-08 19:45:33 
Re: pg_dump restore time and Foreign Keys
tgl@[EMAIL PROTECTED] (T  2008-06-08 20:12:15 
Re: pg_dump restore time and Foreign Keys
xzilla@[EMAIL PROTECTED]   2008-06-08 20:40:31 
Re: pg_dump restore time and Foreign Keys
simon@[EMAIL PROTECTED]   2008-06-09 16:12:59 
Re: pg_dump restore time and Foreign Keys
andrew@[EMAIL PROTECTED]   2008-06-09 11:23:19 
Re: pg_dump restore time and Foreign Keys
tgl@[EMAIL PROTECTED] (T  2008-06-09 11:33:19 
Re: pg_dump restore time and Foreign Keys
simon@[EMAIL PROTECTED]   2008-06-09 16:46:19 
Re: pg_dump restore time and Foreign Keys
andrew@[EMAIL PROTECTED]   2008-06-09 12:10:34 
Re: pg_dump restore time and Foreign Keys
simon@[EMAIL PROTECTED]   2008-06-09 16:48:05 
Re: pg_dump restore time and Foreign Keys
tgl@[EMAIL PROTECTED] (T  2008-06-09 11:59:27 
Re: pg_dump restore time and Foreign Keys
xzilla@[EMAIL PROTECTED]   2008-06-09 12:37:47 
Re: pg_dump restore time and Foreign Keys
simon@[EMAIL PROTECTED]   2008-06-09 18:54:57 
Re: pg_dump restore time and Foreign Keys
alvherre@[EMAIL PROTECTED  2008-06-09 14:07:28 
Re: pg_dump restore time and Foreign Keys
stark@[EMAIL PROTECTED]   2008-06-09 21:52:20 
Re: pg_dump restore time and Foreign Keys
simon@[EMAIL PROTECTED]   2008-06-10 01:14:25 
Re: pg_dump restore time and Foreign Keys
alvherre@[EMAIL PROTECTED  2008-06-09 20:37:19 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 14:05:33 CST 2008.