pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jan Wieck <janwieck@Yahoo.com>
To: Stephan Szabo <sszabo@megazone23.bigpanda.com>
Cc: Joerg Hessdoerfer <Joerg.Hessdoerfer@sea-gmbh.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Continuous inserts...
Date: Tue, 22 Aug 2000 13:31:31 -0500 (EST)
Message-ID: <200008221831.NAA01610@jupiter.greatbridge.com> (raw)
In-Reply-To: <Pine.BSF.4.10.10008220857460.21152-100000@megazone23.bigpanda.com>

Stephan Szabo wrote:
> Wierd, I've not seen that behavior really, although I've never
> done time sensitive stuff.  It might be the time before the
> shared cache updates?  Not sure really.  If you do the rule
> inline with your inserts (rather than a second transaction)
> does it still wait?

    Just jumping in not having followed the discussion. But...

    The rules applied to a table by the rewriter are taken out of
    the relation descriptor that is returned  by  heap_open()  or
    heap_openr().

    I haven't looked at the code, but pg_class only has a boolean
    telling if a class has rules or not. Could it be that  adding
    more  rules  (or  dropping just a few instead of all) doesn't
    update the pg_class tuple, thus the syscache  for  the  table
    isn't  invalidated and other backends continue to use the old
    information instead of rescanning pg_rewrite?


Jan

>
> Stephan Szabo
> sszabo@bigpanda.com
>
> On Tue, 22 Aug 2000, Joerg Hessdoerfer wrote:
>
> > Hi!
> >
> > At 08:18 18.08.00 -0700, you wrote:
> > [...]
> >
> > >I didn't try with vacuum, I just did a table lock and that
> > >seemed to still hang the inserts with two tables, so I figured
> > >maximum safety was adding the third table.  If it works with two
> > >that's much cooler.  Was this with real data or just a small test
> > >set?
> >
> > It was a test set ... ~20000 records, *BUT* I found that postgres
> > decides when it starts to use the rule - means, if you do continous
> > inserts on the table and create the rule, there's a varying time until
> > the rule applies. In my first tests, I re-connected the DB very often,
> > and the the change seemed immediate.
> >
> > Any ideas on how to 'promote' the rules faster?!?
> >
>


--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #





view thread (15+ messages)  latest in thread

Message-ID: <200008221831.NAA01610@jupiter.greatbridge.com>
Permalink:  ../200008221831.NAA01610@jupiter.greatbridge.com/
Also on:    postgresql.org/message-id/200008221831.NAA01610@jupiter.greatbridge.com

 · 

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: janwieck@Yahoo.com, sszabo@megazone23.bigpanda.com, Joerg.Hessdoerfer@sea-gmbh.com
  Subject: Re: Continuous inserts...
  In-Reply-To: <200008221831.NAA01610@jupiter.greatbridge.com>
  References: <Pine.BSF.4.10.10008220857460.21152-100000@megazone23.bigpanda.com> <200008221831.NAA01610@jupiter.greatbridge.com>

* 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