Re: [HACKERS] [DOCS] max_worker_processes on the standby

2015-10-30 Thread Robert Haas
On Thu, Oct 29, 2015 at 5:41 PM, Fujii Masao  wrote:
> I found another strange behavior on track_commit_timestamp.
> Here are the steps to reproduce it.
>
> 1. Start the master and standby servers with track_commit_timestamp enabled.
> Since committs is activated in standby, pg_last_committed_xact() can
> successfully return the timestamp of last transaction as expected.
>
> 2. Disable track_commit_timestamp in the master and restart the master server.
> The parameter-change WAL record is streamed to the standby and committs
> is deactivated. pg_last_committed_xact() causes an ERROR in the standby.
>
> 3. Run checkpoint in the master.
>
> 4. Run restartpoint in the standby after the checkpoint WAL record generated
> in #3 is replicated to the standby.
>
> 5. Restart the standby server.
> Committs is activated in the standby because track_commit_timestamp is
> enabled.

This seems wrong already at this point.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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


Re: [DOCS] Moving documentation to XML

2015-10-30 Thread Alexander Lakhin

Hello, Guillaume.

We have plans to use this for russian translation, too. We translate the 
docs by converting (with xml2po) the single xml to postgres-ru.po and 
after translating it we convert it back to xml (we get postres-ru.xml 
here).  (Until now we had to perform one more conversion 
(postgres-ru.xml -> set of sgml's).)

So now we can get russian html/* with:
python xml2po.py -l ru -k -p postgres-ru.po postgres.xml >postgres-ru.xml
xsltproc --stringparam pg.version '9.4.1'  stylesheet.xsl postgres-ru.xml

But I had some doubts about DSSSL and XSL differences. As I noted 
previously there was at least one visible difference. So I decided to 
customize XSL templates to make sure that html's are generated without a 
loss or corruption.
I thought that comparing two HTML sources will not work, as they are too 
different, but maybe we can compare text generated from html by lynx, 
for example.

So I use the following procedure to look for differences:
0. Get dsssl-generated html's
make html
1. Extract text content from html's:
 for f in html/*.html; do fn=`basename $f`; echo $fn; cat $f | perl 
-0pi -pe 's/Note:\s*<\/B\s*>/\Note<\/h3>/g' | perl -0pi -pe 
's/>/tmp/$fn; lynx /tmp/$fn --dump 
>html-text/$fn;
* Some differences are not significant so it's not reasonable to modify 
XSL templates to eliminate them. Difference in "Note" placement and 
spelling is one of them, so I just filter it out.

2. Rename html to html-o and html-text to html-o-text.
3. Generate html's with XSL (use modified templates):
rm -r html; xsltproc --stringparam pg.version '9.4.1' stylesheet.xsl 
postgres.xml

4. Extract text content from html's as above.
5. Make sure that two text html's are identical:
diff -s -u -b -I '^\s*_\+\s*$' html-o-text/xtypes.html html-text/xtypes.html
* Differences in whitespaces and length of "" lines are not 
significant, too.


For now, I've managed to get the same xtypes.html (I tested my XSL 
customizations with it), but I think, we can eliminate other most 
outstanding (or maybe all) differences likewise.

I can describe XSL customizations in more details, if needed.

Best regards,
Alexander

P.S. I couldn't post the message as a reply due to error on the 
postgresql.org side.
(: host makus.postgresql.org[174.143.35.229] 
said:
550 Message headers fail syntax check (in reply to end of DATA 
command))



28.10.2015 14:46, Guillaume Lelarge wrote:


Le 26 oct. 2015 6:40 PM, "Alexander Lakhin"  
a écrit :

>
...
> To make sure that result of the transformation is the same, I've 
compared original .html's with .html's generated with modified templates.
> Unfortunately xslt generates random id's, so it's needed to exclude 
them before comparing. I do that with:
> for f in */*.html; do sed -e 
's/id=\"\(ftn\.\)\?id[a-z][0-9]\+\"/id=\"id\"/g' -i $f ; sed -e 
's/href=\"[^#]*#\(ftn\.\)\?id[a-z][0-9]\+\"/href=\"#\"/g' -i $f; done

>
>
> So if it's acceptable way to speed up generation of HTML (and maybe 
some other formats), what other steps should we take to move away from 
SGML?
> If the performance is still not satisfying, please let me know, I'll 
continue to optimize xslt.
> Beside performance issues, I can see some difference in results of 
'make html' and 'make xslthtml'. For example, see 
doc/src/sgml/html/spi.html (xslt-generated version doesn't contain the 
lists of functions).

>

What you've done is awesome. I can't wait to test it on the french 
translation.


Nice work!



diff --git a/doc/src/sgml/stylesheet-xhtml-dsssl-like.xsl b/doc/src/sgml/stylesheet-xhtml-dsssl-like.xsl
new file mode 100644
index 000..95ca042
--- /dev/null
+++ b/doc/src/sgml/stylesheet-xhtml-dsssl-like.xsl
@@ -0,0 +1,266 @@
+
+http://www.w3.org/1999/XSL/Transform";
+xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0";
+version="1.0"
+xmlns="http://www.w3.org/1999/xhtml";
+exclude-result-prefixes="#default">
+
+
+
+  
+  
+  
+
+  
+  
+
+  
+  
+
+  
+
+  
+
+  
+
+  
+  
+
+  
+
+  
+
+
+  
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+
+  
+
+  
+
+ 
+  
+  
+
+  
+
+  
+
+  
+
+  
+  
+
+  
+
+  
+   
+
+  
+  
+
+  
+
+  
+ 

[DOCS] Obsolete advocacy for E-style strings in regexp documentation

2015-10-30 Thread Tom Lane
func.sgml has this bit near line 4660:

   

 Keep in mind that an escape's leading \ will need to be
 doubled when entering the pattern as an SQL string constant.  For example:

'123' ~ E'^\\d{3}' true


   

This advice was surely helpful when it was written, but nowadays it's just
advocating use of gratuitously non-SQL-standard string literal syntax.
I propose just deleting the whole  in HEAD, and maybe 9.5 too.

A more aggressive approach would be to get rid of use of E-style literals
in all/most of the documentation examples.  I'm *not* advocating that,
at least not yet.  But this particular bit seems to be going out of its
way to give obsolete advice.

Thoughts?

regards, tom lane


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