pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Josh Kupershmidt <schmiddy@gmail.com>
To: Iñigo Martinez Lasala <imartinez@vectorsf.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Disabling triggers with psql (gforge 7.4 to 8.2 migration)
Date: Wed, 10 Feb 2010 11:10:22 -0500
Message-ID: <4ec1cf761002100810w520663d5m9f76e4e357967e70@mail.gmail.com> (raw )
In-Reply-To: <4ec1cf761002100803r2fe7b7f2v5d4417e7ded380f7@mail.gmail.com >
References: <99024f5f1002071922j5b14c350mb1612313690f16ec@mail.gmail.com >
<87k4umg0c3.fsf@hi-media-techno.com >
<1265794218.3714.12.camel@coyote >
<971254BD-6919-41BB-8D26-160C14D5BFE2@gmail.com >
<1265815807.6369.19.camel@coyote >
<4ec1cf761002100803r2fe7b7f2v5d4417e7ded380f7@mail.gmail.com >
[Forgot to CC list, again]
Found the doc. page on pg_trigger I was looking for. You were right,
pg_trigger changed between 8.2 and 8.3:
http://www.postgresql.org/docs/8.2/static/catalog-pg-trigger.html
http://www.postgresql.org/docs/8.3/static/catalog-pg-trigger.html
Josh
On Wed, Feb 10, 2010 at 11:03 AM, Josh Kupershmidt <schmiddy@gmail.com>wrote:
> On Wed, Feb 10, 2010 at 10:30 AM, Iñigo Martinez Lasala <
> imartinez@vectorsf.com> wrote:
>
>> Hmmmm...
>>
>> What about
>> UPDATE pg_trigger SET tgenabled = false;
>>
>> Restore data, and after done:
>> UPDATE pg_trigger SET tgenabled = true;
>>
>> I'm going to test it.
>>
>>
> Perhaps this was still a boolean column in 8.2, but at least in 8.3 and
> above tgenabled is a "char" field. The only explanation I found of its
> values is here:
> http://archives.postgresql.org/pgsql-hackers/2007-01/msg01302.php
>
> Anyway, I suspect your idea will work, but if you're going to the trouble
> of disabling+reenabling triggers for performance reasons, you might still be
> better off with pg_restore, since it can handle creation of constraints and
> indexes at the appropriate time as well, which can really help.
>
> Josh
>
view thread (11+ messages) latest in thread
Message-ID: <4ec1cf761002100810w520663d5m9f76e4e357967e70@mail.gmail.com>
Permalink: ../4ec1cf761002100810w520663d5m9f76e4e357967e70@mail.gmail.com/
Also on: postgresql.org/message-id/4ec1cf761002100810w520663d5m9f76e4e357967e70@mail.gmail.com
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: schmiddy@gmail.com, imartinez@vectorsf.com
Subject: Re: Disabling triggers with psql (gforge 7.4 to 8.2 migration)
In-Reply-To: <4ec1cf761002100810w520663d5m9f76e4e357967e70@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox