On Tue, Nov 08, 2005 at 17:18:32 +0000,
Paul Hide <paul.hide@gmail.com> wrote:
> Many thanks for your reply.
>
> The web server runs as what/whoever it does by default. I haven't changed
> it.
>
> I understand what you are getting at, because Richard Huxton pointed out to
> me that the script is probably running as the web server user.
>
> The script runs as 'apache' (let us say), the connect in the python program
> is by 'jim'. Then what does sameuser mean in the hba file.
That is a special mapping that says that ident should return the same string
as is used for the postgres username. Based on your description above, they
aren't going to match.
However, you can create custom ident maps that allow either apache or jim to
connect as postgres user jim.