From: | Markus Wanner <markus(at)bluegap(dot)ch> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | pgsql-hackers(at)postgresql(dot)org, Robert Haas <robertmhaas(at)gmail(dot)com> |
Subject: | Re: changing MyDatabaseId |
Date: | 2010-11-17 10:58:33 |
Message-ID: | 4CE3B559.8030708@bluegap.ch |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Andreas,
On 11/17/2010 11:38 AM, Andres Freund wrote:
> Well, one could optimize most of the resetting away if the the old
> MyDatabaseId and the new one are the same - an optimization which is hardly
> possible with forking new backends.
Uh? Why not simply re-use the same backend, then? Or do you think of
re-connecting to the same database as a way to reset your connection?
> Also I think it could lower the impact due locking the procarray an related
> areas.
That may be, yes. But as pointed out by Tom and Alvaro, you'd have to
adhere to a compatible sequence of changes to shared memory to avoid
race conditions. That possibly requires using a very similar locking
sequence as the combination of a detaching and a newly starting backend
would use.
Regards
Markus Wanner
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2010-11-17 11:09:16 | Re: changing MyDatabaseId |
Previous Message | Markus Wanner | 2010-11-17 10:50:37 | Re: multi-platform, multi-locale regression tests |