Re: [HACKERS] destroydb doesn't close connection with client (httpd <-> pg)

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Edmund Mergl <E(dot)Mergl(at)bawue(dot)de>
Cc: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] destroydb doesn't close connection with client (httpd <-> pg)
Date: 1999-06-12 20:04:43
Message-ID: Pine.GSO.3.96.SK.990612235803.29126A-100000@ra
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I also think this is the bug in postgres. I didn't check if this
behaivour is the same with 6.4.2 though. It could be nice if
backend could communicate with 'persistent' client to tell him
that database is destroyed and client probably could decide
if he wants to try to reestablish connection. So in case database
restored nothing dangerous would happens to client (pprobably
just informational message in that case ).

Regards,
Oleg

On Sat, 12 Jun 1999, Edmund Mergl wrote:

> Date: Sat, 12 Jun 1999 21:46:45 +0200
> From: Edmund Mergl <E(dot)Mergl(at)bawue(dot)de>
> To: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
> Cc: hackers(at)postgreSQL(dot)org
> Subject: Re: [HACKERS] destroydb doesn't close connection with client (httpd <-> pg)
>
> Oleg Bartunov wrote:
> >
> > I have Web site where I use persistent connection between
> > httpd (Apache) and database (postgres,6.5). I noticed strange
> > results I got after reloading page with results from query
> > when I destroydb , createdb, fill db ( with the same data ).
> > It seems backend doesn't close connection when db is destroyed
> > and this produces unpredictable results. My application is
> > written in Perl and uses DBI/DBD for persistent connection.
> > I don't know is it DBI/DBD problem or backend must close
> > all connections to DB when it destroyed.
> >
> > Regards,
> > Oleg
> > _____________________________________________________________
> > Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
> > Sternberg Astronomical Institute, Moscow University (Russia)
> > Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
> > phone: +007(095)939-16-83, +007(095)939-23-83
>
>
>
> This is not DBI/DBD-Pg specific.
>
> A short test with psql shows, that this seems to be
> a bug of postgresql itself.
>
> Create and fill a database. Connect to this database with psql
> and perform some query. Without disconnecting destroy and re-create
> the database but insert this time different data. Performing
> the same query a second time will retrieve the same data as before
>
>
> Edmund
>
>
>
> --
> Edmund Mergl mailto:E(dot)Mergl(at)bawue(dot)de
> Im Haldenhau 9 http://www.bawue.de/~mergl
> 70565 Stuttgart fon: +49 711 747503
> Germany
>

_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Oleg Bartunov 1999-06-12 20:41:32 Re: [HACKERS] destroydb doesn't close connection with client (httpd <-> pg)
Previous Message Tom Lane 1999-06-12 20:04:30 Re: [HACKERS] destroydb doesn't close connection with client (httpd <-> pg)