Re: BUG #3269: PSQL does not display error output

From: Bojan Jovanovic <bjovanovic(at)bjovanovic(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michael Fuhr <mike(at)fuhr(dot)org>, Bojan Jovanovic <pgbojan(at)bjovanovic(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3269: PSQL does not display error output
Date: 2007-05-12 18:15:15
Message-ID: Pine.LNX.4.64.0705121412230.3408@lepotan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Tom,

Here is the full strace of: echo "select * from sadfasdfas;" | strace psql -U ***** *****
(no sadfasfaf table..)

execve("/usr/local/bin/psql", ["psql", "-U", "nutriscan_staging", "shp_staging"], [/* 22 vars */]) = 0
uname({sys="Linux", node="new.mynutriscan.com", ...}) = 0
brk(0) = 0x807b000
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/pgsql/lib/tls/i686/mmx/libpq.so.5", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/pgsql/lib/tls/i686/mmx", 0xbffff280) = -1 ENOENT (No such file or directory)
open("/usr/local/pgsql/lib/tls/i686/libpq.so.5", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/pgsql/lib/tls/i686", 0xbffff280) = -1 ENOENT (No such file or directory)
open("/usr/local/pgsql/lib/tls/mmx/libpq.so.5", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/pgsql/lib/tls/mmx", 0xbffff280) = -1 ENOENT (No such file or directory)
open("/usr/local/pgsql/lib/tls/libpq.so.5", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/pgsql/lib/tls", 0xbffff280) = -1 ENOENT (No such file or directory)
open("/usr/local/pgsql/lib/i686/mmx/libpq.so.5", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/pgsql/lib/i686/mmx", 0xbffff280) = -1 ENOENT (No such file or directory)
open("/usr/local/pgsql/lib/i686/libpq.so.5", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/pgsql/lib/i686", 0xbffff280) = -1 ENOENT (No such file or directory)
open("/usr/local/pgsql/lib/mmx/libpq.so.5", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/pgsql/lib/mmx", 0xbffff280) = -1 ENOENT (No such file or directory)
open("/usr/local/pgsql/lib/libpq.so.5", 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\3508\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=112026, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb75ea000
old_mmap(NULL, 93248, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xb75d3000
old_mmap(0xb75e9000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x16000) = 0xb75e9000
close(3) = 0
open("/usr/local/pgsql/lib/libssl.so.4", 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=36840, ...}) = 0
old_mmap(NULL, 36840, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb75ca000
close(3) = 0
open("/lib/libssl.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\260\226"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=211908, ...}) = 0
old_mmap(NULL, 212612, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xb7596000
old_mmap(0xb75c7000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x31000) = 0xb75c7000
close(3) = 0
open("/usr/local/pgsql/lib/libcrypto.so.4", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libcrypto.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\320\252"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=972156, ...}) = 0
old_mmap(NULL, 985368, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xb74a5000
old_mmap(0xb7581000, 73728, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xdc000) = 0xb7581000
old_mmap(0xb7593000, 10520, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7593000
close(3) = 0
open("/usr/local/pgsql/lib/libz.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
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\340\31"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=52584, ...}) = 0
old_mmap(NULL, 55564, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xb7497000
old_mmap(0xb74a3000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xb000) = 0xb74a3000
close(3) = 0
open("/usr/local/pgsql/lib/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\360\257"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=173000, ...}) = 0
old_mmap(NULL, 179412, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xb746b000
old_mmap(0xb7492000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x26000) = 0xb7492000
old_mmap(0xb7496000, 3284, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7496000
close(3) = 0
mprotect(0xbffff000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSDOWN) = -1 EINVAL (Invalid argument)
mprotect(0xbfff8000, 32768, PROT_READ|PROT_WRITE|PROT_EXEC) = -1 ENOMEM (Cannot allocate memory)
mprotect(0xbfffc000, 16384, PROT_READ|PROT_WRITE|PROT_EXEC) = -1 ENOMEM (Cannot allocate memory)
mprotect(0xbfffe000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC) = 0
mprotect(0xbfffc000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC) = -1 ENOMEM (Cannot allocate memory)
mprotect(0xbfffd000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC) = -1 ENOMEM (Cannot allocate memory)
open("/usr/local/pgsql/lib/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\340\r\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=11784, ...}) = 0
old_mmap(NULL, 14856, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xb7467000
old_mmap(0xb746a000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x2000) = 0xb746a000
close(3) = 0
open("/usr/local/pgsql/lib/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\220\t\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=23388, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7466000
old_mmap(NULL, 181308, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xb7439000
old_mmap(0xb743e000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x4000) = 0xb743e000
old_mmap(0xb743f000, 156732, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb743f000
close(3) = 0
open("/usr/local/pgsql/lib/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\260\32"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=14868, ...}) = 0
old_mmap(NULL, 12244, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xb7436000
old_mmap(0xb7438000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1000) = 0xb7438000
close(3) = 0
open("/usr/local/pgsql/lib/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/tls/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\3604\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=213484, ...}) = 0
old_mmap(NULL, 135616, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xb7414000
old_mmap(0xb7435000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x21000) = 0xb7435000
close(3) = 0
open("/usr/local/pgsql/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/tls/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\200X\1"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1571692, ...}) = 0
old_mmap(NULL, 1275340, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xb72dc000
old_mmap(0xb740e000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x132000) = 0xb740e000
old_mmap(0xb7411000, 9676, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7411000
close(3) = 0
open("/usr/local/pgsql/lib/libgssapi_krb5.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/pgsql/lib/libgssapi_krb5.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/kerberos/lib/libgssapi_krb5.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\340H\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=76712, ...}) = 0
old_mmap(NULL, 75588, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xb72c9000
old_mmap(0xb72db000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x12000) = 0xb72db000
close(3) = 0
open("/usr/local/pgsql/lib/libkrb5.so.3", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/pgsql/lib/libkrb5.so.3", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/kerberos/lib/libkrb5.so.3", 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\320\362"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=385252, ...}) = 0
old_mmap(NULL, 384636, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xb726b000
old_mmap(0xb72c7000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x5c000) = 0xb72c7000
close(3) = 0
open("/usr/local/pgsql/lib/libcom_err.so.3", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/pgsql/lib/libcom_err.so.3", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/kerberos/lib/libcom_err.so.3", 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\t\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=5540, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb726a000
old_mmap(NULL, 4520, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xb7268000
old_mmap(0xb7269000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1000) = 0xb7269000
close(3) = 0
open("/usr/local/pgsql/lib/libk5crypto.so.3", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/pgsql/lib/libk5crypto.so.3", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/kerberos/lib/libk5crypto.so.3", 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&\0\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=72552, ...}) = 0
old_mmap(NULL, 73108, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xb7256000
old_mmap(0xb7267000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x11000) = 0xb7267000
close(3) = 0
open("/usr/local/pgsql/lib/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/pgsql/lib/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\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=76540, ...}) = 0
old_mmap(NULL, 73604, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xb7244000
old_mmap(0xb7253000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xf000) = 0xb7253000
old_mmap(0xb7254000, 8068, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7254000
close(3) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7243000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7243500, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
munmap(0xb75ca000, 36840) = 0
brk(0) = 0x807b000
brk(0x809c000) = 0x809c000
brk(0) = 0x809c000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=32148976, ...}) = 0
mmap2(NULL, 2097152, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7043000
mmap2(NULL, 1097728, PROT_READ, MAP_PRIVATE, 3, 0x261) = 0xb6f37000
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0x594) = 0xb6f36000
close(3) = 0
getcwd("/home/bjovanovic", 1024) = 17
stat64("/usr/kerberos/bin/psql", 0xbfffe5a0) = -1 ENOENT (No such file or directory)
stat64("/usr/local/bin/psql", {st_mode=S_IFREG|0755, st_size=230320, ...}) = 0
geteuid32() = 501
socket(PF_FILE, SOCK_STREAM, 0) = 3
connect(3, {sa_family=AF_FILE, path="/var/run/.nscd_socket"}, 110) = -1 ENOENT (No such file or directory)
close(3) = 0
open("/etc/nsswitch.conf", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=1686, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f35000
read(3, "#\n# /etc/nsswitch.conf\n#\n# An ex"..., 4096) = 1686
read(3, "", 4096) = 0
close(3) = 0
munmap(0xb6f35000, 4096) = 0
open("/usr/local/pgsql/lib/libnss_files.so.2", 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=36840, ...}) = 0
old_mmap(NULL, 36840, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb6f2d000
close(3) = 0
open("/lib/libnss_files.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\35\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=51936, ...}) = 0
old_mmap(NULL, 46732, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xb6f21000
old_mmap(0xb6f2c000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xa000) = 0xb6f2c000
close(3) = 0
munmap(0xb6f2d000, 36840) = 0
open("/etc/passwd", O_RDONLY) = 3
fcntl64(3, F_GETFD) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=2281, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f35000
read(3, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 2281
close(3) = 0
munmap(0xb6f35000, 4096) = 0
socket(PF_FILE, SOCK_STREAM, 0) = 3
connect(3, {sa_family=AF_FILE, path="/var/run/.nscd_socket"}, 110) = -1 ENOENT (No such file or directory)
close(3) = 0
open("/etc/group", O_RDONLY) = 3
fcntl64(3, F_GETFD) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=940, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f35000
read(3, "root:x:0:root\nbin:x:1:root,bin,d"..., 4096) = 940
close(3) = 0
munmap(0xb6f35000, 4096) = 0
getcwd("/home/bjovanovic", 1024) = 17
chdir("/usr/local/bin") = 0
lstat64("psql", {st_mode=S_IFLNK|0777, st_size=25, ...}) = 0
readlink("psql", "/usr/local/pgsql/bin/psql", 1024) = 25
chdir("/usr/local/pgsql/bin") = 0
lstat64("psql", {st_mode=S_IFREG|0755, st_size=230320, ...}) = 0
getcwd("/usr/local/pgsql/bin", 1024) = 21
chdir("/home/bjovanovic") = 0
rt_sigaction(SIGINT, {0x804d0bc, [], SA_RESTORER|SA_RESTART, 0xb7303ec8}, {SIG_DFL}, 8) = 0
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbffffa08) = -1 EINVAL (Invalid argument)
geteuid32() = 501
open("/etc/passwd", O_RDONLY) = 3
fcntl64(3, F_GETFD) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=2281, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f35000
read(3, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 2281
close(3) = 0
munmap(0xb6f35000, 4096) = 0
geteuid32() = 501
open("/etc/passwd", O_RDONLY) = 3
fcntl64(3, F_GETFD) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=2281, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f35000
read(3, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 2281
close(3) = 0
munmap(0xb6f35000, 4096) = 0
stat64("/home/bjovanovic/.pgpass", 0xbffff5b0) = -1 ENOENT (No such file or directory)
socket(PF_FILE, SOCK_STREAM, 0) = 3
fcntl64(3, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
connect(3, {sa_family=AF_FILE, path="/tmp/.s.PGSQL.5432"}, 110) = 0
getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
getsockname(3, {sa_family=AF_FILE, path=(at)}, [2]) = 0
poll([{fd=3, events=POLLOUT|POLLERR, revents=POLLOUT}], 1, -1) = 1
rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_DFL}, 8) = 0
send(3, "\0\0\0005\0\3\0\0user\0nutriscan_staging\0d"..., 53, 0) = 53
rt_sigaction(SIGPIPE, {SIG_DFL}, {SIG_IGN}, 8) = 0
poll([{fd=3, events=POLLIN|POLLERR, revents=POLLIN}], 1, -1) = 1
recv(3, "R\0\0\0\10\0\0\0\0S\0\0\0\33client_encoding\0LA"..., 16384, 0) = 289
getcwd("/home/bjovanovic", 1024) = 17
stat64("/usr/kerberos/bin/psql", 0xbfffe1c0) = -1 ENOENT (No such file or directory)
stat64("/usr/local/bin/psql", {st_mode=S_IFREG|0755, st_size=230320, ...}) = 0
geteuid32() = 501
open("/etc/passwd", O_RDONLY) = 4
fcntl64(4, F_GETFD) = 0
fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
fstat64(4, {st_mode=S_IFREG|0644, st_size=2281, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f35000
read(4, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 2281
close(4) = 0
munmap(0xb6f35000, 4096) = 0
open("/etc/group", O_RDONLY) = 4
fcntl64(4, F_GETFD) = 0
fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
fstat64(4, {st_mode=S_IFREG|0644, st_size=940, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f35000
read(4, "root:x:0:root\nbin:x:1:root,bin,d"..., 4096) = 940
close(4) = 0
munmap(0xb6f35000, 4096) = 0
getcwd("/home/bjovanovic", 1024) = 17
chdir("/usr/local/bin") = 0
lstat64("psql", {st_mode=S_IFLNK|0777, st_size=25, ...}) = 0
readlink("psql", "/usr/local/pgsql/bin/psql", 1024) = 25
chdir("/usr/local/pgsql/bin") = 0
lstat64("psql", {st_mode=S_IFREG|0755, st_size=230320, ...}) = 0
getcwd("/usr/local/pgsql/bin", 1024) = 21
chdir("/home/bjovanovic") = 0
access("/usr/local/pgsql/etc/psqlrc-8.2.4", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/pgsql/etc/psqlrc", R_OK) = -1 ENOENT (No such file or directory)
geteuid32() = 501
open("/etc/passwd", O_RDONLY) = 4
fcntl64(4, F_GETFD) = 0
fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
fstat64(4, {st_mode=S_IFREG|0644, st_size=2281, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f35000
read(4, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 2281
close(4) = 0
munmap(0xb6f35000, 4096) = 0
access("/home/bjovanovic/.psqlrc-8.2.4", R_OK) = -1 ENOENT (No such file or directory)
access("/home/bjovanovic/.psqlrc", R_OK) = 0
open("/home/bjovanovic/.psqlrc", O_RDONLY|O_LARGEFILE) = 4
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
fstat64(4, {st_mode=S_IFREG|0664, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f35000
read(4, "", 4096) = 0
close(4) = 0
munmap(0xb6f35000, 4096) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
fstat64(0, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f35000
read(0, "select * from sadfasdfas;\n", 4096) = 26
rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_DFL}, 8) = 0
send(3, "Q\0\0\0\36select * from sadfasdfas;\0", 31, 0) = 31
rt_sigaction(SIGPIPE, {SIG_DFL}, {SIG_IGN}, 8) = 0
poll([{fd=3, events=POLLIN|POLLERR, revents=POLLIN}], 1, -1) = 1
recv(3, "E\0\0\0]SERROR\0C42P01\0Mrelation \"sa"..., 16384, 0) = 100
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
read(0, "", 4096) = 0
rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_DFL}, 8) = 0
send(3, "X\0\0\0\4", 5, 0) = 5
rt_sigaction(SIGPIPE, {SIG_DFL}, {SIG_IGN}, 8) = 0
close(3) = 0
rt_sigaction(SIGPIPE, {SIG_DFL}, {SIG_DFL}, 8) = 0
exit_group(0) = ?

Thanks,
bojan

On Sat, 12 May 2007, Tom Lane wrote:

> Bojan Jovanovic <bjovanovic(at)bjovanovic(dot)com> writes:
>>> RHEL3 had SELinux. Do you have /usr/sbin/getenforce and if so what does
>>> it report?
>
>> NO SElinux on this box... (don't have getenforce)
>
> Strange. Try strace'ing the psql session to see if it's trying to write
> stderr and if so what happens.
>
> regards, tom lane
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2007-05-12 20:52:39 Re: BUG #3269: PSQL does not display error output
Previous Message Tom Lane 2007-05-12 16:43:01 Re: BUG #3272: ECPG YE000 error