Thread

  1. Partitioning triggers doc patch

    Kevin Grittner <kevin.grittner@wicourts.gov> — 2012-03-12T15:41:20Z

    Attached is a doc patch based on a suggestion by Rural Hunter to
    address something he found confusing while setting up partitioning.
     
    Original thread is here:
     
    http://archives.postgresql.org/pgsql-admin/2012-03/msg00066.php
     
    -Kevin
    
    
  2. Re: Partitioning triggers doc patch

    Jaime Casanova <jaime@2ndquadrant.com> — 2012-03-12T17:31:21Z

    On Mon, Mar 12, 2012 at 10:41 AM, Kevin Grittner
    <Kevin.Grittner@wicourts.gov> wrote:
    > Attached is a doc patch based on a suggestion by Rural Hunter to
    > address something he found confusing while setting up partitioning.
    >
    > Original thread is here:
    >
    > http://archives.postgresql.org/pgsql-admin/2012-03/msg00066.php
    >
    
    you can create trigger that execute before the trigger that redirect
    to the partition, for example to stamp the time or the user... so it
    should state something like i said about constraints
    
    """
    Do not define any check constraints on this table, unless you intend
    them to be applied equally to all partitions.
    """
    
    -- 
    Jaime Casanova         www.2ndQuadrant.com
    Professional PostgreSQL: Soporte 24x7 y capacitación
    
    
  3. Re: Partitioning triggers doc patch

    Kevin Grittner <kevin.grittner@wicourts.gov> — 2012-03-12T17:39:38Z

    Jaime Casanova <jaime@2ndquadrant.com> wrote:
    > On Mon, Mar 12, 2012 at 10:41 AM, Kevin Grittner
    > <Kevin.Grittner@wicourts.gov> wrote:
    >> Attached is a doc patch based on a suggestion by Rural Hunter to
    >> address something he found confusing while setting up
    >> partitioning.
    >>
    >> Original thread is here:
    >>
    >> http://archives.postgresql.org/pgsql-admin/2012-03/msg00066.php
    >>  
    > 
    > you can create trigger that execute before the trigger that
    > redirect to the partition, for example to stamp the time or the
    > user... so it should state something like i said about constraints
    > 
    > """
    > Do not define any check constraints on this table, unless you
    > intend them to be applied equally to all partitions.
    > """
     
    Yeah, I thought about that issue, but the problem is that the rule
    or trigger that routes the operation to another partition might
    prevent the trigger from firing at all.  I figured that if I went as
    far as what you describe, I would need to get into those timing
    issues, too; and I wasn't sure whether that might be "too much
    information" for that particular spot.  But if you think we should
    go there, I could draft something which pointed out that an AFTER
    trigger is never useful and that a BEFORE trigger to enforce things
    globally must sort ahead of the "routing" trigger, and should not be
    used at all if a RULE is used to route operations to the partitions.
     
    Do we really want to get into all that in the middle of step-by-step
    instructions for the simple case?
     
    -Kevin
    
    
  4. Re: Partitioning triggers doc patch

    Jaime Casanova <jaime@2ndquadrant.com> — 2012-03-12T18:04:28Z

    On Mon, Mar 12, 2012 at 12:39 PM, Kevin Grittner
    <Kevin.Grittner@wicourts.gov> wrote:
    >
    > Do we really want to get into all that in the middle of step-by-step
    > instructions for the simple case?
    >
    
    is there any other place we can add a more detailed explanation? so
    from your text after saying "usually there is no reason for" you can
    add a parentesis saying "more info in <link>"
    
    -- 
    Jaime Casanova         www.2ndQuadrant.com
    Professional PostgreSQL: Soporte 24x7 y capacitación
    
    
  5. Re: Partitioning triggers doc patch

    Kevin Grittner <kevin.grittner@wicourts.gov> — 2012-03-12T18:40:22Z

    Jaime Casanova <jaime@2ndquadrant.com> wrote:
     
    > is there any other place we can add a more detailed explanation?
    > so from your text after saying "usually there is no reason for"
    > you can add a parentesis saying "more info in <link>"
     
    Sure, I'll look around for a good spot.
     
    -Kevin