Re: [HACKERS] Two backends at the same time

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Meskes <meskes(at)postgreSQL(dot)org>
Cc: PostgreSQL Hacker <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Two backends at the same time
Date: 2000-02-04 15:17:53
Message-ID: 3606.949677473@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Meskes <meskes(at)postgreSQL(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-02-04 15:35:31 Re: [HACKERS] PC Week Labs benchmark results
Previous Message Thomas Lockhart 2000-02-04 14:53:35 Re: [HACKERS] PC Week Labs benchmark results