Re: changing MyDatabaseId

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: changing MyDatabaseId
Date: 2010-11-27 16:56:19
Message-ID: 201011271656.oARGuJb28268@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera wrote:
> Excerpts from Tom Lane's message of lun nov 15 02:41:40 -0300 2010:
>
> > I believe also that there are probably race conditions in several of
> > the steps you listed; in particular there is certainly a risk involved
> > in changing the database-we-advertise-being-connected-to versus a
> > concurrent DROP DATABASE. Maybe that's easily soluble, but I'm not sure
> > about it.
>
> Perhaps it would help to first disconnect from the original database and
> not reconnect to any one in particular, i.e. stay in a state like the
> autovac launcher is in. Then cleanup as per Robert's list, then switch
> to a valid database ID.

One question is whether we keep our caches in the hope we will continue
with the same database, or clear our caches so we don't have to incur
the overhead of clearing them when we connect a new session.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Eliot Gable 2010-11-27 17:04:55 Re: Horizontal Write Scaling
Previous Message Bruce Momjian 2010-11-27 16:10:27 Re: Re: [BUGS] BUG #5650: Postgres service showing as stopped when in fact it is running