Raj Gupta <gupta(at)zeesource(dot)net> writes:
> Postgresql 7.4 runs fine, and creates the index, so I would be
> surprised if this is a hardware error?
"Operation not permitted" during a write() is not very sensible;
the kernel should have complained when the file was open()'d if there
were permission issues. So I'd say there is something pretty broken
about either your kernel or the filesystem the database is on.
regards, tom lane