View Single Post

   
  #5 (permalink)  
Old 04-19-2008, 06:28 AM
Bruce Momjian
 
Posts: n/a
Default Re: Testing pg_terminate_backend()

Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > Attached is my test script. I ran it for 14 hours (asserts on),
> > running 450 regression tests, with up to seven backends killed per
> > regression test.

>
> Hmm, there are something on the order of 10000 SQL commands in our
> regression tests, so even assuming perfect randomness you've exercised
> SIGTERM on maybe 10% of them --- and of course there's multiple places
> in a complex DDL command where SIGTERM might conceivably be a problem.
>
> Who was volunteering to run this 24x7 for awhile?


Yes, that is what it needs.

> > SLEEP=`expr $RANDOM \* $REGRESSION_DURATION / 32767`

>
> Uh, where's the randomness coming from?


In bash $RANDOM returns a random number from 0-32k every time;
#!/bin/bash is specified in the top line.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

--
Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-patches

Reply With Quote