Skip site navigation (1) Skip section navigation (2)

Re: Testing pg_terminate_backend()

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Testing pg_terminate_backend()
Date: 2008-04-18 21:34:03
Message-ID: 200804182134.m3ILY3b15692@momjian.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)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(at)momjian(dot)us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

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

In response to

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2008-04-18 21:35:04
Subject: Re: Testing pg_terminate_backend()
Previous:From: Alvaro HerreraDate: 2008-04-18 21:28:22
Subject: Re: Testing pg_terminate_backend()

pgsql-patches by date

Next:From: Bruce MomjianDate: 2008-04-18 21:35:04
Subject: Re: Testing pg_terminate_backend()
Previous:From: Alvaro HerreraDate: 2008-04-18 21:28:22
Subject: Re: Testing pg_terminate_backend()

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group