Search Postgresql Archives

Re: (Never?) Kill Postmaster?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tom Lane wrote:
control has already returned from the kernel.  What I think is that the
perl stuff your session has done has included some action that changed
the condition of the backend process ... exactly what, I have no idea.
Can you show us the plperl functions that were used in these sessions?
Considering the skill level of the users I don't think that they explicitly used any perl function. So the only remaining perl stuff are the triggers that I mentioned earlier. There are two triggers in the database to which the users were connected (see http://archives.postgresql.org/pgsql-general/2007-11/msg00245.php). There are three more triggers in other databases which might have an impact:

=============================
       if ($_TD->{argc} != 1) {
elog(ERROR, 'do_fast_export_log() needs the table\'s primary key as sole argument, multiple keys are not yet supported.');
       }

       my $table = $_TD->{table_name};
       my $id = $_TD->{old}{$_TD->{args}[0]};

       while (my ($col, $value) = each %{$_TD->{old}}) {
               my $oldVal = $_TD->{old}{$col};
               my $newVal = $_TD->{new}{$col};

               $oldVal =~ s/'/''/g;
               $oldVal =~ s/\t/\\\\t/g;
               $newVal =~ s/'/''/g;
               $newVal =~ s/\t/\\\\t/g;

               if ($oldVal ne $newVal) {
                       my $data = "$id\t$table\t$col\t$oldVal\t$newVal";
my $query = spi_exec_query("insert into fast_export(data) values(E'$data')");
               }
       }

       spi_exec_query("notify fast_export");
       return;
=============================
   elog(ERROR, 'store_session_user needs the field name as argument.')
       if $_TD->{argc} < 1;

   my ($field) = @{$_TD->{args}};

   elog(ERROR, "Field '$field' does not exist in target table.\n")
       unless exists $_TD->{new}{$field};

   my $query = spi_exec_query('SELECT session_user', 1);
   $_TD->{new}{$field} = $query->{rows}[0]{session_user};
   return 'MODIFY';
=============================
   if ($_TD->{argc} > 0) {
       foreach (@{$_TD->{args}}) {
           $_TD->{new}{$_} = $_TD->{old}{$_}
               if exists $_TD->{old}{$_};
       }
       return 'MODIFY';
   }
   else {
       return;
   }
=============================

Regards,
   Christian

--
Deriva GmbH                         Tel.: +49 551 489500-42
Financial IT and Consulting         Fax:  +49 551 489500-91
Hans-Böckler-Straße 2                  http://www.deriva.de
D-37079 Göttingen

Deriva CA Certificate: http://www.deriva.de/deriva-ca.cer


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
      choose an index scan if your joining column's datatypes do not
      match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux