Re: Partitioning feature ...

From: Nikhil Sontakke <nikhil(dot)sontakke(at)enterprisedb(dot)com>
To: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
Cc: Kedar Potdar <kedar(dot)potdar(at)gmail(dot)com>, Emmanuel Cecchet <manu(at)asterdata(dot)com>, pgsql-hackers(at)postgresql(dot)org, Amit Gupta <amit(dot)pc(dot)gupta(at)gmail(dot)com>
Subject: Re: Partitioning feature ...
Date: 2009-03-31 14:03:44
Message-ID: a301bfd90903310703o34e65653j27d9776605a381b9@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

>
> >> As triggers are executed in order of their names, we've prefixed the
> >> trigger names with "zz". This should work fine as long as no-one uses
> >> trigger-name which starts with "zz".
> >>
>
> this seems a lot fragile... why system generated triggers has to be
> executed following the same rules (talking about order of execution)
> as user triggers? can't we simply execute them first or last or maybe
> be clever and mark one to be executed first and others last?
>

AFAICS, we do not have any category like system triggers. So yeah, it would
have been nice to generate triggers with names (starting with __ for
example) for such special triggers. But I don't think we disallow
user-triggers starting with underscores etc.

So some of the options could be:

- to add a new column in pg_trigger to indicate special or system triggers
which can be executed last (sorted order if multiple entries)

or

- invent a prefix "__partition__" or something and disallow user triggers to
use such a prefix for their names, plus introduce logic to execute them
(again sorted order if multiple entries) last.

Regards,
Nikhils
--
http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2009-03-31 14:26:20 Re: [GENERAL] pgstattuple triggered checkpoint failure and database outage?
Previous Message Tom Lane 2009-03-31 13:57:46 Re: [GENERAL] pgstattuple triggered checkpoint failure and database outage?