Flex is not a GNU package
The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/10/static/install-requirements.html Description: On the page https://www.postgresql.org/docs/10/static/install-requirements.html the line "GNU Flex and Bison are needed to build from a Git checkout..." should be changed to "Flex and Bison are needed to build from a Git checkout..." The reason is because Flex is not a GNU package; it is BSD-licensed and copyrighted by the University of California. Bison does not need to be explicitly identified as GNU Bison, because there is only one Bison and it is widely known as the GNU implementation of yacc. --- diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml index a922819..141494c 100644 --- a/doc/src/sgml/installation.sgml +++ b/doc/src/sgml/installation.sgml @@ -289,7 +289,7 @@ su - postgresyacc - GNUFlex andBison +Flex andBison are needed to build from a Git checkout, or if you changed the actual scanner and parser definition files. If you need them, be sure to getFlex 2.5.31 or later and
Re: Flex is not a GNU package
The comment form mangled my diff. --- diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml index a922819..141494c 100644 --- a/doc/src/sgml/installation.sgml +++ b/doc/src/sgml/installation.sgml @@ -289,7 +289,7 @@ su - postgres yacc - GNU Flex and Bison + Flex and Bison are needed to build from a Git checkout, or if you changed the actual scanner and parser definition files. If you need them, be sure to get Flex 2.5.31 or later and
MacPorts xsltproc is very slow?
Hi, Does anyone know why I'd see this difference in "make docs" performance? 1. On macOS using Apple's /usr/bin/xsltproc (--version says libxml 20902, libxslt 10128 and libexslt 817), it builds in a few minutes but produces warnings like this: postgres.sgml:408: element biblioentry: validity error : ID ston89b already defined postgres.sgml:426: element biblioentry: validity error : ID ston90a already defined postgres.sgml:454: element biblioentry: validity error : ID ston90b already defined 2. On macOS using MacPorts' /opt/local/bin/xsltproc (--version says libxml 20907, libxslt 10132 and libexslt 820), the xsltproc step runs for *half an hour* on my laptop. I have no idea what it's doing. With dtruss I see a bunch of madvise(MADV_CAN_REUSE) half of which fail with EINVAL, and a bunch of stat64("/opt/local/lib/libxslt-plugins/nwalsh_com_xslt_ext_com_nwalsh_saxon_UnwrapLinks.so\0"). Applying Alexander Law's patch[1] makes most of the latter go away but doesn't fix the run time problem. I noticed that the Apple version is using libxslt 1.1.28 (for context, that's the same as Debian Jessie used; Stretch/Buster/Sid are on 1.1.29 -- I'm guessing many of you are using that?), whereas MacPorts is shipping libxslt 1.1.32. I know next to nothing about these tools but I wonder if something we're doing gets horribly slow in future libxslt versions that will come down the pipeline on other distributions. Or if the MacPorts port is just borked somehow. For now I've uninstalled it and am ignoring the warnings from the Apple version (my other car is a FreeBSD where I can't build the docs at all since commit d6376245 because it's stuck with DocBooks 1.76.1). Any clues would be gratefully received. [1] https://www.postgresql.org/message-id/bfce8c4e-e200-9617-791a-4e05a054e698%40gmail.com -- Thomas Munro http://www.enterprisedb.com
Re: MacPorts xsltproc is very slow?
Hello Thomas, 25.11.2017 06:38, Thomas Munro wrote: Hi, Does anyone know why I'd see this difference in "make docs" performance? Can you show the output of make XSLTPROCFLAGS="--profile" -C doc/src/sgml/html or make XSLTPROCFLAGS="--profile" docs ? -- Alexander Lakhin Postgres Professional: http://www.postgrespro.com The Russian Postgres Company
Re: MacPorts xsltproc is very slow?
Thomas Munro writes: > Does anyone know why I'd see this difference in "make docs" performance? > 1. On macOS using Apple's /usr/bin/xsltproc (--version says libxml > 20902, libxslt 10128 and libexslt 817), it builds in a few minutes but > produces warnings like this: > postgres.sgml:408: element biblioentry: validity error : ID ston89b > already defined > postgres.sgml:426: element biblioentry: validity error : ID ston90a > already defined > postgres.sgml:454: element biblioentry: validity error : ID ston90b > already defined FWIW, I see no such warnings using the system xsltproc on either Sierra or High Sierra. Both of them show $ xsltproc --version Using libxml 20904, libxslt 10129 and libexslt 817 xsltproc was compiled against libxml 20904, libxslt 10129 and libexslt 817 libxslt 10129 was compiled against libxml 20904 libexslt 817 was compiled against libxml 20904 and build the HTML docs in about a minute and a half. > I noticed that the Apple version is using libxslt 1.1.28 (for context, > that's the same as Debian Jessie used; Stretch/Buster/Sid are on > 1.1.29 -- I'm guessing many of you are using that?), whereas MacPorts > is shipping libxslt 1.1.32. I know next to nothing about these tools > but I wonder if something we're doing gets horribly slow in future > libxslt versions that will come down the pipeline on other > distributions. Or if the MacPorts port is just borked somehow. This seems vaguely reminiscent of this recent discussion: https://www.postgresql.org/message-id/flat/8F33D0C7-E12E-4996-990C-3CF0C5ED0437%40filmlance.se in which the conclusion seemed to be that Apple's build of zlib was considerably faster than another build (of uncertain provenance, mind you, so maybe that is unrelated). I wonder whether Apple are using more aggressive optimization flags than other people. OTOH, while it would not surprise me if Apple put some work into making zlib go fast, it seems less likely that they'd expend effort or risk on xsltproc. regards, tom lane
Re: MacPorts xsltproc is very slow?
I wrote: > ... I wonder whether Apple are using more > aggressive optimization flags than other people. OTOH, while it would > not surprise me if Apple put some work into making zlib go fast, it > seems less likely that they'd expend effort or risk on xsltproc. I checked Fedora 26 and found that it's using an identical source version of xsltproc: $ xsltproc --version Using libxml 20904, libxslt 10129 and libexslt 817 xsltproc was compiled against libxml 20904, libxslt 10129 and libexslt 817 libxslt 10129 was compiled against libxml 20904 libexslt 817 was compiled against libxml 20904 Its time to build the HTML docs ... 46 seconds. This is on a machine intermediate in speed between the Sierra and High Sierra machines whose timings I quoted before. So we can definitively discard the idea that Apple sprinkled any magic pixie dust on their xsltproc build. Your MacPorts build is the outlier, leaving us with the theories that it was built at -O0 or there's a performance bug in the newer source releases. I have no doubt that xmlsoft.org would be interested if you can narrow it down to the latter. regards, tom lane
Re: MacPorts xsltproc is very slow?
On Sat, Nov 25, 2017 at 4:57 PM, Alexander Lakhin wrote: > Can you show the output of > make XSLTPROCFLAGS="--profile" -C doc/src/sgml/html > or > make XSLTPROCFLAGS="--profile" docs > ? Hi Alexander, please see attached. -- Thomas Munro http://www.enterprisedb.com macports-make-docs-log-profile.txt.gz Description: GNU Zip compressed data
Re: [DOCS] Docbook 5.x
Hello, 23.11.2017 17:53, Peter Eisentraut wrote: On 11/15/17 16:06, Peter Eisentraut wrote: Here is the final patch set for the conversion. I have committed this. Great! Thank you for your work! And in light of possible need to convert to xml older branches too, maybe we should simplify INSTALL now. Please, consider applying the attached patch. It produces the same INSTALL and is much better in the following aspects. 1. All the INSTALL content is placed in two files (installation.sgml and installation-single.xsl) instead of three (installation.sgml, standalone-install.xml, standalone-profile.xsl). 2. There are no unreadable and untranslatable (in context) constructions such as the PL/Python documentation (Sometimes translators need to replace larger fragments.) 3. It uses only XSLT (which we use already), no xi:include. 4. It doesn't generate complete postgres.sgml to process only the installation section. I understand that it will take some time to review it, but I think it's justified by the portability and supportability reasons. Best regards, -- Alexander Lakhin Postgres Professional: http://www.postgrespro.com The Russian Postgres Company diff --git a/doc/src/sgml/Makefile b/doc/src/sgml/Makefile index f122b41..0cf3afe 100644 --- a/doc/src/sgml/Makefile +++ b/doc/src/sgml/Makefile @@ -111,13 +111,8 @@ LYNX = lynx INSTALL: % : %.html $(PERL) -p -e 's, $@ -INSTALL.html: %.html : stylesheet-text.xsl %.xml - $(XMLLINT) --noout --valid $*.xml - $(XSLTPROC) $(XSLTPROCFLAGS) $(XSLTPROC_HTML_FLAGS) $^ >$@ - -INSTALL.xml: standalone-profile.xsl standalone-install.xml postgres.sgml $(ALLSGML) - $(XSLTPROC) $(XMLINCLUDE) $(XSLTPROCFLAGS) --xinclude $(wordlist 1,2,$^) >$@ - +INSTALL.html: installation.sgml installation-single.xsl stylesheet-text.xsl + sed -e "s/&version;/$(VERSION)/" $< | $(XSLTPROC) $(XSLTPROCFLAGS) $(word 2,$^) - | $(XSLTPROC) $(XSLTPROCFLAGS) $(XSLTPROC_HTML_FLAGS) $(word 3,$^) - >$@ ## ## HTML diff --git a/doc/src/sgml/installation-single.xsl b/doc/src/sgml/installation-single.xsl new file mode 100644 index 000..d8f45b5 --- /dev/null +++ b/doc/src/sgml/installation-single.xsl @@ -0,0 +1,202 @@ + + +%version; +]> + +http://www.w3.org/1999/XSL/Transform"; +version="1.0"> + + + +http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"/> + + + + + + + + + + + PostgreSQL Installation from Source Code + + + This document describes the installation of + PostgreSQL using this source code distribution. + + + + + + + + + Getting Started + + + The following is a quick summary of how to get PostgreSQL up and + running once installed. The main documentation contains more information. + + + + + + Create a user account for the PostgreSQL + server. This is the user the server will run as. For production + use you should create a separate, unprivileged account + (postgres is commonly used). If you do not have root + access or just want to play around, your own user account is + enough, but running the server as root is a security risk and + will not work. +adduser postgres + + + + + + Create a database installation with the initdb + command. To run initdb you must be logged in to your + PostgreSQL server account. It will not work as + root. +root# mkdir /usr/local/pgsql/data +root# chown postgres /usr/local/pgsql/data +root# su - postgres +postgres$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data + + + + The -D option specifies the location where the data + will be stored. You can use any path you want, it does not have + to be under the installation directory. Just make sure that the + server account can write to the directory (or create it, if it + doesn't already exist) before starting initdb, as + illustrated here. + + + + + + At this point, if you did not use the initdb -A + option, you might want to modify pg_hba.conf to control + local access to the server before you start it. The default is to + trust all local users. + + + + + + The previous initdb step should have told you how to + start up the database server. Do so now. The command should look + something like: +/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data + This will start the server in the foreground. To put the server + in the background use something like: +nohup /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data \ +>server.log 2>&1
Re: MacPorts xsltproc is very slow?
25.11.2017 07:49, Thomas Munro wrote: On Sat, Nov 25, 2017 at 4:57 PM, Alexander Lakhin wrote: Can you show the output of make XSLTPROCFLAGS="--profile" -C doc/src/sgml/html or make XSLTPROCFLAGS="--profile" docs ? Hi Alexander, please see attached. Thanks! Just to compare your results with my: number match name mode Calls Tot 100us Avg 0 d:appendix label.markup 22503 70018988 3111 1 chunk-all-sections 1394 36361616 26084 2 d:chapter label.markup 24918 20792834 834 3 href.target 23895 18556477 776 4 footer.navigation 1394 5276429 3785 5 header.navigation 1394 5095535 3655 6 gentext.template 237071 857659 3 vs number match name mode Calls Tot 100us Avg 0 gentext.template 247659 742878 2 1 chunk-all-sections 1394 705195 505 2 href.target 35446 663090 18 I wonder, what version of docbook-xsl are you using? (I have 1.79.1+dfsg-1). Can you check with 1.79+ (if yours is older)? -- Alexander Lakhin Postgres Professional: http://www.postgrespro.com The Russian Postgres Company