BUG #1072: "$libdir/ascii_and_mic": No such file or directory
The following bug has been logged online:
Bug reference: 1072
Logged by: Thomas Borg Salling
Email address: tbs@navicon.dk
PostgreSQL version: 7.4
Operating system: Red Hat Linux (2.4.20-20.7)
Description: "$libdir/ascii_and_mic": No such file or directory
Details:
I have downloaded and built Postgres 7.4.1:
as user 'tbs':
./configure --prefix=/opt/postgres-7.4.1/ --with-perl --enable-thread-safety
make
make check
as user 'root':
make install
mkdir /data/postgres
chown -R postgres /opt/postgres-7.4.1
chgrp -R postgres /opt/postgres-7.4.1
chown -R postgres /data/postgres
chgrp -R postgres /data/postgres
as user 'postgres':
[postgres@hubertus postgres]$ /opt/postgres-7.4.1/bin/initdb -D
/data/postgres/
The files belonging to this database system will be owned by user
"postgres".
This user must also own the server process.
The database cluster will be initialized with locale en_US.iso885915.
fixing permissions on existing directory /data/postgres/... ok
creating directory /data/postgres//base... ok
creating directory /data/postgres//global... ok
creating directory /data/postgres//pg_xlog... ok
creating directory /data/postgres//pg_clog... ok
selecting default max_connections... 100
selecting default shared_buffers... 1000
creating configuration files... ok
creating template1 database in /data/postgres//base/1... ok
initializing pg_shadow... ok
enabling unlimited row size for system tables... ok
initializing pg_depend... ok
creating system views... ok
loading pg_description... ok
creating conversions... ERROR: could not access file
"$libdir/ascii_and_mic": No such file or directory
initdb: failed
Why does this fail? What can I do to resolve it?
Thanks in advance!
/Thomas.
"PostgreSQL Bugs List" <pgsql-bugs@postgresql.org> writes:
I have downloaded and built Postgres 7.4.1:
as user 'tbs':
./configure --prefix=/opt/postgres-7.4.1/ --with-perl --enable-thread-safety
make
make check
Did the "make check" work?
creating conversions... ERROR: could not access file
"$libdir/ascii_and_mic": No such file or directory
What's in /opt/postgres-7.4.1/lib? If you see an ascii_and_mic.so
there, what does ldd say about it?
regards, tom lane
Hi Tom,
The make check worked fine (log attached).
ascii_and_mic.so lives i /opt/postgres-7.4.1/lib, and ldd yields:
[root@hubertus lib]# ldd ascii_and_mic.so
libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
the complete contents of /opt/postgres-7.4.1/lib are:
[postgres@hubertus postgres]$ ll /opt/postgres-7.4.1/lib/
total 4984
-rwxr-xr-x 1 postgres postgres 5759 Feb 2 18:01 ascii_and_mic.so
-rwxr-xr-x 1 postgres postgres 13012 Feb 2 18:01 cyrillic_and_mic.so
-rwxr-xr-x 1 postgres postgres 6065 Feb 2 18:01 euc_cn_and_mic.so
-rwxr-xr-x 1 postgres postgres 11803 Feb 2 18:01 euc_jp_and_sjis.so
-rwxr-xr-x 1 postgres postgres 6065 Feb 2 18:01 euc_kr_and_mic.so
-rwxr-xr-x 1 postgres postgres 10632 Feb 2 18:01 euc_tw_and_big5.so
-rwxr-xr-x 1 postgres postgres 7978 Feb 2 18:01
latin2_and_win1250.so
-rwxr-xr-x 1 postgres postgres 7055 Feb 2 18:01 latin_and_mic.so
-rw-r--r-- 1 postgres postgres 65352 Feb 2 18:02 libecpg.a
-rw-r--r-- 1 postgres postgres 11470 Feb 2 18:02 libecpg_compat.a
lrwxrwxrwx 1 postgres postgres 21 Feb 2 18:02 libecpg_compat.so ->
libecpg_compat.so.1.1
lrwxrwxrwx 1 postgres postgres 21 Feb 2 18:02 libecpg_compat.so.1
-> libecpg_compat.so.1.1
-rwxr-xr-x 1 postgres postgres 18149 Feb 2 18:02
libecpg_compat.so.1.1
lrwxrwxrwx 1 postgres postgres 14 Feb 2 18:02 libecpg.so ->
libecpg.so.4.1
lrwxrwxrwx 1 postgres postgres 14 Feb 2 18:02 libecpg.so.4 ->
libecpg.so.4.1
-rwxr-xr-x 1 postgres postgres 55093 Feb 2 18:02 libecpg.so.4.1
-rw-r--r-- 1 postgres postgres 65710 Feb 2 18:02 libpgtypes.a
lrwxrwxrwx 1 postgres postgres 17 Feb 2 18:02 libpgtypes.so ->
libpgtypes.so.1.1
lrwxrwxrwx 1 postgres postgres 17 Feb 2 18:02 libpgtypes.so.1 ->
libpgtypes.so.1.1
-rwxr-xr-x 1 postgres postgres 58224 Feb 2 18:02 libpgtypes.so.1.1
-rw-r--r-- 1 postgres postgres 123638 Feb 2 18:02 libpq.a
lrwxrwxrwx 1 postgres postgres 12 Feb 2 18:02 libpq.so ->
libpq.so.3.1
lrwxrwxrwx 1 postgres postgres 12 Feb 2 18:02 libpq.so.3 ->
libpq.so.3.1
-rwxr-xr-x 1 postgres postgres 105391 Feb 2 18:02 libpq.so.3.1
-rwxr-xr-x 1 postgres postgres 1065390 Feb 2 18:02 plperl.so
-rwxr-xr-x 1 postgres postgres 107331 Feb 2 18:02 plpgsql.so
-rwxr-xr-x 1 postgres postgres 5780 Feb 2 18:01 utf8_and_ascii.so
-rwxr-xr-x 1 postgres postgres 227051 Feb 2 18:01 utf8_and_big5.so
-rwxr-xr-x 1 postgres postgres 14372 Feb 2 18:01 utf8_and_cyrillic.so
-rwxr-xr-x 1 postgres postgres 125049 Feb 2 18:01 utf8_and_euc_cn.so
-rwxr-xr-x 1 postgres postgres 218713 Feb 2 18:01 utf8_and_euc_jp.so
-rwxr-xr-x 1 postgres postgres 137497 Feb 2 18:01 utf8_and_euc_kr.so
-rwxr-xr-x 1 postgres postgres 338009 Feb 2 18:01 utf8_and_euc_tw.so
-rwxr-xr-x 1 postgres postgres 1021504 Feb 2 18:01 utf8_and_gb18030.so
-rwxr-xr-x 1 postgres postgres 354564 Feb 2 18:01 utf8_and_gbk.so
-rwxr-xr-x 1 postgres postgres 6203 Feb 2 18:01
utf8_and_iso8859_1.so
-rwxr-xr-x 1 postgres postgres 32683 Feb 2 18:01 utf8_and_iso8859.so
-rwxr-xr-x 1 postgres postgres 280466 Feb 2 18:01 utf8_and_johab.so
-rwxr-xr-x 1 postgres postgres 129195 Feb 2 18:01 utf8_and_sjis.so
-rwxr-xr-x 1 postgres postgres 9707 Feb 2 18:01 utf8_and_tcvn.so
-rwxr-xr-x 1 postgres postgres 280484 Feb 2 18:01 utf8_and_uhc.so
-rwxr-xr-x 1 postgres postgres 9756 Feb 2 18:01 utf8_and_win1250.so
-rwxr-xr-x 1 postgres postgres 9788 Feb 2 18:01 utf8_and_win1256.so
-rwxr-xr-x 1 postgres postgres 9557 Feb 2 18:01 utf8_and_win874.so
Best regards,
Thomas.
-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Monday, February 02, 2004 4:38 PM
To: tbs@navicon.dk
Cc: PostgreSQL Bugs List
Subject: Re: [BUGS] BUG #1072: "$libdir/ascii_and_mic": No such file or
directory
"PostgreSQL Bugs List" <pgsql-bugs@postgresql.org> writes:
I have downloaded and built Postgres 7.4.1:
as user 'tbs':
./configure --prefix=/opt/postgres-7.4.1/ --with-perl
--enable-thread-safety
make
make check
Did the "make check" work?
creating conversions... ERROR: could not access file
"$libdir/ascii_and_mic": No such file or directory
What's in /opt/postgres-7.4.1/lib? If you see an ascii_and_mic.so
there, what does ldd say about it?
regards, tom lane
Attachments:
"Thomas Borg Salling" <tbs@navicon.dk> writes:
ascii_and_mic.so lives i /opt/postgres-7.4.1/lib, and ldd yields:
[root@hubertus lib]# ldd ascii_and_mic.so=20
libc.so.6 =3D> /lib/i686/libc.so.6 (0x42000000)
/lib/ld-linux.so.2 =3D> /lib/ld-linux.so.2 (0x80000000)
Hmm, nothing wrong with the library file itself then. So why isn't
initdb able to load it? The only thing I can think of is some
environment difference between your postgres account and your root
account that affects dynamic linking. Better look at LD_LIBRARY_PATH
discrepancies, for instance. You might try running ldd as postgres
instead of root to see if it gives a different answer. Also you might
want to add /opt/postgres-7.4.1/lib/ to your ldconfig search path.
regards, tom lane
Hi again,
Running ldd as postgres yields the same as root:
[postgres@hubertus postgres]$ ldd /opt/postgres-7.4.1/lib/ascii_and_mic.so
libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
the problem occurs when initdb tries to run the conversion_create.sql
script:
# Create pg_conversion and support functions
$ECHO_N "creating conversions... "$ECHO_C
grep -v '^DROP CONVERSION' $datadir/conversion_create.sql |
"$PGPATH"/postgres $PGSQL_OPT template1 > /dev/null || exit_nicely
echo "ok"
for some reason - conversion_create.sql the $libdir is not defined. I tried
to print $libdir from bin/initdb, but this variable is empty. $datadir,
however, is correctly set to /opt/postgres-7.4.1//share.
The following envvars are correctly set for user 'postgres':
export PATH=/opt/postgres-7.4.1/bin:${PATH}
export LD_LIBRARY_PATH=/opt/postgres-7.4.1/lib:${LD_LIBRARY_PATH}
export MANPATH=/opt/postgres-7.4.1/man:${MANPATH}
export PGHOST=localhost
export PGPORT=5432
Hmmm.... ?!
Best regards,
Thomas.
-----Original Message-----
From: pgsql-bugs-owner@postgresql.org
[mailto:pgsql-bugs-owner@postgresql.org] On Behalf Of Tom Lane
Sent: Monday, February 02, 2004 6:19 PM
To: Thomas Borg Salling
Cc: 'PostgreSQL Bugs List'
Subject: Re: [BUGS] BUG #1072: "$libdir/ascii_and_mic": No such file or
directory
"Thomas Borg Salling" <tbs@navicon.dk> writes:
ascii_and_mic.so lives i /opt/postgres-7.4.1/lib, and ldd yields:
[root@hubertus lib]# ldd ascii_and_mic.so=20
libc.so.6 =3D> /lib/i686/libc.so.6 (0x42000000)
/lib/ld-linux.so.2 =3D> /lib/ld-linux.so.2 (0x80000000)
Hmm, nothing wrong with the library file itself then. So why isn't
initdb able to load it? The only thing I can think of is some
environment difference between your postgres account and your root
account that affects dynamic linking. Better look at LD_LIBRARY_PATH
discrepancies, for instance. You might try running ldd as postgres
instead of root to see if it gives a different answer. Also you might
want to add /opt/postgres-7.4.1/lib/ to your ldconfig search path.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
"Thomas Borg Salling" <tbs@navicon.dk> writes:
for some reason - conversion_create.sql the $libdir is not defined. I tried
to print $libdir from bin/initdb, but this variable is empty.
$libdir is not an environment variable, it's a notation specially
recognized by CREATE FUNCTION. It should expand to the same directory
printed by "pg_config --pkglibdir". You might check what that prints.
The only other idea that comes to mind is that you changed your mind
about the install prefix during the installation and didn't do a full
rebuild. The PKGLIBDIR setting is hardwired into dfmgr.o at compile
time and maybe it didn't get recompiled.
regards, tom lane
Hi Tom,
I didn't change my mind about prefix. I have tried to do everything by the
book.
[postgres@hubertus postgres]$ pg_config --pkglibdir
/opt/postgres-7.4.1//lib
Really weird.
One thing I have thought of is, shouldn't there be an etc directory in
/opt/postgres-7.4.1:
[postgres@hubertus postgres]$ ll /opt/postgres-7.4.1/
total 24
drwxr-xr-x 2 postgres postgres 4096 Feb 2 18:28 bin
drwxr-xr-x 3 postgres postgres 4096 Feb 2 18:01 doc
drwxr-xr-x 5 postgres postgres 4096 Feb 2 18:02 include
drwxr-xr-x 2 postgres postgres 4096 Feb 2 18:02 lib
drwxr-xr-x 4 postgres postgres 4096 Feb 2 18:01 man
drwxr-xr-x 2 postgres postgres 4096 Feb 2 18:27 share
?
Thanks for your effort!
Rgds
/Thomas.
-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Monday, February 02, 2004 6:58 PM
To: Thomas Borg Salling
Cc: 'PostgreSQL Bugs List'
Subject: Re: [BUGS] BUG #1072: "$libdir/ascii_and_mic": No such file or
directory
"Thomas Borg Salling" <tbs@navicon.dk> writes:
for some reason - conversion_create.sql the $libdir is not defined. I
tried
to print $libdir from bin/initdb, but this variable is empty.
$libdir is not an environment variable, it's a notation specially
recognized by CREATE FUNCTION. It should expand to the same directory
printed by "pg_config --pkglibdir". You might check what that prints.
The only other idea that comes to mind is that you changed your mind
about the install prefix during the installation and didn't do a full
rebuild. The PKGLIBDIR setting is hardwired into dfmgr.o at compile
time and maybe it didn't get recompiled.
regards, tom lane
"Thomas Borg Salling" <tbs@navicon.dk> writes:
[postgres@hubertus postgres]$ pg_config --pkglibdir
/opt/postgres-7.4.1//lib
Hmm. I wonder if the double slash could be causing a problem? I
wouldn't think so, but we're running out of ideas. Could you try
rebuilding with the trailing slash left off your --prefix setting?
One thing I have thought of is, shouldn't there be an etc directory in
/opt/postgres-7.4.1:
Nope.
regards, tom lane
Hi again :-)
I replaced "$libdir" with "/opt/postgres-7.4.1/lib" throughout
/opt/postgres-7.4.1/share/conversion_create.sql -- then initdb succeeded!
I think this'll work for now :-). Thanks for your time and effort!
/Thomas.
-----Original Message-----
From: pgsql-bugs-owner@postgresql.org
[mailto:pgsql-bugs-owner@postgresql.org] On Behalf Of Tom Lane
Sent: Monday, February 02, 2004 7:15 PM
To: Thomas Borg Salling
Cc: 'PostgreSQL Bugs List'
Subject: Re: [BUGS] BUG #1072: "$libdir/ascii_and_mic": No such file or
directory
"Thomas Borg Salling" <tbs@navicon.dk> writes:
[postgres@hubertus postgres]$ pg_config --pkglibdir
/opt/postgres-7.4.1//lib
Hmm. I wonder if the double slash could be causing a problem? I
wouldn't think so, but we're running out of ideas. Could you try
rebuilding with the trailing slash left off your --prefix setting?
One thing I have thought of is, shouldn't there be an etc directory in
/opt/postgres-7.4.1:
Nope.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
"Thomas Borg Salling" <tbs@navicon.dk> writes:
I replaced "$libdir" with "/opt/postgres-7.4.1/lib" throughout
/opt/postgres-7.4.1/share/conversion_create.sql -- then initdb succeeded!
Well, that proves the shared library wasn't broken, but it leaves us
no wiser about what the problem really was. I'd like to keep after it.
I tried configuring with a trailing "/" on a Red Hat 8.0 box here, and
it seemed to work just fine. You did not specify what Red Hat release
you were using, but I suspect that idea is a dead end.
You could investigate further without having to reinitdb, just try the
CREATE FUNCTION command in psql:
CREATE OR REPLACE FUNCTION dummy (INTEGER, INTEGER, CSTRING, CSTRING,INTEGER)
RETURNS VOID AS '$libdir/ascii_and_mic', 'ascii_to_mic' LANGUAGE 'c' STRICT;
I expect this will fail as before. Could you strace the attached
backend process while it's trying to do this command?
regards, tom lane
Hi Tom,
I am running a Red Hat 9.0 on a Dell server.
On the datafiles I created using the "absolute path"-hack to replace
$libdir, I started postmaster. I configured postgresql.conf to accept tcp
connections. I then ran
[postgres@hubertus postgres]$ /opt/postgres-7.4.1/bin/createdb testdb
CREATE DATABASE
Which work ok. Finally, I started psql (as user postgres), and tried your
suggested statement:
[postgres@hubertus postgres]$ /opt/postgres-7.4.1/bin/psql -d testdb
Welcome to psql 7.4.1, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit
testdb=# CREATE OR REPLACE FUNCTION dummy (INTEGER, INTEGER, CSTRING,
CSTRING,INTEGER)
testdb-# RETURNS VOID AS '$libdir/ascii_and_mic', 'ascii_to_mic' LANGUAGE
'c' STRICT;
ERROR: could not access file "$libdir/ascii_and_mic": No such file or
directory
ERROR: could not access file "$libdir/ascii_and_mic": No such file or
directory
testdb=#
And you are right -- the problem is back.
I assume that $libdir is evaluating to either a wrong or an empty string. I
am not sure, but I tend to believe the latter.
Does this give you any clues ?
Regards,
Thomas.
-----Original Message-----
From: pgsql-bugs-owner@postgresql.org
[mailto:pgsql-bugs-owner@postgresql.org] On Behalf Of Tom Lane
Sent: Monday, February 02, 2004 7:44 PM
To: Thomas Borg Salling
Cc: 'PostgreSQL Bugs List'
Subject: Re: [BUGS] BUG #1072: "$libdir/ascii_and_mic": No such file or
directory
"Thomas Borg Salling" <tbs@navicon.dk> writes:
I replaced "$libdir" with "/opt/postgres-7.4.1/lib" throughout
/opt/postgres-7.4.1/share/conversion_create.sql -- then initdb succeeded!
Well, that proves the shared library wasn't broken, but it leaves us
no wiser about what the problem really was. I'd like to keep after it.
I tried configuring with a trailing "/" on a Red Hat 8.0 box here, and
it seemed to work just fine. You did not specify what Red Hat release
you were using, but I suspect that idea is a dead end.
You could investigate further without having to reinitdb, just try the
CREATE FUNCTION command in psql:
CREATE OR REPLACE FUNCTION dummy (INTEGER, INTEGER, CSTRING,
CSTRING,INTEGER)
RETURNS VOID AS '$libdir/ascii_and_mic', 'ascii_to_mic' LANGUAGE 'c' STRICT;
I expect this will fail as before. Could you strace the attached
backend process while it's trying to do this command?
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
"Thomas Borg Salling" <tbs@navicon.dk> writes:
Does this give you any clues ?
That's what I expected, but it doesn't tell me anything new. Could you
try strace-ing the backend while you execute the CREATE FUNCTION
command?
regards, tom lane
Hi again,
Here is the strace (with my comments in -----shes):
[postgres@hubertus postgres]$ strace /opt/postgres-7.4.1/bin/postmaster -D
/data/postgres/ -i
execve("/opt/postgres-7.4.1/bin/postmaster",
["/opt/postgres-7.4.1/bin/postmaster", "-D", "/data/postgres/", "-i"], [/*
27 vars */]) = 0
uname({sys="Linux", node="hubertus", ...}) = 0
brk(0) = 0x8270984
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/usr/local/pgsql/lib/mmx/libz.so.1", O_RDONLY) = -1 ENOENT (No such
file or directory)
stat64("/usr/local/pgsql/lib/mmx", 0xbfffdf80) = -1 ENOENT (No such file or
directory)
open("/usr/local/pgsql/lib/libz.so.1", O_RDONLY) = -1 ENOENT (No such file
or directory)
stat64("/usr/local/pgsql/lib", 0xbfffdf80) = -1 ENOENT (No such file or
directory)
open("/opt/postgres-7.4.1/lib/mmx/libz.so.1", O_RDONLY) = -1 ENOENT (No such
file or directory)
stat64("/opt/postgres-7.4.1/lib/mmx", 0xbfffdf80) = -1 ENOENT (No such file
or directory)
open("/opt/postgres-7.4.1/lib/libz.so.1", O_RDONLY) = -1 ENOENT (No such
file or directory)
stat64("/opt/postgres-7.4.1/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...})
= 0
open("mmx/libz.so.1", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("libz.so.1", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=116236, ...}) = 0
old_mmap(NULL, 116236, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40014000
close(3) = 0
open("/usr/lib/libz.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\31\0"..., 1024)
= 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=59778, ...}) = 0
old_mmap(NULL, 54984, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40031000
mprotect(0x4003d000, 5832, PROT_NONE) = 0
old_mmap(0x4003d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0xb000) = 0x4003d000
close(3) = 0
open("/opt/postgres-7.4.1/lib/libreadline.so.4", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("mmx/libreadline.so.4", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("libreadline.so.4", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/usr/lib/libreadline.so.4", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240\243"..., 1024)
= 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=184567, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x4003f000
old_mmap(NULL, 153200, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40040000
mprotect(0x40061000, 18032, PROT_NONE) = 0
old_mmap(0x40061000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0x21000) = 0x40061000
old_mmap(0x40065000, 1648, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40065000
close(3) = 0
open("/opt/postgres-7.4.1/lib/libtermcap.so.2", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("mmx/libtermcap.so.2", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("libtermcap.so.2", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/lib/libtermcap.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260\r\0"..., 1024)
= 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=11832, ...}) = 0
old_mmap(NULL, 14932, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40066000
mprotect(0x40069000, 2644, PROT_NONE) = 0
old_mmap(0x40069000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0x2000) = 0x40069000
close(3) = 0
open("/opt/postgres-7.4.1/lib/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such
file or directory)
open("mmx/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/lib/libcrypt.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340\t\0"..., 1024)
= 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=23575, ...}) = 0
old_mmap(NULL, 182876, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4006a000
mprotect(0x4006f000, 162396, PROT_NONE) = 0
old_mmap(0x4006f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0x4000) = 0x4006f000
old_mmap(0x40070000, 158300, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40070000
close(3) = 0
open("/opt/postgres-7.4.1/lib/libresolv.so.2", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("mmx/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/lib/libresolv.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\'\0"..., 1024) =
1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=68925, ...}) = 0
old_mmap(NULL, 69408, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40097000
mprotect(0x400a5000, 12064, PROT_NONE) = 0
old_mmap(0x400a5000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0xe000) = 0x400a5000
old_mmap(0x400a6000, 7968, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x400a6000
close(3) = 0
open("/opt/postgres-7.4.1/lib/libnsl.so.1", O_RDONLY) = -1 ENOENT (No such
file or directory)
open("mmx/libnsl.so.1", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("libnsl.so.1", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/lib/libnsl.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`:\0\000"..., 1024)
= 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=89424, ...}) = 0
old_mmap(NULL, 84636, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x400a8000
mprotect(0x400ba000, 10908, PROT_NONE) = 0
old_mmap(0x400ba000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0x12000) = 0x400ba000
old_mmap(0x400bb000, 6812, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x400bb000
close(3) = 0
open("/opt/postgres-7.4.1/lib/libdl.so.2", O_RDONLY) = -1 ENOENT (No such
file or directory)
open("mmx/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/lib/libdl.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360\31"..., 1024) =
1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=12102, ...}) = 0
old_mmap(NULL, 11640, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x400bd000
mprotect(0x400bf000, 3448, PROT_NONE) = 0
old_mmap(0x400bf000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0x1000) = 0x400bf000
close(3) = 0
open("/opt/postgres-7.4.1/lib/libm.so.6", O_RDONLY) = -1 ENOENT (No such
file or directory)
open("mmx/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("libm.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/lib/i686/libm.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`7\0\000"..., 1024)
= 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=173359, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x400c0000
old_mmap(NULL, 138292, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x400c1000
mprotect(0x400e2000, 3124, PROT_NONE) = 0
old_mmap(0x400e2000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0x20000) = 0x400e2000
close(3) = 0
open("/opt/postgres-7.4.1/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No such
file or directory)
open("mmx/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("libc.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/lib/i686/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`u\1B4\0"..., 1024)
= 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=1401027, ...}) = 0
old_mmap(0x42000000, 1264928, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
0x42000000
mprotect(0x4212c000, 36128, PROT_NONE) = 0
old_mmap(0x4212c000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0x12c000) = 0x4212c000
old_mmap(0x42131000, 15648, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x42131000
close(3) = 0
munmap(0x40014000, 116236) = 0
brk(0) = 0x8270984
brk(0x82709b4) = 0x82709b4
brk(0x8271000) = 0x8271000
brk(0x8272000) = 0x8272000
open("/usr/share/locale/locale.alias", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=2601, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40014000
read(3, "# Locale name alias data base.\n#"..., 4096) = 2601
read(3, "", 4096) = 0
close(3) = 0
munmap(0x40014000, 4096) = 0
open("/usr/lib/locale/en_US.iso885915/LC_COLLATE", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=22592, ...}) = 0
mmap2(NULL, 22592, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40014000
close(3) = 0
open("/usr/lib/gconv/gconv-modules.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=20666, ...}) = 0
mmap2(NULL, 20666, PROT_READ, MAP_SHARED, 3, 0) = 0x4001a000
close(3) = 0
open("/usr/lib/locale/en_US.iso885915/LC_CTYPE", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=173680, ...}) = 0
mmap2(NULL, 173680, PROT_READ, MAP_PRIVATE, 3, 0) = 0x400e3000
brk(0x8273000) = 0x8273000
close(3) = 0
open("/usr/lib/locale/en_US.iso885915/LC_MESSAGES", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
close(3) = 0
open("/usr/lib/locale/en_US.iso885915/LC_MESSAGES/SYS_LC_MESSAGES",
O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=58, ...}) = 0
mmap2(NULL, 58, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40020000
close(3) = 0
geteuid32() = 26
getuid32() = 26
geteuid32() = 26
umask(077) = 022
getpid() = 7463
brk(0x8276000) = 0x8276000
brk(0x8279000) = 0x8279000
open("/etc/localtime", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=766, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40021000
read(3, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\0\0\0\6\0"..., 4096) =
766
close(3) = 0
munmap(0x40021000, 4096) = 0
stat64("/data/postgres/", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
open("/data/postgres//PG_VERSION", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0600, st_size=4, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40021000
read(3, "7.4\n", 4096) = 4
close(3) = 0
munmap(0x40021000, 4096) = 0
open("/data/postgres//global/pg_control", O_RDONLY|O_LARGEFILE) = 3
close(3) = 0
open("/data/postgres/postgresql.conf", O_RDONLY|O_LARGEFILE) = 3
brk(0x827e000) = 0x827e000
fstat64(3, {st_mode=S_IFREG|0600, st_size=7828, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40021000
read(3, "# -----------------------------\n"..., 8192) = 7828
read(3, "", 4096) = 0
read(3, "", 8192) = 0
close(3) = 0
munmap(0x40021000, 4096) = 0
open("/usr/lib/locale/en_US.iso885915/LC_MONETARY", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=292, ...}) = 0
mmap2(NULL, 292, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40021000
close(3) = 0
open("/usr/lib/locale/en_US.iso885915/LC_NUMERIC", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=60, ...}) = 0
mmap2(NULL, 60, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40022000
close(3) = 0
open("/usr/lib/locale/en_US.iso885915/LC_TIME", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=2457, ...}) = 0
mmap2(NULL, 2457, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40023000
close(3) = 0
stat64("/opt/postgres-7.4.1/bin/postgres", {st_mode=S_IFREG|0755,
st_size=2310646, ...}) = 0
geteuid32() = 26
getpid() = 7463
open("/data/postgres/postmaster.pid", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE,
0600) = 3
write(3, "7463\n/data/postgres\n", 20) = 20
close(3) = 0
open("/data/postgres/base", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
fstat64(3, {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
brk(0x8280000) = 0x8280000
getdents64(0x3, 0x827d488, 0x1000, 0x827d488) = 136
open("/data/postgres/base/1/pgsql_tmp",
O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = -1 ENOENT (No such file or
directory)
open("/data/postgres/base/17141/pgsql_tmp",
O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = -1 ENOENT (No such file or
directory)
open("/data/postgres/base/17142/pgsql_tmp",
O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = -1 ENOENT (No such file or
directory)
getdents64(0x3, 0x827d488, 0x1000, 0x827d488) = 0
close(3) = 0
socket(PF_INET6, SOCK_STREAM, 0) = -1 EAFNOSUPPORT (Address family
not supported by protocol)
open("/usr/share/locale/en_US.iso885915/LC_MESSAGES/libc.mo", O_RDONLY) = -1
ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT
(No such file or directory)
open("/usr/share/locale/en.iso885915/LC_MESSAGES/libc.mo", O_RDONLY) = -1
ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No
such file or directory)
write(2, "LOG: could not create IPv6 sock"..., 77LOG: could not create
IPv6 socket: Address family not supported by protocol
) = 77
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3
setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(3, {sin_family=AF_INET, sin_port=htons(5432),
sin_addr=inet_addr("0.0.0.0")}}, 16) = 0
listen(3, 200) = 0
getpid() = 7463
open("/tmp/.s.PGSQL.5432.lock", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0600) = 4
write(4, "7463\n/data/postgres\n", 20) = 20
close(4) = 0
unlink("/tmp/.s.PGSQL.5432") = -1 ENOENT (No such file or
directory)
socket(PF_UNIX, SOCK_STREAM, 0) = 4
bind(4, {sin_family=AF_UNIX, path="/tmp/.s.PGSQL.5432"}, 110) = 0
chmod("/tmp/.s.PGSQL.5432", 0777) = 0
listen(4, 200) = 0
shmget(5432001, 10436608, IPC_CREAT|IPC_EXCL|0x180|0600) = 6520841
shmat(6520841, 0, 0) = 0x4010e000
open("/data/postgres/postmaster.pid", O_RDWR|O_LARGEFILE) = 5
read(5, "7463\n/data/postgres\n", 8092) = 20
_llseek(5, 0, [0], SEEK_SET) = 0
write(5, "7463\n/data/postgres\n 5432001 "..., 40) = 40
close(5) = 0
getpid() = 7463
open("/data/postgres/global/pg_control", O_RDWR|O_LARGEFILE) = 5
read(5, "Q\1vB\334\320\244\266H\0\0\0\303}\360\v\1\0\0\0\237\271"..., 360) =
360
close(5) = 0
semget(5432001, 17, IPC_CREAT|IPC_EXCL|0x180|0600) = 43253761
semctl(43253761, 16, 0x110 /* SEM_??? */, 0xbfffe7b8) = 0
semop(43253761, 0xbfffe7d0, 1) = 0
semctl(43253761, 0, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43253761, 1, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43253761, 2, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43253761, 3, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43253761, 4, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43253761, 5, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43253761, 6, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43253761, 7, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43253761, 8, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43253761, 9, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43253761, 10, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43253761, 11, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43253761, 12, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43253761, 13, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43253761, 14, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43253761, 15, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semget(5432002, 17, IPC_CREAT|IPC_EXCL|0x180|0600) = 43286530
semctl(43286530, 16, 0x110 /* SEM_??? */, 0xbfffe7b8) = 0
semop(43286530, 0xbfffe7d0, 1) = 0
semctl(43286530, 0, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43286530, 1, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43286530, 2, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43286530, 3, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43286530, 4, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43286530, 5, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43286530, 6, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43286530, 7, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43286530, 8, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43286530, 9, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43286530, 10, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43286530, 11, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43286530, 12, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43286530, 13, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43286530, 14, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43286530, 15, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semget(5432003, 17, IPC_CREAT|IPC_EXCL|0x180|0600) = 43319299
semctl(43319299, 16, 0x110 /* SEM_??? */, 0xbfffe7b8) = 0
semop(43319299, 0xbfffe7d0, 1) = 0
semctl(43319299, 0, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43319299, 1, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43319299, 2, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43319299, 3, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43319299, 4, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43319299, 5, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43319299, 6, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43319299, 7, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43319299, 8, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43319299, 9, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43319299, 10, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43319299, 11, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43319299, 12, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43319299, 13, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43319299, 14, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43319299, 15, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semget(5432004, 17, IPC_CREAT|IPC_EXCL|0x180|0600) = 43352068
semctl(43352068, 16, 0x110 /* SEM_??? */, 0xbfffe7b8) = 0
semop(43352068, 0xbfffe7d0, 1) = 0
semctl(43352068, 0, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43352068, 1, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43352068, 2, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43352068, 3, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43352068, 4, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43352068, 5, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43352068, 6, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43352068, 7, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43352068, 8, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43352068, 9, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43352068, 10, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43352068, 11, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43352068, 12, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43352068, 13, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43352068, 14, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43352068, 15, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semget(5432005, 17, IPC_CREAT|IPC_EXCL|0x180|0600) = 43384837
semctl(43384837, 16, 0x110 /* SEM_??? */, 0xbfffe7b8) = 0
semop(43384837, 0xbfffe7d0, 1) = 0
semctl(43384837, 0, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43384837, 1, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43384837, 2, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43384837, 3, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43384837, 4, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43384837, 5, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43384837, 6, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43384837, 7, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43384837, 8, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43384837, 9, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43384837, 10, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43384837, 11, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43384837, 12, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43384837, 13, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43384837, 14, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43384837, 15, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semget(5432006, 17, IPC_CREAT|IPC_EXCL|0x180|0600) = 43417606
semctl(43417606, 16, 0x110 /* SEM_??? */, 0xbfffe7b8) = 0
semop(43417606, 0xbfffe7d0, 1) = 0
semctl(43417606, 0, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43417606, 1, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43417606, 2, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43417606, 3, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43417606, 4, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43417606, 5, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43417606, 6, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43417606, 7, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43417606, 8, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43417606, 9, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43417606, 10, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43417606, 11, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43417606, 12, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43417606, 13, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43417606, 14, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43417606, 15, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semget(5432007, 17, IPC_CREAT|IPC_EXCL|0x180|0600) = 43450375
semctl(43450375, 16, 0x110 /* SEM_??? */, 0xbfffe7b8) = 0
semop(43450375, 0xbfffe7d0, 1) = 0
semctl(43450375, 0, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43450375, 1, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43450375, 2, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43450375, 3, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
semctl(43450375, 4, 0x110 /* SEM_??? */, 0xbfffe7e8) = 0
stat64("/opt/postgres-7.4.1/bin/postmaster", {st_mode=S_IFREG|0755,
st_size=2310646, ...}) = 0
geteuid32() = 26
open("/data/postgres/postmaster.opts", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE,
0666) = 5
fstat64(5, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40024000
write(5, "/opt/postgres-7.4.1/bin/postmast"..., 63) = 63
close(5) = 0
munmap(0x40024000, 4096) = 0
rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP ABRT BUS FPE SEGV CONT SYS], NULL, 8)
= 0
rt_sigaction(SIGHUP, {0x812b664, [], SA_RESTART|0x4000000}, {SIG_DFL}, 8) =
0
rt_sigaction(SIGINT, {0x812b700, [], SA_RESTART|0x4000000}, {SIG_DFL}, 8) =
0
rt_sigaction(SIGQUIT, {0x812b700, [], SA_RESTART|0x4000000}, {SIG_DFL}, 8) =
0
rt_sigaction(SIGTERM, {0x812b700, [], SA_RESTART|0x4000000}, {SIG_DFL}, 8) =
0
rt_sigaction(SIGALRM, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGUSR1, {0x812c864, [], SA_RESTART|0x4000000}, {SIG_DFL}, 8) =
0
rt_sigaction(SIGUSR2, {0x812c9b8, [], SA_RESTART|0x4000000}, {SIG_DFL}, 8) =
0
rt_sigaction(SIGCHLD, {0x812ba24, [], SA_RESTART|0x4000000}, {SIG_DFL}, 8) =
0
rt_sigaction(SIGTTIN, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGTTOU, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGXFSZ, {SIG_IGN}, {SIG_DFL}, 8) = 0
time(NULL) = 1075755436
getpid() = 7463
unlink("/data/postgres/global/pgstat.stat") = 0
gettimeofday({1075755436, 467187}, NULL) = 0
getpid() = 7463
open("/etc/resolv.conf", O_RDONLY) = 5
fstat64(5, {st_mode=S_IFREG|0644, st_size=20, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40024000
read(5, "nameserver 10.0.1.1\n", 4096) = 20
read(5, "", 4096) = 0
close(5) = 0
munmap(0x40024000, 4096) = 0
uname({sys="Linux", node="hubertus", ...}) = 0
socket(PF_UNIX, SOCK_STREAM, 0) = 5
connect(5, {sin_family=AF_UNIX, path="/var/run/.nscd_socket"}, 110) = -1
ENOENT (No such file or directory)
close(5) = 0
open("/etc/nsswitch.conf", O_RDONLY) = 5
fstat64(5, {st_mode=S_IFREG|0644, st_size=1667, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40024000
read(5, "#\n# /etc/nsswitch.conf\n#\n# An ex"..., 4096) = 1667
read(5, "", 4096) = 0
close(5) = 0
munmap(0x40024000, 4096) = 0
open("/opt/postgres-7.4.1/lib/libnss_files.so.2", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("mmx/libnss_files.so.2", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("libnss_files.so.2", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY) = 5
fstat64(5, {st_mode=S_IFREG|0644, st_size=116236, ...}) = 0
old_mmap(NULL, 116236, PROT_READ, MAP_PRIVATE, 5, 0) = 0x40b02000
close(5) = 0
open("/lib/libnss_files.so.2", O_RDONLY) = 5
read(5, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\35\0"..., 1024) =
1024
fstat64(5, {st_mode=S_IFREG|0755, st_size=45415, ...}) = 0
old_mmap(NULL, 37848, PROT_READ|PROT_EXEC, MAP_PRIVATE, 5, 0) = 0x40024000
mprotect(0x4002d000, 984, PROT_NONE) = 0
old_mmap(0x4002d000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 5,
0x9000) = 0x4002d000
close(5) = 0
munmap(0x40b02000, 116236) = 0
open("/etc/host.conf", O_RDONLY) = 5
fstat64(5, {st_mode=S_IFREG|0644, st_size=17, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x4002e000
read(5, "order hosts,bind\n", 4096) = 17
read(5, "", 4096) = 0
close(5) = 0
munmap(0x4002e000, 4096) = 0
open("/etc/hosts", O_RDONLY) = 5
fcntl64(5, F_GETFD) = 0
fcntl64(5, F_SETFD, FD_CLOEXEC) = 0
fstat64(5, {st_mode=S_IFREG|0644, st_size=685, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x4002e000
read(5, "# Do not remove the following li"..., 4096) = 685
read(5, "", 4096) = 0
close(5) = 0
munmap(0x4002e000, 4096) = 0
open("/opt/postgres-7.4.1/lib/libnss_nis.so.2", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("mmx/libnss_nis.so.2", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("libnss_nis.so.2", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY) = 5
fstat64(5, {st_mode=S_IFREG|0644, st_size=116236, ...}) = 0
old_mmap(NULL, 116236, PROT_READ, MAP_PRIVATE, 5, 0) = 0x40b02000
close(5) = 0
open("/lib/libnss_nis.so.2", O_RDONLY) = 5
read(5, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\33"..., 1024) =
1024
fstat64(5, {st_mode=S_IFREG|0755, st_size=44746, ...}) = 0
old_mmap(NULL, 40864, PROT_READ|PROT_EXEC, MAP_PRIVATE, 5, 0) = 0x40b1f000
mprotect(0x40b28000, 4000, PROT_NONE) = 0
old_mmap(0x40b28000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 5,
0x8000) = 0x40b28000
close(5) = 0
brk(0x8281000) = 0x8281000
munmap(0x40b02000, 116236) = 0
uname({sys="Linux", node="hubertus", ...}) = 0
open("/var/yp/binding/navicon.2", O_RDONLY) = -1 ENOENT (No such file or
directory)
gettimeofday({1075755436, 537449}, NULL) = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 5
getpid() = 7463
bind(5, {sin_family=AF_INET, sin_port=htons(855),
sin_addr=inet_addr("0.0.0.0")}}, 16) = -1 EACCES (Permission denied)
ioctl(5, 0x5421, [1]) = 0
setsockopt(5, SOL_IP, IP_RECVERR, [1], 4) = 0
sendto(5, "=\316\273^\0\0\0\0\0\0\0\2\0\1\206\240\0\0\0\2\0\0\0\3"..., 56,
0, {sin_family=AF_INET, sin_port=htons(111),
sin_addr=inet_addr("127.0.0.1")}}, 16) = 56
poll([{fd=5, events=POLLIN, revents=POLLIN}], 1, 5000) = 1
recvfrom(5, "=\316\273^\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
400, 0, {sin_family=AF_INET, sin_port=htons(111),
sin_addr=inet_addr("127.0.0.1")}}, [16]) = 28
close(5) = 0
open("/opt/postgres-7.4.1/lib/libnss_dns.so.2", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("mmx/libnss_dns.so.2", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("libnss_dns.so.2", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY) = 5
fstat64(5, {st_mode=S_IFREG|0644, st_size=116236, ...}) = 0
old_mmap(NULL, 116236, PROT_READ, MAP_PRIVATE, 5, 0) = 0x40b02000
close(5) = 0
open("/lib/libnss_dns.so.2", O_RDONLY) = 5
read(5, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\r\0"..., 1024)
= 1024
fstat64(5, {st_mode=S_IFREG|0755, st_size=16051, ...}) = 0
old_mmap(NULL, 15912, PROT_READ|PROT_EXEC, MAP_PRIVATE, 5, 0) = 0x40b29000
mprotect(0x40b2c000, 3624, PROT_NONE) = 0
old_mmap(0x40b2c000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 5,
0x2000) = 0x40b2c000
close(5) = 0
munmap(0x40b02000, 116236) = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 5
connect(5, {sin_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("10.0.1.1")}}, 28) = 0
send(5, "\204y\1\0\0\1\0\0\0\0\0\0\tlocalhost\0\0\34\0\1", 27, 0) = 27
gettimeofday({1075755436, 541777}, NULL) = 0
poll([{fd=5, events=POLLIN, revents=POLLIN}], 1, 5000) = 1
recvfrom(5, "\204y\201\200\0\1\0\0\0\1\0\1\tlocalhost\0\0\34\0\1\tl"...,
1024, 0, {sin_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("10.0.1.1")}}, [16]) = 66
close(5) = 0
gettimeofday({1075755436, 542281}, NULL) = 0
getpid() = 7463
open("/etc/resolv.conf", O_RDONLY) = 5
fstat64(5, {st_mode=S_IFREG|0644, st_size=20, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x4002e000
read(5, "nameserver 10.0.1.1\n", 4096) = 20
read(5, "", 4096) = 0
close(5) = 0
munmap(0x4002e000, 4096) = 0
uname({sys="Linux", node="hubertus", ...}) = 0
socket(PF_UNIX, SOCK_STREAM, 0) = 5
connect(5, {sin_family=AF_UNIX, path="/var/run/.nscd_socket"}, 110) = -1
ENOENT (No such file or directory)
close(5) = 0
open("/etc/hosts", O_RDONLY) = 5
fcntl64(5, F_GETFD) = 0
fcntl64(5, F_SETFD, FD_CLOEXEC) = 0
fstat64(5, {st_mode=S_IFREG|0644, st_size=685, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x4002e000
read(5, "# Do not remove the following li"..., 4096) = 685
close(5) = 0
munmap(0x4002e000, 4096) = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 5
bind(5, {sin_family=AF_INET, sin_port=htons(0),
sin_addr=inet_addr("127.0.0.1")}}, 16) = 0
getsockname(5, {sin_family=AF_INET, sin_port=htons(33043),
sin_addr=inet_addr("127.0.0.1")}}, [16]) = 0
connect(5, {sin_family=AF_INET, sin_port=htons(33043),
sin_addr=inet_addr("127.0.0.1")}}, 16) = 0
fcntl64(5, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
pipe([6, 7]) = 0
time(NULL) = 1075755436
fork() = 7465
open("/data/postgres/pg_hba.conf", O_RDONLY|O_LARGEFILE) = 8
fstat64(8, {st_mode=S_IFREG|0600, st_size=3288, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x4002e000
read(8, "# PostgreSQL Client Authenticati"..., 4096) = 3288
read(8, "", 4096) = 0
close(8) = 0
munmap(0x4002e000, 4096) = 0
open("/data/postgres/pg_ident.conf", O_RDONLY|O_LARGEFILE) = 8
fstat64(8, {st_mode=S_IFREG|0600, st_size=1441, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x4002e000
read(8, "# PostgreSQL Ident Authenticatio"..., 4096) = 1441
read(8, "", 4096) = 0
close(8) = 0
munmap(0x4002e000, 4096) = 0
open("/data/postgres/global/pg_pwd", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No
such file or directory)
open("/data/postgres/global/pg_group", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No
such file or directory)
fork() = 7467
LOG: database system was shut down at 2004-02-02 21:57:03 CET
LOG: checkpoint record is at 0/9D34D8
LOG: redo record is at 0/9D34D8; undo record is at 0/0; shutdown TRUE
LOG: next transaction ID: 541; next OID: 17145
gettimeofday({1075755436, 618626}, {4294967236, 0}) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
select(5, [3 4], NULL, NULL, {60, 0}LOG: database system is ready
) = ? ERESTARTNOHAND (To be restarted)
--- SIGCHLD (Child exited) ---
rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP ABRT BUS FPE SEGV CONT SYS], NULL, 8)
= 0
wait4(-1, [WIFEXITED(s) && WEXITSTATUS(s) == 0], WNOHANG, NULL) = 7467
time(NULL) = 1075755436
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
sigreturn() = ? (mask now [])
rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP ABRT BUS FPE SEGV CONT SYS], NULL, 8)
= 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
select(5, [3 4], NULL, NULL, {60, 0}
----- server startup complete; about to connect psql -----------------------
) = 1 (in [3], left {35, 180000})
rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP ABRT BUS FPE SEGV CONT SYS], NULL, 8)
= 0
gettimeofday({1075755461, 448481}, {4294967236, 0}) = 0
accept(3, {sin_family=AF_INET, sin_port=htons(33470),
sin_addr=inet_addr("127.0.0.1")}}, [16]) = 8
getsockname(8, {sin_family=AF_INET, sin_port=htons(5432),
sin_addr=inet_addr("127.0.0.1")}}, [16]) = 0
setsockopt(8, SOL_TCP, TCP_NODELAY, [1], 4) = 0
setsockopt(8, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
fork() = 7470
close(8) = 0
time(NULL) = 1075755461
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
select(5, [3 4], NULL, NULL, {275, 0}
----- psql connected; about to CREATE FUNCTION -----------------------------
ERROR: could not access file "$libdir/ascii_and_mic": No such file or
directory
----- CREATE FUNCTION attempted --------------------------------------------
Best regards,
Thomas.
-----Original Message-----
From: pgsql-bugs-owner@postgresql.org
[mailto:pgsql-bugs-owner@postgresql.org] On Behalf Of Tom Lane
Sent: Monday, February 02, 2004 7:44 PM
To: Thomas Borg Salling
Cc: 'PostgreSQL Bugs List'
Subject: Re: [BUGS] BUG #1072: "$libdir/ascii_and_mic": No such file or
directory
"Thomas Borg Salling" <tbs@navicon.dk> writes:
I replaced "$libdir" with "/opt/postgres-7.4.1/lib" throughout
/opt/postgres-7.4.1/share/conversion_create.sql -- then initdb succeeded!
Well, that proves the shared library wasn't broken, but it leaves us
no wiser about what the problem really was. I'd like to keep after it.
I tried configuring with a trailing "/" on a Red Hat 8.0 box here, and
it seemed to work just fine. You did not specify what Red Hat release
you were using, but I suspect that idea is a dead end.
You could investigate further without having to reinitdb, just try the
CREATE FUNCTION command in psql:
CREATE OR REPLACE FUNCTION dummy (INTEGER, INTEGER, CSTRING,
CSTRING,INTEGER)
RETURNS VOID AS '$libdir/ascii_and_mic', 'ascii_to_mic' LANGUAGE 'c' STRICT;
I expect this will fail as before. Could you strace the attached
backend process while it's trying to do this command?
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
"Thomas Borg Salling" <tbs@navicon.dk> writes:
Here is the strace (with my comments in -----shes):
It looks like you strace'd the postmaster ... I wanted the backend
subprocess that's spawned for the particular psql connection.
regards, tom lane
Yes; you're right. Sorry. Meanwhile, I also discovered, my RedHat may
originally have put a competing postgres onto the system from some RPM.
[root@hubertus root]# rpm -q postgresql
postgresql-7.2.1-5
So now I've done:
[root@hubertus root]# rpm --erase postgresql postgresql-server
postgresql-contrib php-pgsql
After having done the "rpm --erase" I cleaned the /data/postgres and
/opt/postgres-7.4.1 directories; re-created the postgres user, but initdb
still had the same fault. So I re-inserted the "absolute path"-hack;
createdb, and started psql to create function. The result from strace (when
running the CREATE FUNCTION) of the backend is:
"Q\0\0\0\237CREATE OR REPLACE FUNCTION "..., 8192, 0) = 160
gettimeofday({1075756990, 462661}, NULL) = 0
stat64("/usr/local/pgsql/lib/ascii_and_mic", 0xbfffca10) = -1 ENOENT (No
such file or directory)
stat64("/usr/local/pgsql/lib/ascii_and_mic.so", 0xbfffca10) = -1 ENOENT (No
such file or directory)
stat64("$libdir/ascii_and_mic", 0xbfffcad0) = -1 ENOENT (No such file or
directory)
write(2, "ERROR: could not access file \"$"..., 81) = 81
send(8, "E\0\0\0\202SERROR\0C58P01\0Mcould not ac"..., 131, 0) = 131
rt_sigprocmask(SIG_SETMASK, ~[QUIT ILL TRAP ABRT BUS FPE KILL SEGV CONT STOP
SYS], NULL, 8) = 0
time(NULL) = 1075756990
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
send(8, "Z\0\0\0\5I", 6, 0) = 6
recv(8,
It seems to search in /usr/local/pgsql -- but that directory does not exist
(at least not after the rpm --erase).
Does this give you a clue ?
Rgds
/Thomas.
-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Monday, February 02, 2004 9:52 PM
To: Thomas Borg Salling
Cc: 'PostgreSQL Bugs List'
Subject: Re: [BUGS] BUG #1072: "$libdir/ascii_and_mic": No such file or
directory
"Thomas Borg Salling" <tbs@navicon.dk> writes:
Does this give you any clues ?
That's what I expected, but it doesn't tell me anything new. Could you
try strace-ing the backend while you execute the CREATE FUNCTION
command?
regards, tom lane
"Thomas Borg Salling" <tbs@navicon.dk> writes:
createdb, and started psql to create function. The result from strace (when
running the CREATE FUNCTION) of the backend is:
"Q\0\0\0\237CREATE OR REPLACE FUNCTION "..., 8192, 0) = 160
gettimeofday({1075756990, 462661}, NULL) = 0
stat64("/usr/local/pgsql/lib/ascii_and_mic", 0xbfffca10) = -1 ENOENT (No
such file or directory)
stat64("/usr/local/pgsql/lib/ascii_and_mic.so", 0xbfffca10) = -1 ENOENT (No
such file or directory)
stat64("$libdir/ascii_and_mic", 0xbfffcad0) = -1 ENOENT (No such file or
directory)
write(2, "ERROR: could not access file \"$"..., 81) = 81
It seems to search in /usr/local/pgsql.
Evidently. So, somehow src/backend/utils/fmgr/dfmgr.o got compiled with
the wrong value of PKGLIBDIR. You should look in src/Makefile.global to
check that it has the correct setting for pkglibdir (note difference in
case). Also try going to src/backend/utils/fmgr, removing dfmgr.o, and
saying "make" to see what -D switch gets passed by the makefile.
regards, tom lane
So, I removed dfmgr.o, and remade it:
[tbs@hubertus fmgr]$ make
gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
-Wmissing-declarations -I../../../../src/include -D_GNU_SOURCE
-DPKGLIBDIR=\"/opt/postgres-7.4.1//lib\" -DDLSUFFIX=\".so\" -c -o dfmgr.o
dfmgr.c
/usr/bin/ld -r -o SUBSYS.o dfmgr.o fmgr.o funcapi.o
The Makefile.global looks ok (I didn't touch it), excerpts:
...
prefix := /opt/postgres-7.4.1/
...
libdir := ${exec_prefix}/lib
pkglibdir = $(libdir)
ifeq "$(findstring pgsql, $(pkglibdir))" ""
ifeq "$(findstring postgres, $(pkglibdir))" ""
override pkglibdir := $(pkglibdir)/postgresql
endif
endif
...
I did a "make install" following the rebuild of dfmgr.o -- and now things
work!
I am wondering how I came into this situation? Trying to recall my first
steps; I think that I did a ./configure first (it ran to the end) -- and
then I ran ./configure again with the options. Hmm... I will make a complete
new build (from a fresh tarball and directory) and see what happens.
I am not sure this was any help to you? Anyway - thanks for pointing to the
source of my problem!
/Thomas.
-----Original Message-----
From: pgsql-bugs-owner@postgresql.org
[mailto:pgsql-bugs-owner@postgresql.org] On Behalf Of Tom Lane
Sent: Monday, February 02, 2004 10:36 PM
To: Thomas Borg Salling
Cc: 'PostgreSQL Bugs List'
Subject: Re: [BUGS] BUG #1072: "$libdir/ascii_and_mic": No such file or
directory
"Thomas Borg Salling" <tbs@navicon.dk> writes:
createdb, and started psql to create function. The result from strace
(when
running the CREATE FUNCTION) of the backend is:
"Q\0\0\0\237CREATE OR REPLACE FUNCTION "..., 8192, 0) = 160
gettimeofday({1075756990, 462661}, NULL) = 0
stat64("/usr/local/pgsql/lib/ascii_and_mic", 0xbfffca10) = -1 ENOENT (No
such file or directory)
stat64("/usr/local/pgsql/lib/ascii_and_mic.so", 0xbfffca10) = -1 ENOENT
(No
such file or directory)
stat64("$libdir/ascii_and_mic", 0xbfffcad0) = -1 ENOENT (No such file or
directory)
write(2, "ERROR: could not access file \"$"..., 81) = 81
It seems to search in /usr/local/pgsql.
Evidently. So, somehow src/backend/utils/fmgr/dfmgr.o got compiled with
the wrong value of PKGLIBDIR. You should look in src/Makefile.global to
check that it has the correct setting for pkglibdir (note difference in
case). Also try going to src/backend/utils/fmgr, removing dfmgr.o, and
saying "make" to see what -D switch gets passed by the makefile.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org