Обсуждение: RE: [HACKERS] VACUUM ANALYZE problem on linux

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

RE: [HACKERS] VACUUM ANALYZE problem on linux

От
Dan Gowin
Дата:
What user ID are you using? Are you "su"ing over
the the postgres user ID.

Also, make sure all of the environment variables
are exported in the script. PGPORT, PGUSER, etc...

D.

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Wednesday, February 24, 1999 1:35 PM
To: phd2@earthling.net
Cc: PostgreSQL-development
Subject: Re: [HACKERS] VACUUM ANALYZE problem on linux 


Oleg Broytmann <phd@sun.med.ru> writes:
> 3. Run postmaster -b -D/usr/local/pgsql/data -o -Fe -S (to detach it)
>    and run VACUUM ANALYZE - worked
>    (I took these parameters from script /etc/init.d/postgres)
> 4. Run /etc/init.d/postgres start
>    and run VACUUM ANALYZE - failed, no core file.

So there is something different about the environment of your postmaster
when it's started by init.d versus when it's started by hand.  Now you
just have to figure out what.

I thought of environment variables, ulimit settings,
ownership/permission settings ... but it's not clear why any of these
would affect VACUUM in particular yet leave you able to do other stuff
successfully.  Puzzling.
        regards, tom lane


RE: [HACKERS] VACUUM ANALYZE problem on linux

От
Oleg Broytmann
Дата:
Hello!

On Wed, 24 Feb 1999, Dan Gowin wrote:
> What user ID are you using? Are you "su"ing over
> the the postgres user ID.
  But of course!

> Also, make sure all of the environment variables
> are exported in the script. PGPORT, PGUSER, etc...
  I want to remind you and all who watch the thread: I have the problem
on 3 different glibc2 linucies - heavily modified Debain 2.0, newly
installed Debain 2.0 and modified RedHat 5.1. I have no problem with
sparc-solaris, and I have a report from Tom Lane he has no problem with
HP-UX.  IWB interesting to test libc5-linux...

> D.
> 
> -----Original Message-----
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
> Sent: Wednesday, February 24, 1999 1:35 PM
> To: phd2@earthling.net
> Cc: PostgreSQL-development
> Subject: Re: [HACKERS] VACUUM ANALYZE problem on linux 
> 
> 
> Oleg Broytmann <phd@sun.med.ru> writes:
> > 3. Run postmaster -b -D/usr/local/pgsql/data -o -Fe -S (to detach it)
> >    and run VACUUM ANALYZE - worked
> >    (I took these parameters from script /etc/init.d/postgres)
> > 4. Run /etc/init.d/postgres start
> >    and run VACUUM ANALYZE - failed, no core file.
> 
> So there is something different about the environment of your postmaster
> when it's started by init.d versus when it's started by hand.  Now you
> just have to figure out what.
> 
> I thought of environment variables, ulimit settings,
> ownership/permission settings ... but it's not clear why any of these
> would affect VACUUM in particular yet leave you able to do other stuff
> successfully.  Puzzling.
> 
>             regards, tom lane
> 

Oleg.
----    Oleg Broytmann     http://members.xoom.com/phd2/     phd2@earthling.net          Programmers don't die, they
justGOSUB without RETURN.
 



Re: [HACKERS] VACUUM ANALYZE problem on linux

От
Tom Lane
Дата:
Say, is it possible that your VACUUM problem is a locale-related bug?

If init runs with a different locale setting than hand-started
processes, then that would affect index ordering ... which could
perhaps cause fatal problems while vacuuming indexes.  I could
believe that VACUUM is not able to cope with indexes that appear
to be out of order according to the sort operators it's using.

This line of thought leads to the idea that indexes had better be
marked explicitly with the locale that they're for.  Or else we
need to change Postgres so that the locale setting is hard-wired
at compile time and not dependent on environment variables.
        regards, tom lane


Re: [HACKERS] VACUUM ANALYZE problem on linux

От
Oleg Broytmann
Дата:
Hi!

On Thu, 25 Feb 1999, Tom Lane wrote:
> Say, is it possible that your VACUUM problem is a locale-related bug?
  Hmm... May be.

> If init runs with a different locale setting than hand-started
> processes, then that would affect index ordering ... which could
> perhaps cause fatal problems while vacuuming indexes.  I could
> believe that VACUUM is not able to cope with indexes that appear
> to be out of order according to the sort operators it's using.
  I have no indexes in this database.  Looks like I need toreproduce the same env in command line. I'll try.

Oleg.
----    Oleg Broytmann     http://members.xoom.com/phd2/     phd2@earthling.net          Programmers don't die, they
justGOSUB without RETURN.
 



Re: [HACKERS] VACUUM ANALYZE problem on linux

От
Angelos Karageorgiou
Дата:
On Thu, 25 Feb 1999, Oleg Broytmann wrote:

> 
>    I have no indexes in this database.
>    Looks like I need toreproduce the same env in command line. I'll try.

why don't you create a sh script to start postgres out off, ans set -x and 
of cource a setenv etc.. Call the _SAME_ file from your init and from your 
command line and diff the results.

-- 
Incredible Networks LTD       Angelos Karageorgiou
20 Karea st,                  +30.1.92.12.312 (voice)
116 36 Athens, Greece.        +30.1.92.12.314 (fax)
http://www.incredible.com     angelos@incredible.com (e-mail)



Re: [HACKERS] VACUUM ANALYZE problem on linux

От
Bruce Momjian
Дата:
> Say, is it possible that your VACUUM problem is a locale-related bug?
> 
> If init runs with a different locale setting than hand-started
> processes, then that would affect index ordering ... which could
> perhaps cause fatal problems while vacuuming indexes.  I could
> believe that VACUUM is not able to cope with indexes that appear
> to be out of order according to the sort operators it's using.
> 
> This line of thought leads to the idea that indexes had better be
> marked explicitly with the locale that they're for.  Or else we
> need to change Postgres so that the locale setting is hard-wired
> at compile time and not dependent on environment variables.

That is an excellent point.  I never considered that.  In fact, initdb
would also need identical locale, wouldn't it.

--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


Re: [HACKERS] VACUUM ANALYZE problem on linux

От
"Ross J. Reedstrom"
Дата:
Oleg Broytmann wrote:

>    I have no indexes in this database.
>    Looks like I need toreproduce the same env in command line. I'll try.

This (locale of indices) still might be it - the system tables have
indices, which I believe get updated when you VACUUM (in fact, that's
kind of the point)

Ross
-- 
Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu> 
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St.,  Houston, TX 77005


Re: [HACKERS] VACUUM ANALYZE problem on linux

От
Oleg Broytmann
Дата:
Hi!

On Thu, 25 Feb 1999, Ross J. Reedstrom wrote:
> This (locale of indices) still might be it - the system tables have
  I recompiled postgres without locale, run initdb, load my dump - VACUUM
ANALYZE worked :(  I wonder, what may be wrong with locale support, that trigger only on
glibc2?

Oleg.
----    Oleg Broytmann     http://members.xoom.com/phd2/     phd2@earthling.net          Programmers don't die, they
justGOSUB without RETURN.