Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 May 2005 12:04:06 -0300 (ADT)
From:      "Marc G. Fournier" <scrappy@hub.org>
To:        =?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?= <des@des.no>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: PostgreSQL in FreeBSD jails
Message-ID:  <20050503114016.U53065@ganymede.hub.org>
In-Reply-To: <86psw84zbi.fsf@xps.des.no>
References:  <426E5713.3010906@eurocom.od.ua> <747dc8f30504260812ee3c47e@mail.gmail.com> <426E5EA5.8000703@eurocom.od.ua> <426F3AFA.9020900@konvergencia.hu> <426F5A6E.4050208@eurocom.od.ua> <86acndmyky.fsf@xps.des.no> <20050502180152.I53065@ganymede.hub.org> <86psw84zbi.fsf@xps.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--0-362608285-1115132646=:53065
Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed
Content-Transfer-Encoding: QUOTED-PRINTABLE

On Tue, 3 May 2005, [iso-8859-1] Dag-Erling Sm=F8rgrav wrote:

> PostgreSQL has always had this problem, both on 4.x and 5.x.  A hack was=
=20
> put in place last November to work around it, but it still exists, and=20
> while it may now be possible (with 8.0) for multiple postmasters to run=
=20
> on the same machine

'k, I've been doing multiple since 7.2 on the same machine, all on the=20
same port, all different IPs, all on 4.x servers ... have never had an=20
issue with crashes (its pretty much my most stable 4.x server) ...

In fact:

# ps aux | grep postmaster | egrep -v "postmaster:" | sort +1 -n
scrappy 36569  0.0  0.0 14552  600  ??  IsJ  19Apr05   0:21.48 /usr/local/p=
gsql/bin/postmaster -D /usr/local/pgsql/data -S (postgres)
scrappy 36675  0.0  0.0 258184 1052  ??  SsJ  19Apr05  14:10.24 /usr/local/=
bin/postmaster -D /usr/local/pgsql/data -S (postgres)
scrappy 36865  0.0  0.0 16556  836  ??  IsJ  19Apr05   0:14.17 /usr/local/b=
in/postmaster -D /usr/local/pgsql/data -S (postgres)
pgsql   37518  0.0  0.0 16400  396  ??  IsJ  19Apr05   0:04.02 /usr/local/b=
in/postmaster (postgres)
pgsql   37815  0.0  0.0  8144  436  p9- IJ   19Apr05   0:14.62 /usr/local/b=
in/postmaster (postgres)
pgsql   37962  0.0  0.0  8680  560  ??  IsJ  19Apr05   0:08.72 /usr/local/b=
in/postmaster (postgres)
pgsql   38168  0.0  0.0 16400  452  ??  IsJ  19Apr05   0:37.69 /usr/local/b=
in/postmaster (postgres)
pgsql   38316  0.0  0.0  7144  464  ??  IsJ  19Apr05   0:04.08 /usr/local/b=
in/postmaster (postgres)
pgsql   38458  0.0  0.0  7208  380  ??  IsJ  19Apr05   0:04.01 /usr/local/b=
in/postmaster (postgres)
pgsql   38596  0.0  0.0  6952  452  ??  IsJ  19Apr05   0:03.90 /usr/local/b=
in/postmaster (postgres)
scrappy 38717  0.0  0.0  6952  436  ??  IsJ  19Apr05   0:03.98 /usr/local/b=
in/postmaster (postgres)
pgsql   38868  0.0  0.0  8224  552  ??  SsJ  19Apr05   0:03.39 /usr/local/b=
in/postmaster -D /usr/local/pgsql/data (postgres)
pgsql   38993  0.0  0.0  7912  584  ??  IsJ  19Apr05   0:06.41 /usr/local/b=
in/postmaster (postgres)
pgsql   39126  0.0  0.0  7480  400  ??  IsJ  19Apr05   0:01.80 /usr/local/b=
in/postmaster -D /usr/local/pgsql/data (postgres)
pgsql   87544  0.0  0.1  7948 3528  ??  IsJ  Sun08PM   0:00.78 /usr/local/b=
in/postmaster -D /usr/local/pgsql/data (postgres)

# ipcs -a | fgrep -f /tmp/pids | sort +10 -n
m 327683    5432003 --rw-------  scrappy     1001  scrappy     1001      7 =
10256384  36569  38717 8:40:46 11:51:28  8:37:57
m 131076    5432004 --rw-------  scrappy     1001  scrappy     1001    100 =
257957888  36675  38717 8:40:46 11:54:16  8:38:04
m 10092549    5432005 --rw-------  scrappy     1001  scrappy     1001     1=
2 10362880  36865  38717 8:40:46 11:29:20  8:38:25
m 131080    5432007 --rw-------    pgsql    pgsql    pgsql    pgsql      1 =
10436608  37518  39126 8:41:20 11:53:08  8:39:18
m 131081    5432008 --rw-------    pgsql    pgsql    pgsql    pgsql      6 =
2449408  37815  39126 8:41:20 11:52:32  8:39:43
m 393226    5432009 --rw-------    pgsql    pgsql    pgsql    pgsql      9 =
2596864  37962  39126 8:41:20 11:50:25  8:39:55
m 131083    5432010 --rw-------    pgsql    pgsql    pgsql    pgsql      1 =
10436608  38168  39126 8:41:20 11:52:15  8:40:06
m 1048588    5432011 --rw-------    pgsql    pgsql    pgsql    pgsql      1=
 1024000  38316  39126 8:41:20 11:51:53  8:40:19
m 131085    5432012 --rw-------    pgsql    pgsql    pgsql    pgsql      1 =
1024000  38458  39126 8:41:20 11:50:28  8:40:29
m 131086    5432013 --rw-------    pgsql    pgsql    pgsql    pgsql      1 =
761856  38596  39126 8:41:20 11:53:02  8:40:38
m 131087    5432014 --rw-------  scrappy     1001  scrappy     1001      1 =
761856  38717  38717 8:40:46 11:50:42  8:40:46
m 131088    5432015 --rw-------    pgsql    pgsql    pgsql    pgsql      2 =
811008  38868  39126 8:41:20  1:59:39  8:40:58
m 1507345    5432016 --rw-------    pgsql    pgsql    pgsql    pgsql      1=
 761856  38993  39126 8:41:20 11:50:37  8:41:07
m 1310738    5432017 --rw-------    pgsql    pgsql    pgsql    pgsql      2=
 811008  39126  39126 8:41:20  0:59:01  8:41:20
m 196615    5432001 --rw-------    pgsql    pgsql    pgsql    pgsql     11 =
1548288  87544  8754420:32:30 11:50:56 20:32:30


So, unless I'm missing something here, each postmaster is acquiring its=20
own ID, and the above servers consist of the following versions (all of=20
which are built from ports):

    1 postgresql-7.2.4_2
    1 postgresql-7.4.1
    1 postgresql-7.4.1_1
    1 postgresql-7.4.2
    2 postgresql-7.4.5
    4 postgresql-7.4.6
    1 postgresql-devel-8.0.0,1
    1 postgresql-server-7.4.7
    1 postgresql-server-7.4.7_3
    1 postgresql-server-8.0.0
    1 postgresql-server-8.0.1_3

So, unless I'm missing something, 4.x did allow for running multiple=20
PostgreSQL servers, on the same machine, in multiple jails, each with=20
their own distinct shared memory segment ... or am I mis-reading the=20
above?

> it is also still possible for malicious code in one jail to crash
> postmasters in other jails.

That one I can agree with, which is why all our database servers are on a=
=20
seperate machine that 'clients' don't have access to ...

----
Marc G. Fournier           Hub.Org Networking Services (http://www.hub.org)
Email: scrappy@hub.org           Yahoo!: yscrappy              ICQ: 7615664
--0-362608285-1115132646=:53065--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050503114016.U53065>