pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: mcheciches@gmail.com
To: pgsql-bugs@postgresql.org
Subject: BUG #9442: Cannot pg_dump database with event trigger: cannot duplicate null pointer.
Date: Wed, 05 Mar 2014 12:05:20 +0000
Message-ID: <20140305120520.1918.871@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

The following bug has been logged on the website:

Bug reference:      9442
Logged by:          CHECICHES Marius-Cristian
Email address:      mcheciches@gmail.com
PostgreSQL version: 9.3.0
Operating system:   Oracle SunOS 5.11 Solaris 11.1
Description:        

Note: I will try and not give away internal information as much as
possible.

The server is hosted on Solaris 11(operating system field). The pg_dump
utility was run remotely on Windows Server 2008 R2 Enterprise.

Command:    pg-9.3\pg_dump.exe -h <host> -p <port> -U <user> -F d -w -v -j 4
-f "<path>" <database>
This is run daily on a few small databases.
As soon as I implemented an event trigger it failed.

The trigger script:

=== trigger.sql
=========================================================================================

DROP EVENT TRIGGER IF EXISTS upd_perm_event_trigger;

CREATE EVENT TRIGGER upd_perm_event_trigger ON ddl_command_end
WHEN TAG IN ('CREATE TABLE', 'CREATE SEQUENCE', 'CREATE SCHEMA')
EXECUTE PROCEDURE upd_perm_trigger_fun(); --Set necessary permisions for new
relations
    
=========================================================================================================
    
I am aware of the ALTER DEFAULT PRIVILEGES feature, but I had my reasons to
prefer a trigger for this.
Anyway, the point is that pg_dump failed.

pg_dump logs (lines starting with '#' are comments added by me):

=== pg_dump.log ===============================================

pg_dump: reading schemas
pg_dump: reading user-defined tables
pg_dump: reading extensions
pg_dump: reading user-defined functions
pg_dump: reading user-defined types
pg_dump: reading procedural languages
pg_dump: reading user-defined aggregate functions
pg_dump: reading user-defined operators
pg_dump: reading user-defined operator classes
pg_dump: reading user-defined operator families
pg_dump: reading user-defined text search parsers
pg_dump: reading user-defined text search templates
pg_dump: reading user-defined text search dictionaries
pg_dump: reading user-defined text search configurations
pg_dump: reading user-defined foreign-data wrappers
pg_dump: reading user-defined foreign servers
pg_dump: reading default privileges
pg_dump: reading user-defined collations
pg_dump: reading user-defined conversions
pg_dump: reading type casts
pg_dump: reading table inheritance information
pg_dump: reading event triggers
pg_dump: finding extension members
pg_dump: finding inheritance relationships
pg_dump: reading column info for interesting tables
# START repeat for tables
pg_dump: finding the columns and types of table "<table>"
pg_dump: finding default expressions of table "<table>"
# END repeat
pg_dump: flagging inherited columns in subtables
pg_dump: reading indexes
# START repeat for tables
pg_dump: reading indexes for table "<table>"
# END repeat 
pg_dump: reading constraints
pg_dump: reading triggers
pg_dump: reading rewrite rules
pg_dump: reading large objects
pg_dump: reading dependency data
pg_dump: saving encoding = UTF8
pg_dump: saving standard_conforming_strings = on
pg_dump: saving database definition
cannot duplicate null pointer (internal error)

================================================================

The logs were the same for each database. After I dropped the trigger and
re-run the
command it worked.
Note: I only dropped the trigger itself. The trigger function remained and
was dumped.

The new logs would end (normally) with:

====================================================
pg_dump: saving database definition
# START repeat for tables
pg_dump: dumping contents of table <table>
# END repeat
====================================================

I found no related information in the server-side log files.


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (2+ messages)  latest in thread

Message-ID: <20140305120520.1918.871@wrigleys.postgresql.org>
Permalink:  ../20140305120520.1918.871@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20140305120520.1918.871@wrigleys.postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: mcheciches@gmail.com
  Subject: Re: BUG #9442: Cannot pg_dump database with event trigger: cannot duplicate null pointer.
  In-Reply-To: <20140305120520.1918.871@wrigleys.postgresql.org>
  References: <20140305120520.1918.871@wrigleys.postgresql.org>

* 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