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?

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.

michael
--
Michael Meskes | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire!
Tel.: (+49) 2431/72651 | Use Debian GNU/Linux!
Email: Michael@Fam-Meskes.De | Use PostgreSQL!

Search Discussions

  • Sevo Stille at Feb 4, 2000 at 11:56 am

    Michael Meskes wrote:

    No, one backend won't do since one software want US style dates and the
    other wants German style dates.
    SET DateStyle can select date styles per session. There is no need to do
    that at backend level.

    Sevo
  • Michael Meskes at Feb 4, 2000 at 7:15 pm

    On Fri, Feb 04, 2000 at 01:01:23PM +0100, Sevo Stille wrote:
    SET DateStyle can select date styles per session. There is no need to do
    that at backend level.
    Oops. I should have thought before asking. Sorry.

    Michael
    --
    Michael Meskes | Go SF 49ers!
    Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire!
    Tel.: (+49) 2431/72651 | Use Debian GNU/Linux!
    Email: Michael@Fam-Meskes.De | Use PostgreSQL!
  • Tom Lane at Feb 4, 2000 at 3:17 pm

    Michael Meskes 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
  • Michael Meskes at Feb 4, 2000 at 8:01 pm

    On Fri, Feb 04, 2000 at 10:17:53AM -0500, Tom Lane wrote:
    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.*.
    I don't think there is one in 6.5.* since I was able to start two.
    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
    Yes, that would be a much better way. If now my perl wasn't so rusty since I
    have to set that variable in a CGI script.

    Michael
    --
    Michael Meskes | Go SF 49ers!
    Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire!
    Tel.: (+49) 2431/72651 | Use Debian GNU/Linux!
    Email: Michael@Fam-Meskes.De | Use PostgreSQL!
  • Thomas Lockhart at Feb 5, 2000 at 1:43 am

    If now my perl wasn't so rusty since I
    have to set that variable in a CGI script.
    $ENV{"PGDATESTYLE"} = "German";

    might do it, but I'm not recalling with certainty that Perl does the
    Right Thing in to make the variable visible to children (pretty sure
    it does).

    - Thomas

    --
    Thomas Lockhart lockhart@alumni.caltech.edu
    South Pasadena, California
  • Michael Meskes at Feb 6, 2000 at 10:37 am

    On Sat, Feb 05, 2000 at 01:51:50AM +0000, Thomas Lockhart wrote:
    $ENV{"PGDATESTYLE"} = "German";

    might do it, but I'm not recalling with certainty that Perl does the
    Right Thing in to make the variable visible to children (pretty sure
    it does).
    Yes, that's exactly what I tried and it works.

    Michael
    --
    Michael Meskes | Go SF 49ers!
    Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire!
    Tel.: (+49) 2431/72651 | Use Debian GNU/Linux!
    Email: Michael@Fam-Meskes.De | Use PostgreSQL!

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-hackers @
categoriespostgresql
postedFeb 4, '00 at 11:29a
activeFeb 6, '00 at 10:37a
posts7
users4
websitepostgresql.org...
irc#postgresql

People

Translate

site design / logo © 2021 Grokbase