From: | Josh Kupershmidt <schmiddy(at)gmail(dot)com> |
---|---|
To: | Iñigo Martinez Lasala <imartinez(at)vectorsf(dot)com> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Disabling triggers with psql (gforge 7.4 to 8.2 migration) |
Date: | 2010-02-10 16:10:22 |
Message-ID: | 4ec1cf761002100810w520663d5m9f76e4e357967e70@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
[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(at)gmail(dot)com>wrote:
> On Wed, Feb 10, 2010 at 10:30 AM, Iñigo Martinez Lasala <
> imartinez(at)vectorsf(dot)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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2010-02-10 16:21:04 | Re: Disabling triggers with psql (gforge 7.4 to 8.2 migration) |
Previous Message | Josh Kupershmidt | 2010-02-10 16:08:53 | Re: Disabling triggers with psql (gforge 7.4 to 8.2 migration) |