Re: 7.2 is slow? [compile problem]

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: 7.2 is slow? [compile problem]
Дата
Msg-id 200112200240.fBK2e9x02500@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: 7.2 is slow? [compile problem]  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Ответы Re: 7.2 is slow? [compile problem]  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
OK, I just committed a fix.  MIN() was used in the pretty node print
patch;  should have been Min().

---------------------------------------------------------------------------

> I just got the same problem on latest CVS on freebsd/i386
> 
> gmake[4]: Entering directory `/home/chriskl/pgsql/src/backend/utils/time'
> gcc -pipe -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../.
> ./src/include   -c -o tqual.o tqual.c
> /usr/libexec/elf/ld -r -o SUBSYS.o tqual.o
> gmake[4]: Leaving directory `/home/chriskl/pgsql/src/backend/utils/time'
> /usr/libexec/elf/ld -r -o SUBSYS.o fmgrtab.o adt/SUBSYS.o cache/SUBSYS.o
> error/SUBSYS.o fmgr/SUBSYS.o hash/SUBSYS.o init/SUBSYS.o misc/SUBS
> YS.o mmgr/SUBSYS.o sort/SUBSYS.o time/SUBSYS.o
> gmake[3]: Leaving directory `/home/chriskl/pgsql/src/backend/utils'
> gcc -pipe -O2 -Wall -Wmissing-prototypes -Wmissing-declarations  -R/home/chr
> iskl/local/lib -export-dynamic access/SUBSYS.o bootstrap/SUBSYS
> .o catalog/SUBSYS.o parser/SUBSYS.o commands/SUBSYS.o executor/SUBSYS.o
> lib/SUBSYS.o libpq/SUBSYS.o main/SUBSYS.o nodes/SUBSYS.o optimizer/
> SUBSYS.o port/SUBSYS.o postmaster/SUBSYS.o regex/SUBSYS.o rewrite/SUBSYS.o
> storage/SUBSYS.o tcop/SUBSYS.o utils/SUBSYS.o -lz -lcrypt -lcomp
> at -lm -lutil -lreadline  -o postgres
> nodes/SUBSYS.o: In function `pprint':
> nodes/SUBSYS.o(.text+0xda71): undefined reference to `MIN'
> nodes/SUBSYS.o(.text+0xdade): undefined reference to `MIN'
> gmake[2]: *** [postgres] Error 1
> gmake[2]: Leaving directory `/home/chriskl/pgsql/src/backend'
> gmake[1]: *** [all] Error 2
> gmake[1]: Leaving directory `/home/chriskl/pgsql/src'
> gmake: *** [all] Error 2
> 
> Chris
> 
> > -----Original Message-----
> > From: pgsql-hackers-owner@postgresql.org
> > [mailto:pgsql-hackers-owner@postgresql.org]On Behalf Of Ashley Cambrell
> > Sent: Thursday, 20 December 2001 8:51 AM
> > To: Tom Lane
> > Cc: pgsql-hackers@postgresql.org
> > Subject: Re: [HACKERS] 7.2 is slow? [compile problem]
> >
> >
> > I haven't actually tried to compile 7.2 from the CVS, but there seems to
> > be a problem?  [maybe on my side]
> >
> > make[3]: Leaving directory
> > `/home/ash/ash-server/Work/build/pgsql/src/backend/utils'
> > gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations
> > -Wl,-rpath,/tmp//lib -export-dynamic access/SUBSYS.o bootstrap/SUBSYS.o
> > catalog/SUBSYS.o parser/SUBSYS.o commands/SUBSYS.o executor/SUBSYS.o
> > lib/SUBSYS.o libpq/SUBSYS.o main/SUBSYS.o nodes/SUBSYS.o
> > optimizer/SUBSYS.o port/SUBSYS.o postmaster/SUBSYS.o regex/SUBSYS.o
> > rewrite/SUBSYS.o storage/SUBSYS.o tcop/SUBSYS.o utils/SUBSYS.o -lz
> > -lcrypt -lresolv -lnsl -ldl -lm -lreadline  -o postgres
> > nodes/SUBSYS.o: In function `pprint':
> > nodes/SUBSYS.o(.text+0xdc95): undefined reference to `MIN'
> > nodes/SUBSYS.o(.text+0xdcfd): undefined reference to `MIN'
> > collect2: ld returned 1 exit status
> > make[2]: *** [postgres] Error 1
> > make[2]: Leaving directory
> > `/home/ash/ash-server/Work/build/pgsql/src/backend'
> > make[1]: *** [all] Error 2
> > make[1]: Leaving directory `/home/ash/ash-server/Work/build/pgsql/src'
> > make: *** [all] Error 2
> >
> > In ./src/backend/nodes/print.c:
> >
> > /* outdent */
> > if (indentLev > 0)
> > {
> >     indentLev--;
> >     indentDist = MIN(indentLev * INDENTSTOP, MAXINDENT);
> > }
> >
> >
> > If I add
> > #ifndef MIN
> > #define MIN(a,b) (((a)<(b)) ? (a) : (b))
> > #endif
> > to print.c it compiles fine.
> >
> > Ashley Cambrell
> >
> >
> > <snip>
> >
> > >
> > >That's annoying.  The LWLock changes were intended to solve the
> > >inefficiency with multiple CPUs, but it seems like we still have a
> > >problem somewhere.
> > >
> > >Could you recompile the backend with profiling enabled and try to get
> > >a profile from your test case?  To build a profilable backend, it's
> > >sufficient to do
> > >
> > >    cd .../src/backend
> > >    gmake clean
> > >    gmake PROFILE=-pg all
> > >    gmake install-bin
> > >
> > >(assuming you are using gcc).  Then restart the postmaster, and you
> > >should notice "gmon.out" files being dropped into the various database
> > >subdirectories anytime a backend exits.  Next run your test case,
> > >and as soon as it finishes copy the gmon.out file to a safe place.
> > >(You'll only be able to get the profile from the last process to exit,
> > >so try to make sure that this is representative.  Might be worth
> > >repeating the test a few times to make sure that the results don't
> > >vary a whole lot.)  Finally, do
> > >
> > >    gprof .../bin/postgres gmon.out >resultfile
> > >
> > >to produce a legible result.
> > >
> > >Oh, one more thing: on Linuxen you are likely to find that all the
> > >reported routine runtimes are zero, rendering the results useless.
> > >Apply the attached patch (for 7.2beta) to fix this.
> > >
> > >            regards, tom lane
> > >
> > >*** src/backend/postmaster/postmaster.c.orig    Wed Dec 12 14:52:03 2001
> > >--- src/backend/postmaster/postmaster.c    Mon Dec 17 19:38:29 2001
> > >***************
> > >*** 1823,1828 ****
> > >--- 1823,1829 ----
> > >  {
> > >      Backend    *bn;                /* for backend cleanup */
> > >      pid_t        pid;
> > >+     struct itimerval svitimer;
> > >
> > >      /*
> > >       * Compute the cancel key that will be assigned to this backend. The
> > >***************
> > >*** 1858,1869 ****
> > >--- 1859,1874 ----
> > >      beos_before_backend_startup();
> > >  #endif
> > >
> > >+     getitimer(ITIMER_PROF, &svitimer);
> > >+
> > >      pid = fork();
> > >
> > >      if (pid == 0)                /* child */
> > >      {
> > >          int            status;
> > >
> > >+         setitimer(ITIMER_PROF, &svitimer, NULL);
> > >+
> > >          free(bn);
> > >  #ifdef __BEOS__
> > >          /* Specific beos backend startup actions */
> > >
> > >---------------------------(end of broadcast)---------------------------
> > >TIP 5: Have you checked our extensive FAQ?
> > >
> > >http://www.postgresql.org/users-lounge/docs/faq.html
> > >
> >
> >
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 4: Don't 'kill -9' the postmaster
> >
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
> 
> http://archives.postgresql.org
> 

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@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
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Christopher Kings-Lynne"
Дата:
Сообщение: Re: 7.2 is slow? [compile problem]
Следующее
От: Vince Vielhaber
Дата:
Сообщение: Re: Explicit config patch 7.2B4