Re: How can I tell if pg_restore is running?

From: Martin French <Martin(dot)French(at)romaxtech(dot)com>
To: Moshe Jacobson <moshe(at)neadwerx(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>, pgsql-general-owner(at)postgresql(dot)org
Subject: Re: How can I tell if pg_restore is running?
Date: 2014-06-10 14:51:44
Message-ID: OFDF37C9B3.B944BD79-ON80257CF3.0051947F-80257CF3.0051A3F5@romaxtech.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> My extension has a config table that is dumped by pg_dump and
> populated by pg_restore.
> However, this table has triggers on it that I would like not to do
> anything if the table is being populated by pg_restore. I want the
> triggers to operate only if the user is manipulating the table
> directly after the database has been restored and is running.
>
> Is there a way for my extension's trigger functions to return
> immediately when triggered by pg_restore?
>
>

If this is a data only restore, and you are running as a superuser, you
can not simply specify pg_restore --disable-triggers ?
=============================================

Romax Technology Limited
A limited company registered in England and Wales.
Registered office:
Romax Technology Centre
University of Nottingham Innovation Park
Triumph Road
Nottingham
NG7 2TU
United Kingdom
Registration Number: 2345696
VAT Number: 526 246 746

Telephone numbers:
+44 (0)115 951 88 00 (main)

For other office locations see:
http://www.romaxtech.com/Contact
=================================
===============
E-mail: info(at)romaxtech(dot)com
Website: www.romaxtech.com
=================================

================
Confidentiality Statement
This transmission is for the addressee only and contains information that
is confidential and privileged.
Unless you are the named addressee, or authorised to receive it on behalf
of the addressee
you may not copy or use it, or disclose it to anyone else.
If you have received this transmission in error please delete from your
system and contact the sender. Thank you for your cooperation.
=================================================

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jonathan Vanasco 2014-06-10 14:52:54 Re: two questions about fulltext searchign / tsvector indexes
Previous Message Keith Fiske 2014-06-10 14:39:16 Re: How can I tell if pg_restore is running?