Re: [DOCS] Docbook 5.x

2017-09-27 Thread Peter Eisentraut
On 9/20/17 09:00, Alexander Lakhin wrote:
> I would like to place such alternate text in an attribute 
> "standalonetext" or alike, but DocBook 4.x doesn't allow for extra 
> attributes, so we need to choose from: 
> http://tdg.docbook.org/tdg/4.5/ref-elements.html#common.attributes
> So I decided to make alternative use of xreflabel attribute. (I believe 
> that we could find something more appropriate after migrating from 
> Docbook 4.2 to 5.x).)

Yeah, but that's a bit of a hack isn't it?  I also don't see anything in
DocBook 5 that indicates to me that we could get rid of that hack then.

In the interest of moving things along, I have committed my patch and
will continue working on the rest of the patch set.

Improvements are welcome and can be submitted separately, but I think
it's hardly worth it because this stuff changes so rarely.

-- 
Peter Eisentraut  http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
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] Docbook 5.x

2017-09-27 Thread Alexander Lakhin

Hello,
27.09.2017 18:38, Peter Eisentraut wrote:

On 9/20/17 09:00, Alexander Lakhin wrote:

I would like to place such alternate text in an attribute
"standalonetext" or alike, but DocBook 4.x doesn't allow for extra
attributes, so we need to choose from:
http://tdg.docbook.org/tdg/4.5/ref-elements.html#common.attributes
So I decided to make alternative use of xreflabel attribute. (I believe
that we could find something more appropriate after migrating from
Docbook 4.2 to 5.x).)

Yeah, but that's a bit of a hack isn't it?  I also don't see anything in
DocBook 5 that indicates to me that we could get rid of that hack then.

I found a more appropriate way for using an extra attribute:
http://www.sagehill.net/docbookxsl/AddProfileAtt.htm
I've tested it with "standalone" attribute and it works (for Docbook 4.2).
May be it will decrease hackiness level of the solution?
If it's not too late I could prepare a new patchset today.

In the interest of moving things along, I have committed my patch and
will continue working on the rest of the patch set.

Improvements are welcome and can be submitted separately, but I think
it's hardly worth it because this stuff changes so rarely.
But with such approach we should translate that .xsl too and it seems 
rather strange, isn't it?


--
Alexander Lakhin
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company




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


[DOCS] RECURSIVE update

2017-09-27 Thread zszmigiero
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/9.5/static/sql-createview.html
Description:

Please add information that RECURSIVE option in CREATE VIEW cannot be joined
with CHECK OPTION

-- 
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] can't reproduce example

2017-09-27 Thread Herve Duchesne

You are right,

CREATE EXTENSION btree_gist;

the command failed because I was not superuser. I did it as postgres 
user and It works now.


Thanks.



Le 22/09/2017 à 17:47, Tom Lane a écrit :

he...@duchesne.me writes:

I tried to reproduce the example :
CREATE EXTENSION btree_gist;
CREATE TABLE room_reservation (
 room text,
 during tsrange,
 EXCLUDE USING GIST (room WITH =, during WITH &&)
);
but I got this error :
ERROR:  data type text has no default operator class for access method
"gist"

It works for me.  You sure you installed the extension successfully?

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


[DOCS] add details in trigger's infinite recursion warnings

2017-09-27 Thread lisael
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/10/static/trigger-definition.html
Description:

https://www.postgresql.org/docs/10/static/trigger-definition.html reads "It
is the trigger programmer's responsibility to avoid infinite recursion in
such scenarios." It would be neat to mention here pg_trigger_depth() which
is somewhat barely known.

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


[DOCS] Wrong COPY command synopsis

2017-09-27 Thread petr . lancaric
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/9.1/static/sql-copy.html
Description:

Postgres psql (PostgreSQL) 9.5.4

Wrong COPY command synopsis:

1. comma is not an options separator { ...( option [, ...]  ... }
2. FORMAT is not a kewyword {... FORMAT format_name ... }


Following two commands should be valid after synopsis, but they are not: 

gis=# COPY gis_entity FROM '/tmp/podl_db_city.csv' DELIMITER 
',', FORMAT
csv;
ERROR:  syntax error at or near ","
LINE 1: ..._entity FROM '/tmp/podl_db_city.csv' DELIMITER ',', 
FORMAT c...
  
   ^
gis=# COPY gis_entity FROM '/tmp/podl_db_city.csv' DELIMITER 
',' FORMAT
csv;
ERROR:  syntax error at or near "FORMAT"
LINE 1: ...entity FROM '/tmp/podl_db_city.csv' DELIMITER ',' 
FORMAT csv...
 ^





-- 
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] Wrong COPY command synopsis

2017-09-27 Thread David G. Johnston
On Wed, Sep 27, 2017 at 4:01 AM,  wrote:

> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/9.1/static/sql-copy.html
> Description:
>
> Postgres psql (PostgreSQL) 9.5.4
>
> Wrong COPY command synopsis:
>
> 1. comma is not an options separator { ...( option [, ...]  ... }
> 2. FORMAT is not a kewyword {... FORMAT format_name ... }
>
>
> Following two commands should be valid after synopsis, but they are not:
>
> gis=# COPY gis_entity FROM '/tmp/podl_db_city.csv' DELIMITER
> ',', FORMAT
> csv;
> ERROR:  syntax error at or near ","
> LINE 1: ..._entity FROM '/tmp/podl_db_city.csv' DELIMITER
> ',', FORMAT c...
>
>^
> gis=# COPY gis_entity FROM '/tmp/podl_db_city.csv' DELIMITER
> ',' FORMAT
> csv;
> ERROR:  syntax error at or near "FORMAT"
> LINE 1: ...entity FROM '/tmp/podl_db_city.csv' DELIMITER
> ',' FORMAT csv...
>

​The parentheses surrounding the options are not optional.  Personally I
like to include the WITH.

COPY gis_entity FROM 'file.csv​' WITH ( FORMAT csv );

David J.


Re: [DOCS] Docbook 5.x

2017-09-27 Thread Alexander Lakhin

27.09.2017 19:11, Alexander Lakhin wrote:

In the interest of moving things along, I have committed my patch and
will continue working on the rest of the patch set.

Improvements are welcome and can be submitted separately, but I think
it's hardly worth it because this stuff changes so rarely.
But with such approach we should translate that .xsl too and it seems 
rather strange, isn't it?

Improved patch attached.



pg-doc.check+.tar.bz2
Description: application/bzip

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


[DOCS] adduser is missing --system

2017-09-27 Thread jens
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/9.6/static/install-short.html
Description:

Hi,

regarding
https://www.postgresql.org/docs/9.6/static/install-short.html

adduser postgres
should be
adduser --system postgres

otherwise you might face
*PANIC: queueing for lock while waiting on another one

due to systemd Config with RemoveIPC=true

Kind regards,
Jens

-- 
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] adduser is missing --system

2017-09-27 Thread Michael Paquier
On Thu, Sep 28, 2017 at 6:33 AM,   wrote:
> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/9.6/static/install-short.html
> Description:
>
> Hi,
>
> regarding
> https://www.postgresql.org/docs/9.6/static/install-short.html
>
> adduser postgres
> should be
> adduser --system postgres
>
> otherwise you might face
> *PANIC: queueing for lock while waiting on another one
>
> due to systemd Config with RemoveIPC=true

This part of the documentation is really aimed at being short. Please
note as well that this has been added to the documentation of Postgres
10 with this commit:
commit: fbe7a3fa45f360e73ce141e51005a3e86cd1926c
author: Peter Eisentraut 
date: Wed, 15 Feb 2017 10:46:31 -0500
doc: Add advice about systemd RemoveIPC

Reviewed-by: Magnus Hagander 

Here is the link to it:
https://www.postgresql.org/docs/devel/static/kernel-resources.html#systemd-removeipc
And the important quote:
"Packaging and deployment scripts should be careful to create the
postgres user as a system user by using useradd -r, adduser --system,
or equivalent."
-- 
Michael


-- 
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] adduser is missing --system

2017-09-27 Thread Tom Lane
Michael Paquier  writes:
> Please note as well that this has been added to the documentation of Postgres
> 10 with this commit:

Yeah.  I think Peter should back-patch that, but he hasn't yet.

The issue might be moot as of v10 anyway, because of this other commit:

Author: Tom Lane 
Branch: master Release: REL_10_STABLE [ecb0d20a9] 2016-10-09 18:03:45 -0400

Use unnamed POSIX semaphores, if available, on Linux and FreeBSD.

We've had support for using unnamed POSIX semaphores instead of System V
semaphores for quite some time, but it was not used by default on any
platform.  Since many systems have rather small limits on the number of
SysV semaphores allowed, it seems desirable to switch to POSIX semaphores
where they're available and don't create performance or kernel resource
problems.  Experimentation by me shows that unnamed POSIX semaphores
are at least as good as SysV semaphores on Linux, and we previously had
a report from Maksym Sobolyev that FreeBSD is significantly worse with
SysV semaphores than POSIX ones.  So adjust those two platforms to use
unnamed POSIX semaphores, if configure can find the necessary library
functions.  If this goes well, we may switch other platforms as well,
but it would be advisable to test them individually first.

We didn't think about the systemd angle at the time, but this change
might make PG reasonably systemd-proof even without direct protection
from RemoveIPC.  I've not tried to experiment though.

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


Re: [DOCS] adduser is missing --system

2017-09-27 Thread Tom Lane
I wrote:
> The issue might be moot as of v10 anyway, because of this other commit:

Ah, scratch that, I'd forgotten the discussion here:

https://www.postgresql.org/message-id/flat/32387.1481079186%40sss.pgh.pa.us

The switch to unnamed POSIX semaphores will help, but it's not a complete
fix because default-configured systemd will still break DSM usage.  In
practice I think that means that parallel queries launching at the same
moment you log out will fail.  That's way more survivable than the
semaphores going away, but it's still not very nice.

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