From: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
---|---|
To: | PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | fix schema ownership on first connection preliminary patch |
Date: | 2004-05-08 09:46:11 |
Message-ID: | Pine.GSO.4.58.0405081142410.20991@chailly99 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Dear hackers,
Please find attached a preliminary patch to fix schema ownership on first
connection. It is for comments and advices as I still have doubts about
various how-and-where issues, thus it is not submitted to the patch list.
(1) It adds a new "datisinit" attribute to pg_database, which tells
whether the database initialization was performed or not.
The documentation is updated accordingly.
(2) This boolean is tested in postinit.c:ReverifyMyDatabase,
and InitializeDatabase is called if necessary.
(3) The routine updates pg_database datisinit, as well as pg_namespace
ownership and acl stuff. The acl item update part is not yet
appropriate: I'd like some answers before going on.
(4) Some validation is added. It passes for me.
My questions:
- is the place for the first connection housekeeping updates appropriate?
it seems so from ReverifyMyDatabase comments, but these are only comments.
- it is quite convenient to use SPI_* stuff for this very rare updates,
but I'm not that confident about the issue... On the other hand, the
all-C solution would result in a much longer and less obvious code.
- it is unclear to me whether it should be allowed to skip this under
some condition, when the database is accessed in "debug" mode from
a standalone postgres for instance?
- also I'm wondering how to react (what to do and how to do it) on
errors within or under these initialization. For instance, how to
be sure that the CurrentUser is reset as expected?
Thanks in advance for your answers and comments.
Have a nice day.
--
Fabien Coelho - coelho(at)cri(dot)ensmp(dot)fr
Attachment | Content-Type | Size |
---|---|---|
database_owner.patch | text/plain | 13.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Fabien COELHO | 2004-05-08 10:07:31 | Re: Aclitem "high level description" |
Previous Message | Tatsuo Ishii | 2004-05-08 02:30:09 | Re: PostgreSQL pre-fork speedup |
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2004-05-08 19:02:48 | mingw configure failure detection |
Previous Message | Bruce Momjian | 2004-05-08 03:03:28 | Re: NEXT VALUE FOR... |