Michael Meskes <meskes@postgreSQL.org> writes:
> What happens if I run two backends on different ports at the same time on
> the same database? Is there any kind of locking done?
You mean two postmasters? Death and destruction is what will happen.
I believe there's an interlock to prevent this mistake in current
sources, but I don't recall if it was in 6.5.*.
> No, one backend won't do since one software want US style dates and the
> other wants German style dates. There should be no concurrent access but who
> knows when I will type the wrong port.
As Sevo points out, setting DATESTYLE per-session is the right way to do
this. You might find that setting environment variable PGDATESTYLE on
the client side is a comfortable way to work --- if libpq sees that
variable set, it will issue a SET DATESTYLE command for you during
connection startup. Works with any libpq-based client, so it's
pretty transparent...
regards, tom lane