Skip site navigation (1) Skip section navigation (2)

pg_dump vs data-only dumps vs --disable-triggers

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>
Subject: pg_dump vs data-only dumps vs --disable-triggers
Date: 2008-07-24 23:11:54
Message-ID: 12664.1216941114@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
There's some fairly squirrely logic in pg_dump/pg_restore that tries to
detect whether it's doing a data-only operation, ie, no schema
information is to be dumped or restored.  The reason it wants to
know this is to decide whether to enable the --disable-triggers
code.  However, since --disable-triggers is off by default and has
to be manually requested, I'm not sure why we've got all this extra
complexity in there.  (Actually, I'm sure the reason is that that
code predates the existence of the --disable-triggers switch, but
anyway...)

Simon's patch to split up --schema-only into two switches has broken
this logic, but I'm inclined to just rip it out rather than trying
to fix it.  If the user says --disable-triggers, he should get
trigger disable commands around the data part of the dump, no matter
what he said or didn't say about schema dumping.

Objections?

			regards, tom lane

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2008-07-24 23:19:27
Subject: Re: Do we really want to migrate plproxy and citext into PG core distribution?
Previous:From: Robert HaasDate: 2008-07-24 21:56:28
Subject: Re: Do we really want to migrate plproxy and citext into PG core distribution?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group