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

Re: fix schema ownership for database owner on first

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: fix schema ownership for database owner on first
Date: 2004-06-08 15:38:16
Message-ID: Pine.LNX.4.60.0406081728280.27846@sablons.cri.ensmp.fr (view raw or flat)
Thread:
Lists: pgsql-patches
Dear Tom,

>> (2) This boolean is tested in postinit.c:ReverifyMyDatabase,
>>      and InitializeDatabase is called if necessary.
>
> And what happens if multiple backends try to connect at the same time?

I took care of that one!

There is a lock on the update of pg_database when switching off datisinit. 
The backend which gets the lock is to update the schema ownership, and 
others will wait for the lock to be released, and skip the stuff.

I don't think I forgot something, but I may be wrong.

Also, as I noted I used SPI internally to do that simply with sql. I don't 
know if this is an issue.


>> (4) Some validation is added.
>
> I do not think it's a good idea for the regression tests to do anything 
> to any databases other than regression. Especially not databases with 
> names that might match people's real databases.

Oh, you mean calvin and hobbes might use postgresql? ;-)

Ok, so I guess I can use regressionuser[123], regression[123] as names in 
the validation. Writing tests cases is not fun, so I tried to put some fun 
by using these characters.

-- 
Fabien Coelho - coelho(at)cri(dot)ensmp(dot)fr

In response to

Responses

pgsql-patches by date

Next:From: Tom LaneDate: 2004-06-08 15:48:55
Subject: Re: fix schema ownership for database owner on first connection
Previous:From: Tom LaneDate: 2004-06-08 15:13:43
Subject: Re: cost_nonsequential_access()

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