Jan Wieck JanWieck
Fri Sep 24 15:53:56 PDT 2004
On 9/24/2004 10:12 AM, Ed L. wrote:

> On Wednesday September 22 2004 8:42, Andrew Sullivan wrote:
>> On Wed, Sep 22, 2004 at 06:19:50PM -0600, Ed L. wrote:
>> > Hmm.  Adding 2 inserts for every update/delete/insert done by our
>> > applications would not be good for our performance.
>>
>> You misunderstand.  It's not 2 inserts.  It's one into one of the
>> tables, depending on which is active.
> 
> The latest CVS code does 2 inserts by default.
> 
> 2004-09-24 08:08:32.490 LOG:  statement: INSERT INTO bar (msg) VALUES ('Here we go');
> 2004-09-24 08:08:32.493 NOTICE:  bar INSERT Here we go
> 2004-09-24 08:08:32.494 LOG:  statement: INSERT INTO _replication.sl_log_1 (log_origin, log_xid, log_tableid, log_actionseq, log_cmdtype, log_cmddata) VALUES (1, $1, $2, nextval('_replication.sl_action_seq'), $3, $4);
> 2004-09-24 08:08:32.494 CONTEXT:  SQL query "INSERT INTO _replication.sl_log_1 (log_origin, log_xid, log_tableid, log_actionseq, log_cmdtype, log_cmddata) VALUES (1, $1, $2, nextval('_replication.sl_action_seq'), $3, $4);"
> 2004-09-24 08:08:32.495 LOG:  statement: INSERT INTO _replication.sl_log_2 (log_origin, log_xid, log_tableid, log_actionseq, log_cmdtype, log_cmddata) VALUES (1, $1, $2, nextval('_replication.sl_action_seq'), $3, $4);
> 2004-09-24 08:08:32.495 CONTEXT:  SQL query "INSERT INTO _replication.sl_log_2 (log_origin, log_xid, log_tableid, log_actionseq, log_cmdtype, log_cmddata) VALUES (1, $1, $2, nextval('_replication.sl_action_seq'), $3, $4);"

No, it does not. It only prepares the query plans for both log tables on 
the first call to the log trigger. You never see the real execution of 
saved SPI plans in the log.


Jan

> 
> Ed
> 
> _______________________________________________
> Slony1-general mailing list
> Slony1-general at gborg.postgresql.org
> http://gborg.postgresql.org/mailman/listinfo/slony1-general


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


More information about the Slony1-general mailing list