Обсуждение: Problems running postgres on XFS+LVM on Linux

Поиск
Список
Период
Сортировка

Problems running postgres on XFS+LVM on Linux

От
David Stanaway
Дата:
Hi,

I am in the process of migrating a test system to using SGI's
linux-2.4-xfs kernel, and have moved
postgresql's /var/lib/postgres/data onto a seperate lv formated with XFS.

Now postmaster fails to start correctly and consumes 100% of one CPU.

I haven't tried getting a core from the broken postmaster yet to se what
code section is is locked in, as I thought that I would see if this is a
know problem first.


The version of postgresql I have is: 7.1.2
The version of linux is 2.4.6-pre7-xfs
The distribution of linux is progeny/newton + some debian/sid packages
built from source
(The postgresql package is the debian/sid 7.1.2-1 package)

Here is the output from df -h
/dev/main_lvm/pgdata   47M   21M   26M  44% /var/lib/postgres/data

.. from top:
   PID USER     PRI  NI  SIZE  RSS SHARE STAT  LIB %CPU %MEM   TIME
COMMAND
  3766 postgres  14   0  1240 1240   972 R       0 99.7  0.4   0:09
postmaster

..from psql
psql: connectDBStart() -- connect() failed: No such file or directory
         Is the postmaster running locally
         and accepting connections on Unix socket
'/var/run/postgresql/.s.PGSQL.5432'?

..from ls -lA /var/run/postgresql/
total 0



--
Best Regards
David Stanaway
========================.---------------------------------------------
Technology Manager  -  Australia's Premier Internet Broadcasters
david@NetVentures.com.au     Office +612 9357 1699
========================'---------------------------------------------

Re: Problems running postgres on XFS+LVM on Linux

От
David Stanaway
Дата:
On Tuesday, July 3, 2001, at 10:59  AM, David Stanaway wrote:

> Hi,
>
> I am in the process of migrating a test system to using SGI's
> linux-2.4-xfs kernel, and have moved
> postgresql's /var/lib/postgres/data onto a seperate lv formated with
> XFS.
>
> Now postmaster fails to start correctly and consumes 100% of one CPU.


Its nice to be able to answer my own questions. :)

The problem was ownership and permisions of /var/lib/postgres/data

When I created the new filesystem and mount point
The permisions of this directory were incorrect:
drwxr-xr-x    5 root     root         4096 Jul  4 04:33 data

When I set it to the correct state:
drwx------    5 postgres postgres     4096 Jul  4 04:33 data

All was fine :)

No problems experienced yet, and I hope I didn't deter anyone from
trying XFS or LVM on linux.

--
Best Regards
David Stanaway
========================.---------------------------------------------
Technology Manager  -  Australia's Premier Internet Broadcasters
david@NetVentures.com.au     Office +612 9357 1699
========================'---------------------------------------------

Re: Problems running postgres on XFS+LVM on Linux

От
Tom Lane
Дата:
David Stanaway <david@netventures.com.au> writes:
>> Now postmaster fails to start correctly and consumes 100% of one CPU.

> The problem was ownership and permisions of /var/lib/postgres/data

> When I created the new filesystem and mount point
> The permisions of this directory were incorrect:
> drwxr-xr-x    5 root     root         4096 Jul  4 04:33 data

> When I set it to the correct state:
> drwx------    5 postgres postgres     4096 Jul  4 04:33 data

> All was fine :)

Nonetheless, it shouldn't have done that --- you should get a useful
error report, not an infinite loop.  Will fix.

            regards, tom lane