Re: [HACKERS] Two backends at the same time
| От | Tom Lane |
|---|---|
| Тема | Re: [HACKERS] Two backends at the same time |
| Дата | |
| Msg-id | 3606.949677473@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Two backends at the same time (Michael Meskes <meskes@postgresql.org>) |
| Ответы |
Re: [HACKERS] Two backends at the same time
|
| Список | pgsql-hackers |
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
В списке pgsql-hackers по дате отправления: