[BUGS] BUG #3229: Incorrect temp table work

2007-04-16 Thread ALEXEY PARSHIN

The following bug has been logged online:

Bug reference:  3229
Logged by:  ALEXEY PARSHIN
Email address:  [EMAIL PROTECTED]
PostgreSQL version: 8.1.8
Operating system:   Gentoo Linux
Description:Incorrect temp table work
Details: 

If I call the following function two or more time, I get an error "relation
with OID 318730 does not exist":

CREATE OR REPLACE FUNCTION temp_test(
) RETURNS void AS $$
BEGIN

  BEGIN
CREATE TEMP TABLE session_info(
  si_person int not null,
  si_person_name varchar(40) not null,
  si_server int not null
);
  EXCEPTION
-- Table already exists? Clean it
WHEN others THEN
  DELETE FROM session_info;
  END;

  INSERT INTO session_info (si_person,si_person_name,si_server)
  VALUES (1,'test',1);

  RAISE EXCEPTION 'Something went wrong';
END;
$$ LANGUAGE 'plpgsql';


GRANT EXECUTE ON FUNCTION temp_test() TO PUBLIC;

---(end of broadcast)---
TIP 6: explain analyze is your friend


[BUGS] BUG #5680: Failure to start: too many private dirs demanded

2010-09-27 Thread Alexey Parshin

The following bug has been logged online:

Bug reference:  5680
Logged by:  Alexey Parshin
Email address:  alex...@gmail.com
PostgreSQL version: 9.0.0
Operating system:   Gentoo Linux
Description:Failure to start: too many private dirs demanded
Details: 

PostgreSQL (fresh install) fails to start.
The only message in the log file says:
FATAL: too many private dirs demanded

strace pg_ctl start -D/var/lib/postgresql/9.0/data shows (tail):

read(3, "# Locale name alias data base.\n#"..., 4096) = 2570
read(3, "", 4096)   = 0
close(3)= 0
munmap(0xb77e4000, 4096)= 0
open("/usr/lib/postgresql-9.0/share/locale/en_AU.UTF-8/LC_MESSAGES/pg_ctl-9.
0.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/postgresql-9.0/share/locale/en_AU.utf8/LC_MESSAGES/pg_ctl-9.0
.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/postgresql-9.0/share/locale/en_AU/LC_MESSAGES/pg_ctl-9.0.mo",
O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/postgresql-9.0/share/locale/en.UTF-8/LC_MESSAGES/pg_ctl-9.0.m
o", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/postgresql-9.0/share/locale/en.utf8/LC_MESSAGES/pg_ctl-9.0.mo
", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/postgresql-9.0/share/locale/en/LC_MESSAGES/pg_ctl-9.0.mo",
O_RDONLY) = -1 ENOENT (No such file or directory)
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb77e4000
write(1, "server starting\n", 16server starting
)   = 16
exit_group(0)   = ?
FATAL:  too many private dirs demanded

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] BUG #5680: Failure to start: too many private dirs demanded

2010-09-28 Thread Alexey Parshin
Sorry. My bad :)
After tracing postmaster as Alvaro suggested, I found the following fragment
(one of thousand):

stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2183, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2183, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2183, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2183, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2183, ...}) = 0
stat64("/usr/share/zoneinfo/Australia/Australia/Australia/Australia/Australia/Australia/Australia/Australia/Australia/Australia/Australia/Australia/Australia/Australia/Australia/Australia/Australia/Australia/Australia/Australia/Eucla",
{st_mode=S_IFREG|0644, st_size=446, ...}) = 0
open("/usr/share/zoneinfo",
O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 24
getdents64(24, /* 70 entries */, 32768) = 2032
close(24)   = 0

And then found a link /usr/share/zoneinfo/Australia/Australia to
/usr/share/zoneinfo/Australia/Australia. Clearly, this isn't PostgreSQL
fault. Removing that link solved it. Thanks a lot.
A simple suggestion that would help in diagnostics: A message like 'too many
dir entries demanded' is more useful if the path in question is shown. For
example, a message like:

*Too many dir entries demanded. The path is
"/usr/share/zoneinfo/Australia/Australia/Australia/Australia/Eucla"*

gives the exact clue on what's wrong and doesn't require developer's time.

I'm really grateful for your help,
Alexey

On 29 September 2010 00:19, Tom Lane  wrote:

> Please trace the postmaster, not pg_ctl, as Alvaro suggested
> (or else add the -f flag to the strace call).
>
>regards, tom lane
>



-- 
Alexey Parshin,
http://www.sptk.net