Re: [Pgreplication-general] DBMIRROR and INSERT transactions lose

From: Steven Singer <ssinger(at)navtechinc(dot)com>
To: Hervé Piedvache <herve(at)elma(dot)fr>
Cc: Ezra Nugroho <ezran(at)goshen(dot)edu>, Michael Loftis <mloftis(at)wgops(dot)com>, <pgsql-general(at)postgresql(dot)org>, <pgreplication-general(at)gborg(dot)postgresql(dot)org>
Subject: Re: [Pgreplication-general] DBMIRROR and INSERT transactions lose
Date: 2003-03-31 18:23:43
Message-ID: Pine.LNX.4.33.0303311816330.14836-100000@pcNavYkfAdm1.ykf.navtechinc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 31 Mar 2003, [iso-8859-15] Hervé Piedvache wrote:

> Hi Ezra,
>

> hum ... I look to my checker for yesterday ... no memory trouble I only lose
> 5% of memory I have 2Gb of RAM ... swap was at 100% free during all this time
> ... (9h of treatment)

Hmmm.

>
> Why using transaction ? ... To have a secured activity on my database ;*)
>
> > Do you really have to run those 320 000 inserts in a transaction?

DBMirror does 2 additional inserts for every insert that your program
does. So you are really talking about closer to a million inserts on the
database. But you still wouldn't expect 7 minutes vs 9 hours. The two
tables DBMirror does inserts onto (Pending andPendingData) also have
indexes on them.

You could try removing the DBMirror indexes on Pending and PendingData
Pending_XID_Index,Pending_pkey and PendingData_pkey

How does that change things?

>
> What other idea do you have ? In mean secured system please ... I remind you
> that during this time ... other actions, like users, automate etc. are using
> my database ... and once a month I have to insert those data ... so how to do
> that securly without transaction ? ...

You might want to consider turning mirroring off,(Disabling the
recordchange trigger) Do your monthly update and then do a pg_dump and
restore to your slaves. This might work depending on your circumstances.
Mirroring 320,000 records to a slave will take some time as well.

--
Steven Singer ssinger(at)navtechinc(dot)com
Dispatch Systems Phone: 519-747-1170 ext 282
Navtech Systems Support Inc. AFTN: CYYZXNSX SITA: YYZNSCR
Waterloo, Ontario ARINC: YKFNSCR

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andy Kriger 2003-03-31 19:02:44 dump a single record as sql?
Previous Message Tom Lane 2003-03-31 18:09:33 Re: Indexing timestamp columns