pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Carolyn Lu Wong <carolyn@kss.net.au>
To: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: Urgent trigger problem.
Date: Fri, 03 Nov 2000 22:41:30 +1100
Message-ID: <3A02A46A.B2CE715F@kss.net.au> (raw)

I'm using V6.5.

I want to write trigger to update database transaction logs. I have
followed the examples, but have now run into some problems. I'm using
plpsql to create a function for the trigger.

I don't want to end up with very large transaction log tables and not
all fields from a table will go to the log, so i want to compare old
and new values of certain fields before adding transaction records. 

I get the following error when I try to create the trigger in my
database:

pgReadData() -- backend closed the channel unexpectedly.
This probably menas the backend terminated abnormally before or while
processing the request.
We have lost the connection to the backend, so further processing is
impossible.

Tom said that it seems to be a bug and asked for backtrace. The
problem is, after numerous tries, I'm still unable to generate a core
file from this crash.

I also find that running this script on another database (a new
database created with the particular table I'm working with) didn't
have this error! But after serveral modification to the function and
running the script a number of times on this test database, it crashed
with the same error. I did a 'vacuum' on this test db and tried to run
again, the db function and trigger can be dropped and re-created a
number of times before it crashes again.

Seeing it works after 'vacuum' the test database, I tried to run
vacuum on the development db, then tried to run the script, it failed
even at its 1st attempt!

Anyone has any idea?



Message-ID: <3A02A46A.B2CE715F@kss.net.au>
Permalink:  ../3A02A46A.B2CE715F@kss.net.au/
Also on:    postgresql.org/message-id/3A02A46A.B2CE715F@kss.net.au

 · 

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-sql@postgresql.org
  Cc: carolyn@kss.net.au
  Subject: Re: Urgent trigger problem.
  In-Reply-To: <3A02A46A.B2CE715F@kss.net.au>
  References: <3A02A46A.B2CE715F@kss.net.au>

* 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