Search Postgresql Archives

Re: Limit on number of users in postgresql?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Willy-Bas Loos" <willybas@xxxxxxxxx> writes:
> Tom Lane wrote:
>> I think that the
>> main bottleneck would be the "flat file" that's used to tell the
>> postmaster about the set of valid users --- every time a user is
>> added/dropped/changed, that file gets rewritten and then re-parsed
>> by the postmaster.  So you could eat a lot of overhead if you change
>> users every few seconds or something like that.

> What you describe Tom (flat file), sounds a bit strange to me. Aren't users
> stored in a table? (pg_catalog.pg_authid)

Yeah, but the postmaster can't read pg_authid, nor any other table,
because it's not logically connected to the database.  So any change
to pg_authid gets copied to a "flat" ASCII-text file for the postmaster.

There are a number of reasons for this arrangement, but they really
boil down to keeping the postmaster at arm's length from the backends.
If a backend goes nuts and scribbles all over shared memory before
crashing, it may well manage to take down some other backends with it,
but we don't want any risk that it'll take down the postmaster and
thereby prevent automatic restart.  Hence the postmaster is designed
never to depend on valid contents in shared memory, and that means
it can't do much of anything in the way of database access.

This is also the reason that pg_hba.conf and friends are not tables
as you might otherwise expect.

			regards, tom lane


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux