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

Re: InitPostgres and flatfiles question

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Markus Schiltknecht <markus(at)bluegap(dot)ch>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: InitPostgres and flatfiles question
Date: 2007-01-03 16:07:35
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Markus Schiltknecht <markus(at)bluegap(dot)ch> writes:
> I've just run into a race condition with creating a database and 
> connecting to it immediately afterwards. I'm getting a "database %s not 
> found" error just after the first flatfiles check in InitPostgres().

In what PG version?

> What that FindMyDatabase() there does, besides checking if the database 
> exists, is getting the database and tablespace OIDs, right? Why does the 
> postmaster not pass those instead of the database name?

Because the postmaster doesn't have direct database access.  If it did,
any corruption of shared memory would risk crashing the postmaster
along with the backends.

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Jim NasbyDate: 2007-01-03 16:10:08
Subject: Re: Tuning single row operations
Previous:From: Tom LaneDate: 2007-01-03 15:50:17
Subject: Re: Rare corruption of pg_class index

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