Gurjeet Singh singh.gurjeet at gmail.com
Mon Jul 28 16:42:19 PDT 2008
I notice that version 1.5 of the test_slony_state-dbi.pl script fixed a
problem where the diagnosis messages would not show which node the
long-running transactions were running. But the 'add_problem()' function
call of that code still has the first parameter as $origin, which I think is
a copy-paste error from previous blocks of 'while' loops. This causes the
emails sent out to be confusing as to which node the problem is being
reported for!

Here's a patch that fixes it. It also fixes another annoying this I have to
edit out every time I download this script to make it excutable; it removes
the # -*- perl -*- comment from the first line.

<patch>
*** test_slony_state-dbi.pl     2008-07-28 23:26:51.000000000 +0000
--- test_slony_state-dbi.pl.fixed       2008-07-28 23:32:12.000000000 +0000
***************
*** 1,4 ****
! #!/usr/bin/perl   # -*- perl -*-
  # $Id: test_slony_state-dbi.pl,v 1.6 2008/07/15 22:41:59 cbbrowne Exp $
  # Christopher Browne
  # Copyright 2005
--- 1,4 ----
! #!/usr/bin/perl
  # $Id: test_slony_state-dbi.pl,v 1.6 2008/07/15 22:41:59 cbbrowne Exp $
  # Christopher Browne
  # Copyright 2005
***************
*** 282,288 ****
    while (my @row =3D $res->fetchrow_array) {
      my ($db, $pid, $user, $age, $query) =3D @row;
      printf "%15s %15d %15s %12s %20s\n", $db, $pid, $user, $age, $query;
!       add_problem($origin, "Old Transactions Kept Open",
                  qq{Old Transaction still running with age $age >
$ELDERLY_TXN

  Query: $query
--- 282,288 ----
    while (my @row =3D $res->fetchrow_array) {
      my ($db, $pid, $user, $age, $query) =3D @row;
      printf "%15s %15d %15s %12s %20s\n", $db, $pid, $user, $age, $query;
!       add_problem($node, "Old Transactions Kept Open",
                  qq{Old Transaction still running with age $age >
$ELDERLY_TXN

  Query: $query
</patch>


Best regards,
-- =

gurjeet[.singh]@EnterpriseDB.com
singh.gurjeet@{ gmail | hotmail | indiatimes | yahoo }.com

EnterpriseDB http://www.enterprisedb.com

Mail sent from my BlackLaptop device
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.slony.info/pipermail/slony1-patches/attachments/20080729/=
956b6657/attachment.htm


More information about the Slony1-patches mailing list