Re: pg12 release notes

2019-05-13 Thread Bruce Momjian
On Mon, May 13, 2019 at 12:48:00PM -0500, Justin Pryzby wrote:
> On Fri, May 10, 2019 at 05:10:06PM +1200, David Rowley wrote:
> > On Fri, 10 May 2019 at 16:52, Justin Pryzby  wrote:
> > > I'm rechecking my list from last month.  What about these ?
> > >
> > > > c076f3d Remove pg_constraint.conincluding
> > > > bd09503 Increase the default vacuum_cost_limit from 200 to 2000
> > 
> > bd09503 was reverted in 52985e4fea7 and replaced by cbccac371, which
> > is documented already by:
> > 
> >  Reduce the default value of 
> > autovacuum_vacuum_cost_delay to 2ms (Tom Lane) 
> 
> Right, thanks.
> 
> I suspect c076f3d should be included, though.

This commit was part of a set of patches that forced a catalog version
changes in PG 11 in early September, 2018.

> |The many system tables with such columns will now display those columns with 
> SELECT * by default. 
> I think could be better:
> |SELECT * will now output those columns for the many system tables which have 
> them.
> |(previously, the columns weren't shown unless explicitly selected).

Good idea.  The new text is:

SELECT * will now output those columns for the many
system tables which have them.  Previously, the columns had to be 
selected
explicitly.

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+  Ancient Roman grave inscription +




Re: pg12 release notes

2019-05-13 Thread Michael Paquier
On Mon, May 13, 2019 at 12:48:00PM -0500, Justin Pryzby wrote:
> I suspect c076f3d should be included, though.

bd47c4a9 has removed pg_constraint.conincluding from REL_11_STABLE as
well.
--
Michael


signature.asc
Description: PGP signature


Re: pg12 release notes

2019-05-13 Thread Justin Pryzby
On Fri, May 10, 2019 at 05:10:06PM +1200, David Rowley wrote:
> On Fri, 10 May 2019 at 16:52, Justin Pryzby  wrote:
> > I'm rechecking my list from last month.  What about these ?
> >
> > > c076f3d Remove pg_constraint.conincluding
> > > bd09503 Increase the default vacuum_cost_limit from 200 to 2000
> 
> bd09503 was reverted in 52985e4fea7 and replaced by cbccac371, which
> is documented already by:
> 
>  Reduce the default value of 
> autovacuum_vacuum_cost_delay to 2ms (Tom Lane) 

Right, thanks.

I suspect c076f3d should be included, though.

Also,

|The many system tables with such columns will now display those columns with 
SELECT * by default. 
I think could be better:
|SELECT * will now output those columns for the many system tables which have 
them.
|(previously, the columns weren't shown unless explicitly selected).

Justin




Re: pg12 release notes

2019-05-11 Thread Bruce Momjian
On Sat, May 11, 2019 at 11:47:42AM -0700, Peter Geoghegan wrote:
> On Sat, May 11, 2019 at 11:02 AM Bruce Momjian  wrote:
> > OK, commit removed.
> 
> You're mistaken -- nothing has been pushed to master in the last 3 hours.

I am not mistaken.  I have removed it from my local copy, but have not
pushed it yet since I am adding links to the docs.  It will be done
today.

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+  Ancient Roman grave inscription +




Re: pg12 release notes

2019-05-11 Thread Peter Geoghegan
On Sat, May 11, 2019 at 11:02 AM Bruce Momjian  wrote:
> OK, commit removed.

You're mistaken -- nothing has been pushed to master in the last 3 hours.

-- 
Peter Geoghegan




Re: pg12 release notes

2019-05-11 Thread Bruce Momjian
On Sat, May 11, 2019 at 10:28:08AM -0700, Peter Geoghegan wrote:
> On Sat, May 11, 2019 at 7:40 AM Bruce Momjian  wrote:
> > > > > I think I have understood the nuances, as listed above --- I just 
> > > > > don't
> > > > > agree with the solution.
> > > >
> > > > To be clear, I don't expect you to agree with the solution.
> > > >
> > > > Another thing that you missed from my patch is that bugfix commit
> > > > 9b10926263d831fac5758f1493c929a49b55669b shouldn't be listed.
> > >
> > > Why should it not be listed?
> >
> > Thinking some more, I try to aggregate all the feature addition commits
> > together, but often skip "cleanups" of previous feature additions.  Are
> > you saying that 9b10926263d831fac5758f1493c929a49b55669b is a cleanup,
> > and not part of the feature addition?  It was not clear to me of
> > 9b10926263d831fac5758f1493c929a49b55669b was a further enhancement
> > made possible by previous commits, or a "fix" for a previous commit.
> 
> Yes. It's a bug fix that went in after feature freeze.

OK, commit removed.

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+  Ancient Roman grave inscription +




Re: pg12 release notes

2019-05-11 Thread Peter Geoghegan
On Sat, May 11, 2019 at 7:40 AM Bruce Momjian  wrote:
> > > > I think I have understood the nuances, as listed above --- I just don't
> > > > agree with the solution.
> > >
> > > To be clear, I don't expect you to agree with the solution.
> > >
> > > Another thing that you missed from my patch is that bugfix commit
> > > 9b10926263d831fac5758f1493c929a49b55669b shouldn't be listed.
> >
> > Why should it not be listed?
>
> Thinking some more, I try to aggregate all the feature addition commits
> together, but often skip "cleanups" of previous feature additions.  Are
> you saying that 9b10926263d831fac5758f1493c929a49b55669b is a cleanup,
> and not part of the feature addition?  It was not clear to me of
> 9b10926263d831fac5758f1493c929a49b55669b was a further enhancement
> made possible by previous commits, or a "fix" for a previous commit.

Yes. It's a bug fix that went in after feature freeze.

-- 
Peter Geoghegan




Re: pg12 release notes

2019-05-11 Thread Bruce Momjian
On Sat, May 11, 2019 at 10:36:13AM -0400, Bruce Momjian wrote:
> On Fri, May 10, 2019 at 07:31:21PM -0700, Peter Geoghegan wrote:
> > > I think I have understood the nuances, as listed above --- I just don't
> > > agree with the solution.
> > 
> > To be clear, I don't expect you to agree with the solution.
> > 
> > Another thing that you missed from my patch is that bugfix commit
> > 9b10926263d831fac5758f1493c929a49b55669b shouldn't be listed.
> 
> Why should it not be listed?

Thinking some more, I try to aggregate all the feature addition commits
together, but often skip "cleanups" of previous feature additions.  Are
you saying that 9b10926263d831fac5758f1493c929a49b55669b is a cleanup,
and not part of the feature addition?  It was not clear to me of
9b10926263d831fac5758f1493c929a49b55669b was a further enhancement
made possible by previous commits, or a "fix" for a previous commit.

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+  Ancient Roman grave inscription +




Re: pg12 release notes

2019-05-11 Thread Bruce Momjian
On Fri, May 10, 2019 at 07:31:21PM -0700, Peter Geoghegan wrote:
> On Fri, May 10, 2019 at 7:11 PM Bruce Momjian  wrote:
> > >  Whether or not you include more details is not what I care about here
> > > -- I *agree* that this is insignificant.
> 
> > Well, we can move the entire item up to the incompatibility section, but
> > that seems unbalanced since the incompatibility is so small relative to
> > the entire item, and it is rare, as you mentioned.  It also seems odd to
> > create a stand-alone incompatibility item that really is part of a later
> > item already in the release notes.
> 
> That is what we've always done. The list has always been very long,
> with individual items that are on average totally insignificant.
> Breaking with that pattern in this instance will be confusing to
> users.

I have no idea what you are suggesting above.

> > I think I have understood the nuances, as listed above --- I just don't
> > agree with the solution.
> 
> To be clear, I don't expect you to agree with the solution.
> 
> Another thing that you missed from my patch is that bugfix commit
> 9b10926263d831fac5758f1493c929a49b55669b shouldn't be listed.

Why should it not be listed?

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+  Ancient Roman grave inscription +




Re: pg12 release notes

2019-05-11 Thread Bruce Momjian
On Sat, May 11, 2019 at 03:06:40AM +0100, Andrew Gierth wrote:
> > "Bruce" == Bruce Momjian  writes:
>  Bruce> Do I need more?
> 
> That isn't quite how I'd have worded it, but I'm not sure what the best
> wording is. Something like:
> 
>  * Output REAL and DOUBLE PRECISION values in shortest-exact format by
>default, and change the behavior of extra_float_digits
> 
>Previously, float values were output rounded to 6 or 15 decimals by
>default, with the number of decimals adjusted by extra_float_digits.
>The previous rounding behavior is no longer the default, and is now
>done only if extra_float_digits is set to zero or less; if the value
>is greater than zero (which it is by default), a shortest-precise
>representation is output (for a substantial performance improvement).
>This representation preserves the exact binary value when correctly
>read back in, even though the trailing digits will usually differ
>from the output generated by previous versions when
>extra_float_digits=3.
> 
> But I'm not 100% happy with this wording and am entirely open to
> suggestions for improvement.

I went with this paragraph:

This dramatically speeds up processing of floating-point values but
causes additional trailing digits to potentially be displayed.  Users
wishing to have output that is rounded to match the previous behavior
can set extra_float_digits=0, which is no longer the
default.

Improvements?

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+  Ancient Roman grave inscription +




Re: pg12 release notes

2019-05-10 Thread Peter Geoghegan
On Fri, May 10, 2019 at 7:11 PM Bruce Momjian  wrote:
> >  Whether or not you include more details is not what I care about here
> > -- I *agree* that this is insignificant.

> Well, we can move the entire item up to the incompatibility section, but
> that seems unbalanced since the incompatibility is so small relative to
> the entire item, and it is rare, as you mentioned.  It also seems odd to
> create a stand-alone incompatibility item that really is part of a later
> item already in the release notes.

That is what we've always done. The list has always been very long,
with individual items that are on average totally insignificant.
Breaking with that pattern in this instance will be confusing to
users.

> I think I have understood the nuances, as listed above --- I just don't
> agree with the solution.

To be clear, I don't expect you to agree with the solution.

Another thing that you missed from my patch is that bugfix commit
9b10926263d831fac5758f1493c929a49b55669b shouldn't be listed.

> > As things stand, I feel like the question of authorship and credit
> > complicates the question of making the release notes useful, which is
> > unfortunate. (Not sure what can be done about that.)
>
> That part I always need big help with, particularly with multiple
> commits being lumped into a single release note entry.  I just can't
> tell which commit is more important when knowing what order to list the
> names.  I have that problem big-time with the partition commits.

I understand that it's a difficult job. It's inevitable that there
will need to be corrections. You don't appear to be particularly
receptive to feedback, which makes the process harder for everyone --
even in instances where you make the right call. I don't think that I
am alone in seeing it this way.

-- 
Peter Geoghegan




Re: pg12 release notes

2019-05-10 Thread Bruce Momjian
On Fri, May 10, 2019 at 06:53:55PM -0700, Peter Geoghegan wrote:
> On Fri, May 10, 2019 at 6:02 PM Bruce Momjian  wrote:
> > Have new btree indexes sort duplicate index entries in heap-storage
> > order (Peter Geoghegan)
> >
> > This slightly reduces the maximum-allowed length of indexed values.
> > ---
> > Indexes pg_upgraded from previous releases will not have this 
> > ordering.
> >
> > I don't think more details are really needed.
> 
>  Whether or not you include more details is not what I care about here
> -- I *agree* that this is insignificant.
> 
> I think that the maximum allowed length thing should be listed in the
> compatibility section as a formality -- not alongside the point that
> the feature is listed. I had better be correct in that general
> assessment, because it's not possible to opt out of the restriction
> within CREATE INDEX. That was my point here.

Well, we can move the entire item up to the incompatibility section, but
that seems unbalanced since the incompatibility is so small relative to
the entire item, and it is rare, as you mentioned.  It also seems odd to
create a stand-alone incompatibility item that really is part of a later
item already in the release notes.

> > What we have already seems like enough detail:
> >
> > Improve speed of btree index insertions (Alexander Korotkov,
> > Peter Geoghegan)
> 
> Why?
> 
> I think that it's unfortunate that Heikki wasn't given an authorship
> credit here, as proposed in my patch. I think that he deserves it.

I did not notice that change.  I have added him.

> > Locking speed seems like an implementation detail.
> 
> They're all implementations details, though. If that was the actual
> standard, then few or no "indexing" items would be listed.
> 
> > You have given me very good detail, so the new text is:
> >
> > Improve speed of btree index insertions (Alexander Korotkov, Peter
> > Geoghegan)
> >
> > The new code improves the space-efficiency of page splits, reduces
> > locking
> > overhead, and gives better performance for 
> > UPDATEs
> > and DELETEs on indexes with many duplicates.
> 
> I can live with that.
> 
> I'm not trying to be difficult -- reasonable people can disagree on
> the level of detail that is appropriate (they can even have radically
> different ideas about where to draw the line). And, I would expect it
> to be a little arbitrary under the best of circumstances, no matter
> who was tasked with writing the release notes. However, I think the
> process would be easier and more effective if you took more time to
> understand the concerns behind the feedback you get. There are
> sometimes important nuances.

I think I have understood the nuances, as listed above --- I just don't
agree with the solution.

> As things stand, I feel like the question of authorship and credit
> complicates the question of making the release notes useful, which is
> unfortunate. (Not sure what can be done about that.)

That part I always need big help with, particularly with multiple
commits being lumped into a single release note entry.  I just can't
tell which commit is more important when knowing what order to list the
names.  I have that problem big-time with the partition commits.

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+  Ancient Roman grave inscription +




Re: pg12 release notes

2019-05-10 Thread Andrew Gierth
> "Bruce" == Bruce Momjian  writes:

 >> I noticed that the compatibility note for Andrew Gierth's RYU
 >> floating point patch seems to simply say why the feature is useful.
 >> Shouldn't it be listed separately, and its impact on users upgrading
 >> be listed here instead?

 Bruce> The text is now in the incompatibility section:

 Bruce> http://momjian.us/pgsql_docs/release-12.html

 Bruce> Avoid performing unnecessary rounding of REAL and DOUBLE PRECISION
 Bruce> values (Andrew Gierth)

 Bruce> This dramatically speeds up processing of floating-point values, though
 Bruce> trailing digits are display slightly differently. Users who wish to have
 Bruce> 
 Bruce> output that is rounded can set extra_float_digits=0. 

 Bruce> Do I need more?

That isn't quite how I'd have worded it, but I'm not sure what the best
wording is. Something like:

 * Output REAL and DOUBLE PRECISION values in shortest-exact format by
   default, and change the behavior of extra_float_digits

   Previously, float values were output rounded to 6 or 15 decimals by
   default, with the number of decimals adjusted by extra_float_digits.
   The previous rounding behavior is no longer the default, and is now
   done only if extra_float_digits is set to zero or less; if the value
   is greater than zero (which it is by default), a shortest-precise
   representation is output (for a substantial performance improvement).
   This representation preserves the exact binary value when correctly
   read back in, even though the trailing digits will usually differ
   from the output generated by previous versions when
   extra_float_digits=3.

But I'm not 100% happy with this wording and am entirely open to
suggestions for improvement.

(In passing I've spotted some related typos in the body of the docs
which are probably my fault, I'll fix those.)

-- 
Andrew (irc:RhodiumToad)




Re: pg12 release notes

2019-05-10 Thread Peter Geoghegan
On Fri, May 10, 2019 at 6:02 PM Bruce Momjian  wrote:
> Have new btree indexes sort duplicate index entries in heap-storage
> order (Peter Geoghegan)
>
> This slightly reduces the maximum-allowed length of indexed values.
> ---
> Indexes pg_upgraded from previous releases will not have this 
> ordering.
>
> I don't think more details are really needed.

 Whether or not you include more details is not what I care about here
-- I *agree* that this is insignificant.

I think that the maximum allowed length thing should be listed in the
compatibility section as a formality -- not alongside the point that
the feature is listed. I had better be correct in that general
assessment, because it's not possible to opt out of the restriction
within CREATE INDEX. That was my point here.

> What we have already seems like enough detail:
>
> Improve speed of btree index insertions (Alexander Korotkov,
> Peter Geoghegan)

Why?

I think that it's unfortunate that Heikki wasn't given an authorship
credit here, as proposed in my patch. I think that he deserves it.

> Locking speed seems like an implementation detail.

They're all implementations details, though. If that was the actual
standard, then few or no "indexing" items would be listed.

> You have given me very good detail, so the new text is:
>
> Improve speed of btree index insertions (Alexander Korotkov, Peter
> Geoghegan)
>
> The new code improves the space-efficiency of page splits, reduces
> locking
> overhead, and gives better performance for UPDATEs
> and DELETEs on indexes with many duplicates.

I can live with that.

I'm not trying to be difficult -- reasonable people can disagree on
the level of detail that is appropriate (they can even have radically
different ideas about where to draw the line). And, I would expect it
to be a little arbitrary under the best of circumstances, no matter
who was tasked with writing the release notes. However, I think the
process would be easier and more effective if you took more time to
understand the concerns behind the feedback you get. There are
sometimes important nuances.

As things stand, I feel like the question of authorship and credit
complicates the question of making the release notes useful, which is
unfortunate. (Not sure what can be done about that.)

--
Peter Geoghegan




Re: pg12 release notes

2019-05-10 Thread Bruce Momjian
On Fri, May 10, 2019 at 03:34:15PM +1200, David Rowley wrote:
> On Fri, 10 May 2019 at 13:03, Bruce Momjian  wrote:
> >
> > On Thu, May  9, 2019 at 07:13:35PM -0500, Justin Pryzby wrote:
> > > On Thu, May 09, 2019 at 07:35:18PM -0400, Bruce Momjian wrote:
> > > > I have made your other changes, with adjustment, patch attached.
> > > >
> > > > The results are here:
> > > >
> > > > http://momjian.us/pgsql_docs/release-12.html
> 
> Hi Bruce,
> 
> Just a question about the item: "Allow IN comparisons with arrays to
> use IS NOT NULL partial indexes more frequently (Tom Lane)"
> 
> >From what I can tell this must refer to 65ce07e0202f. If so, I think
> James Coleman should be the author.

You are 100% correct, my apologies, fixed.

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+  Ancient Roman grave inscription +




Re: pg12 release notes

2019-05-10 Thread Bruce Momjian
On Thu, May  9, 2019 at 07:10:43PM -0700, Peter Geoghegan wrote:
> On Thu, May 9, 2019 at 6:03 PM Bruce Momjian  wrote:
> > These were all very helpful.  I adjusted your changes to create the
> > attached applied patch.  URL updated:
> 
> I noticed that the compatibility note for Andrew Gierth's RYU floating
> point patch seems to simply say why the feature is useful. Shouldn't
> it be listed separately, and its impact on users upgrading be listed
> here instead?

The text is now in the incompatibility section:

http://momjian.us/pgsql_docs/release-12.html

Avoid performing unnecessary rounding of REAL and DOUBLE PRECISION
values (Andrew Gierth)

This dramatically speeds up processing of floating-point values, though
trailing digits are display slightly differently. Users who wish to have

output that is rounded can set extra_float_digits=0. 

Do I need more?

> Separately, please find attached suggested changes for items I was
> involved in. I have attempted to explain them in a way that makes
> their relevance to users clearer. Even if you don't end up using my
> wording, you should still change the attribution along the same lines
> as the patch.
> 
> Also, I added a compatibility note for the new version of nbtree,
> which revises the "1/3 of a page" restriction downwards very slightly
> (by 8 bytes). FWIW, I think it's very unlikely that anyone will be
> affected, because tuples that are that wide are already compressed in
> almost all cases -- it seems like it would be hard to be just at the
> edge of the limit already.

I have that:

Have new btree indexes sort duplicate index entries in heap-storage
order (Peter Geoghegan)

This slightly reduces the maximum-allowed length of indexed values.
---
Indexes pg_upgraded from previous releases will not have this ordering. 

I don't think more details are really needed.

> +
> +
> +
> +
> +
> +
> +  Lower the limit on the size of new B-tree index tuples by 8 bytes
> +  (Peter Geoghegan)
> +
> +
> +
> +  The definition of the "1/3 of a page" restriction on new B-tree
> +  entries has been revised to account for the possible overhead of
> +  storing table TIDs in branch page keys.  Indexes in databases that
> +  are migrated using pg_upgrade are not affected, unless and until
> +  they are reindexed.
> +
>  

See above, already mentioned.

> -Improve speed of btree index insertions (Alexander Korotkov, Peter Geoghegan)
> +  Don't re-lock B-Tree leaf pages while inserting a new entry (Alexander 
> Korotkov)

What we have already seems like enough detail:

Improve speed of btree index insertions (Alexander Korotkov,
Peter Geoghegan) 

Locking speed seems like an implementation detail.

> +
> + Make B-tree index keys unique by treating table TID as a tiebreaker
> + column internally (Peter Geoghegan, Heikki Linnakangas)
>  
>  
>  
> - LOOKUP, INDEX CLEANUP IMPROVEMENTS?
> + The new approach has more predictable performance characteristics
> + with indexes that have many duplicate entries, particularly when
> + there are DELETEs or UPDATEs
> + that affect a large number of contiguous table rows.

You have given me very good detail, so the new text is:

Improve speed of btree index insertions (Alexander Korotkov, Peter
Geoghegan)

The new code improves the space-efficiency of page splits, reduces
locking
overhead, and gives better performance for UPDATEs
and DELETEs on indexes with many duplicates.

> +
> + Make more sophisticated decisions about where to split B-tree pages
> + (Peter Geoghegan)
> +
> +
> +
> + The algorithm for choosing B-tree split points now considers the
> + overall pattern of how new entries are inserted, which can result in
> + more free space being available where it is likely to be needed.
>  
>  

See above.

> -
> -Have new btree indexes sort duplicate index entries in heap-storage order 
> (Peter Geoghegan)
> -
> -
> -
> -Btree indexes pg_upgraded from previous releases will not have this 
> ordering.  This slightly reduces the maximum length of indexed values.
> -
> -

See above.

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+  Ancient Roman grave inscription +




Re: pg12 release notes

2019-05-10 Thread Bruce Momjian
On Thu, May  9, 2019 at 08:34:49PM -0500, Justin Pryzby wrote:
> On Thu, May 09, 2019 at 09:02:51PM -0400, Bruce Momjian wrote:
> > These were all very helpful.  I adjusted your changes to create the
> > attached applied patch.  URL updated:
> 
> Thanks.
> 
> > -Allow more comparisons with information_schema text columns to use indexes 
> > (Tom Lane)
> > +Allow more use of indexes for text columns comparisons with 
> > information_schema columns (Tom Lane)
> 
> I think "columns" should not be plural..but it could be better still:

I now realize "columns" is not necessary, so I removed it.

> |Allow use of indexes for more comparisons with text columns of 
> information_schema (Tom Lane)
> 
> Regarding this proposed change of mine:
> -Btree indexes pg_upgraded from previous releases will not have this 
> ordering.  This slightly reduces the maximum length of indexed values.
> +Btree indexes pg_upgraded from previous releases will not have this 
> ordering.  This slightly reduces the maximum permitted length of indexed 
> values.
> 
> I think "permitted" is important, since otherwise it sounds like maybe for
> whatever values are being indexed, their maximum length is reduced by this
> patch.  If you overthink it, you could decide that maybe that's happening due
> to use of prefix/suffix truncation or something ..

Agreed.  I changed it to "maximum-allowed length".  I also reordered the
paragraph.

> Should this one be listed twice ?  I tried to tell if it was intentional but
> couldn't decide..
> 249d64999 Add support TCP user timeout in libpq and the backend se

One is a server variable, the other a libpq option.

Applied patch attached.

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+  Ancient Roman grave inscription +
commit b299efaea4
Author: Bruce Momjian 
Date:   Fri May 10 20:25:52 2019 -0400

doc: PG 12 release note adjustment

Reported-by: Justin Pryzby

Discussion: https://postgr.es/m/20190510013449.gl3...@telsasoft.com

diff --git a/doc/src/sgml/release-12.sgml b/doc/src/sgml/release-12.sgml
new file mode 100644
index 26e842f..91f914e
*** a/doc/src/sgml/release-12.sgml
--- b/doc/src/sgml/release-12.sgml
*** Have new btree indexes sort duplicate in
*** 634,640 
  
  
  
! Btree indexes pg_upgraded from previous releases 
will not have this ordering.  This slightly reduces the maximum length of 
indexed values.
  
  
  
--- 634,640 
  
  
  
! This slightly reduces the maximum-allowed length of indexed values.  Indexes 
pg_upgraded from previous releases will not have 
this ordering.
  
  
  
*** Author: Tom Lane 
*** 1233,1239 
  -->
  
  
! Allow more use of indexes for text columns comparisons with 
information_schema columns (Tom Lane)
  
  
  
--- 1233,1239 
  -->
  
  
! Allow more use of indexes for text comparisons with 
information_schema columns (Tom Lane)
  
  
  


Re: pg12 release notes

2019-05-10 Thread Tom Lane
Alvaro Herrera  writes:
> Still, it's an inconsistency in pg11.  I vote -0 to getting it
> backpatched, mostly because it seems like more work than is warranted.
> (I think the work consists not only of testing that the backpatched
> commit works correctly, but also documenting for 11.4 release notes how
> to fix existing catalogs after upgrading.)

Yeah, I agree.  Even if we back-patched a code change, nothing could
rely on relhassubclass for this purpose in a v11 database, because
of not knowing whether the user actually bothered to manually update
pre-existing indexes' entries.  Better to know that it doesn't work
than to be unsure if it does.

regards, tom lane




Re: pg12 release notes

2019-05-10 Thread Alvaro Herrera
On 2019-May-10, Amit Langote wrote:

> On 2019/05/10 12:18, David Rowley wrote:
> > On Fri, 10 May 2019 at 12:08, Bruce Momjian  wrote:
> >>> 17f206f Set pg_class.relhassubclass for partitioned indexes
> >>
> >> I need help with this one.  I know the system column existed in previous
> >> releases, so how is it different now?  Do we document system table
> >> changes that are implementation-behavior in the release notes?  Usually
> >> we don't.

I very much doubt that the change is relevant to the release notes.

> > This appears to be fixing something that likely should have been done
> > in PG11, where partitioned indexes were added.
> 
> That's true.  We (Michael and I) felt the need to do this change, because
> it allowed the pg_partition_tree() code (which is also new in v12) to use
> the same infrastructure for both partitioned tables and indexes; checking
> the relhassubclass flag allows to short-circuit scanning pg_inherits to
> find out that there are no children.

I'm of two minds about backpatching that fix.  In pg12 it makes sense to
have the fix, to allow the SRF functions to work correctly.  Since we
don't use that flag for partitioned indexes anywhere in the backend in
pg11, it seems pretty useless to have it there.  On the other hand, if
any user tool is inspecting catalogs, it might fail to point out
descendants for partitioned indexes, if the user asked for a report...
but frankly I doubt there are any tools that do that, or users that care
for such a report, or even that that report exist ... and even if that
report existed, I doubt that it would optimize out the read of
pg_inherits by checking relhassubclass beforehand.  

Still, it's an inconsistency in pg11.  I vote -0 to getting it
backpatched, mostly because it seems like more work than is warranted.
(I think the work consists not only of testing that the backpatched
commit works correctly, but also documenting for 11.4 release notes how
to fix existing catalogs after upgrading.)

-- 
Álvaro Herrerahttps://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




Re: pg12 release notes

2019-05-09 Thread Amit Langote
Hi David,

On 2019/05/10 14:51, David Rowley wrote:
> On Fri, 10 May 2019 at 16:57, Justin Pryzby  wrote:
>>> 959d00e Use Append rather than MergeAppend for scanning ordered partitions.
> 
> I also think this is worth a mention.  The speedup can be quite large
> when the query involves a LIMIT clause, and I think it will apply
> fairly often. Most of the times I've seen partitioned table the wild
> they were RANGE partitioned by a timestamp, or at least they were
> inheritance based tables partitioned by timestamp that could one day
> be changed to a RANGE partitioned table.
> 
> I'd say something like:
> 
> * Allow the optimizer to exploit the ordering of RANGE and LIST
> partitioned tables when generating paths for partitioned tables.
> 
> This saves the optimizer from using MergeAppend node to scan a
> partitioned table in order when an Append node will do.

FWIW, I've asked [1] Bruce to mention this commit in its own release note
item.  Currently, it's buried under pruning performance improvement item,
like this.





Improve performance of pruning many partitions (Amit Langote, David
Rowley, Tom Lane, Álvaro Herrera)



Now thousands of partitions can be pruned efficiently.



Thanks,
Amit

[1]
https://www.postgresql.org/message-id/3f0333be-fd32-55f2-9817-5853a6bbd233%40lab.ntt.co.jp





Re: pg12 release notes

2019-05-09 Thread David Rowley
On Fri, 10 May 2019 at 16:57, Justin Pryzby  wrote:
> > 8edd0e7 Suppress Append and MergeAppend plan nodes that have a single child.

You could say that I'm biased, but I think this should get a mention.
It's not just a matter of tidying up the plan by getting rid of nodes
that are not requires, it allows plan shapes that were not possible
before, for example, a parallel index scan on the index of a partition
and the ability to not needlessly include a Materialize node in a
Merge Join or Nested Loop Join to a partitioned table, when only 1
partition survives pruning.

I'd say wording along the lines of:

* Allow the optimizer to no longer generate plans containing a single
sub-node Append/MergeAppend node.

This allows more plan types to be considered.

[...]


> > Perform:
> > 959d00e Use Append rather than MergeAppend for scanning ordered partitions.

I also think this is worth a mention.  The speedup can be quite large
when the query involves a LIMIT clause, and I think it will apply
fairly often. Most of the times I've seen partitioned table the wild
they were RANGE partitioned by a timestamp, or at least they were
inheritance based tables partitioned by timestamp that could one day
be changed to a RANGE partitioned table.

I'd say something like:

* Allow the optimizer to exploit the ordering of RANGE and LIST
partitioned tables when generating paths for partitioned tables.

This saves the optimizer from using MergeAppend node to scan a
partitioned table in order when an Append node will do.

-- 
 David Rowley   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services




Re: pg12 release notes

2019-05-09 Thread David Rowley
On Fri, 10 May 2019 at 16:52, Justin Pryzby  wrote:
> I'm rechecking my list from last month.  What about these ?
>
> > c076f3d Remove pg_constraint.conincluding
> > bd09503 Increase the default vacuum_cost_limit from 200 to 2000

bd09503 was reverted in 52985e4fea7 and replaced by cbccac371, which
is documented already by:


Reduce the default value of
autovacuum_vacuum_cost_delay to 2ms (Tom Lane)


-- 
 David Rowley   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services




Re: pg12 release notes

2019-05-09 Thread Justin Pryzby
On Fri, May 10, 2019 at 12:45:54PM +0900, Amit Langote wrote:
> On 2019/05/10 12:18, David Rowley wrote:
> > On Fri, 10 May 2019 at 12:08, Bruce Momjian  wrote:
> >>> 17f206f Set pg_class.relhassubclass for partitioned indexes
> >>
> >> I need help with this one.  I know the system column existed in previous
> >> releases, so how is it different now?  Do we document system table
> >> changes that are implementation-behavior in the release notes?  Usually
> >> we don't.
> > 
> > This appears to be fixing something that likely should have been done
> > in PG11, where partitioned indexes were added.
...

> > Originally the column
> > was for inheritance parent tables, then later used for partitioned
> > tables.  It seems partitioned indexes just overlooked setting it to
> > true in PG11 and this commit fixed that.  Of course, backpacking that
> > fix wouldn't be very useful for partitioned indexes that were already
> > created, so it was a master only change.
...

> Regarding whether or not this commit needs a release note mention, I'm not
> that sure but maybe we should if Justin thinks it's useful information.

I don't know for sure and I don't feel strongly either way.

Last month, I looked through the list of commits to master ([0] rather than
using pgsql/src/tools/git_changelog), and made a list of commits I thought
should probably be mentioned.  I sent to Bruce, in case he could make use of
it, and just now triple checked that he'd included all the stuff I could see
was important.  Added/changed/removed interfaces (programs, libraries, etc),
GUCs, catalogs were all on my list (which is what caused me to include
index_get_partition, which I agree shouldn't actually be in the relnotes).

Behavior changes should sometimes to be there too, but there's
internal/implementation changes which shouldn't.

Justin

[0] git log --oneline --cherry-pick origin/REL_11_STABLE...origin/master

On Fri, Apr 12, 2019 at 02:55:38AM -0500, Justin Pryzby wrote:
> I was thinking of starting to create release notes ; is it reasonable and
> helpful if I put together an initial, 0th order notes document ?
> 
> I just spent a good while identifying the interesting commits from
> here...although I'm sure I've missed some.
> git log --oneline --cherry-pick origin/REL_11_STABLE...origin/master
> 
> Highlights:
> 428b260 Speed up planning when partitions can be pruned at plan time.
> f56f8f8 Support foreign keys that reference partitioned tables
> 7300a69 Add support for multivariate MCV lists
> Progress reporting:
>  - 03f9e5c Report progress of REINDEX operations
>  - ab0dfc9 Report progress of CREATE INDEX operations
>  - 280e5f1 Add progress reporting to pg_checksums
>  - 6f97457 Add progress reporting for CLUSTER and VACUUM FULL.
> 
> Features:
> 
> \psql:
> 1c5d927 psql \dP: list partitioned tables and indexes
> 27f3dea psql: Add documentation URL to \help output
> 1af25ca Improve psql's \d display of foreign key constraints
> d3a5fc1 Show table access methods as such in psql's \dA.
> 
> \GUCs:
> 799e220 Log all statements from a sample of transactions
> 88bdbd3 Add log_statement_sample_rate parameter
> 475861b Add wal_recycle and wal_init_zero GUCs.
> f1bebef Add shared_memory_type GUC.
> 475861b Add wal_recycle and wal_init_zero GUCs.
> f7cb284 Add plan_cache_mode setting
> 1a83a80 Allow fractional input values for integer GUCs, and improve rounding 
> logic.
> 
> \Other:
> 119dcfa Add vacuum_truncate reloption.
> 7bac3ac Add a "SQLSTATE-only" error verbosity option to libpq and psql.
> ea569d6 Add SETTINGS option to EXPLAIN, to print modified settings.
> b0b39f7 GSSAPI encryption support
> fc22b66 Generated columns
> 5dc92b8 REINDEX CONCURRENTLY
> 8edd0e7 Suppress Append and MergeAppend plan nodes that have a single child.
> 280a408 Transaction chaining
> ed308d7 Add options to enable and disable checksums in pg_checksums
> 0f086f8 Add DNS SRV support for LDAP server discovery.
> dd299df Make heap TID a tiebreaker nbtree index column.
> => and others
> 01bde4f Implement OR REPLACE option for CREATE AGGREGATE.
> 72b6460 Partial implementation of SQL/JSON path language
> c6c9474 Use condition variables to wait for checkpoints.
> f2e4038 Support for INCLUDE attributes in GiST indexes
> 6b9e875 Track block level checksum failures in pg_stat_database
> 898e5e3 Allow ATTACH PARTITION with only ShareUpdateExclusiveLock.
> 7e413a0 pg_dump: allow multiple rows per insert
> 8586bf7 tableam: introduce table AM infrastructure.
> ac88d29 Avoid creation of the free space map for small heap relations.
> 31f3817 Allow COPY FROM to filter data using WHERE conditions
> 6260cc5 pgbench: add \cset and \gset commands
> ca41030 Fix tablespace handling for partitioned tables
> aa2ba50 Add CSV table output mode in psql.
> 2dedf4d Integrate recovery.conf into postgresql.conf
> 578b229 Remove WITH OIDS support, change oid catalog column visibility.
> 9ccdd7f PANIC on fsync() failure.
> 803b130 Add option SKIP_LOCKED to VACUUM and ANALYZE
> ec74369 

Re: pg12 release notes

2019-05-09 Thread Justin Pryzby
On Thu, May 09, 2019 at 08:08:53PM -0400, Bruce Momjian wrote:
> On Wed, May  8, 2019 at 03:32:04PM -0500, Justin Pryzby wrote:
> > I noticed you added release notes at 
> > bdf595adbca195fa54a909c74a5233ebc30641a1,
> > thanks for writing them.
> > 
> > I reviewed notes; find proposed changes attached+included.
> > 
> > I think these should also be mentioned?
> > 
> > f7cb284 Add plan_cache_mode setting
> > 387a5cf Add pg_dump --on-conflict-do-nothing option.
> 
> I am confused how I missed these.  There is only one commit between
> them, and I suspect I deleted them by accident.  I hope those are the
> only ones.

I'm rechecking my list from last month.  What about these ?

> c076f3d Remove pg_constraint.conincluding
> bd09503 Increase the default vacuum_cost_limit from 200 to 2000

I don't think this one is needed but please check:
> 1a990b2
> The API of the function BufFileSize() is changed by this commit, despite

Justin




Re: pg12 release notes

2019-05-09 Thread Tom Lane
David Rowley  writes:
> I think you might be mixing up two items. I'm talking about:

> 
> Allow IN comparisons with arrays to use IS NOT NULL
> partial indexes more frequently (Tom Lane)
> 

> to which the sgml references 65ce07e02.

Wups, sorry, I was talking about 65ce07e02 also, but I managed to
copy-and-paste the wrong bit of release-12.sgml first :-(

regards, tom lane




Re: pg12 release notes

2019-05-09 Thread David Rowley
On Fri, 10 May 2019 at 15:45, Tom Lane  wrote:
> 
>
> 
> Allow IS NOT NULL with mis-matching types to use partial indexes more 
> frequently (Tom Lane)
> 
>
> > If so, I think James Coleman should be the author.
>
> ... and yeah, James should get the credit.  But there's more wrong with
> the summary than that, because I don't think this was about mismatched
> types particularly.  The real motivation was to avoid failing to prove
> the usability of WHERE-x-IS-NOT-NULL partial indexes for IN clauses with
> more than 100 elements.

I think you might be mixing up two items. I'm talking about:


Allow IN comparisons with arrays to use IS NOT NULL
partial indexes more frequently (Tom Lane)


to which the sgml references 65ce07e02.

-- 
 David Rowley   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services




Re: pg12 release notes

2019-05-09 Thread Amit Langote
On 2019/05/10 12:18, David Rowley wrote:
> On Fri, 10 May 2019 at 12:08, Bruce Momjian  wrote:
>>> 17f206f Set pg_class.relhassubclass for partitioned indexes
>>
>> I need help with this one.  I know the system column existed in previous
>> releases, so how is it different now?  Do we document system table
>> changes that are implementation-behavior in the release notes?  Usually
>> we don't.
> 
> This appears to be fixing something that likely should have been done
> in PG11, where partitioned indexes were added.

That's true.  We (Michael and I) felt the need to do this change, because
it allowed the pg_partition_tree() code (which is also new in v12) to use
the same infrastructure for both partitioned tables and indexes; checking
the relhassubclass flag allows to short-circuit scanning pg_inherits to
find out that there are no children.

> Originally the column
> was for inheritance parent tables, then later used for partitioned
> tables.  It seems partitioned indexes just overlooked setting it to
> true in PG11 and this commit fixed that.  Of course, backpacking that
> fix wouldn't be very useful for partitioned indexes that were already
> created, so it was a master only change.

There was no discussion on whether or not to back-patch this to v11, but
the above makes sense.

Regarding whether or not this commit needs a release note mention, I'm not
that sure but maybe we should if Justin thinks it's useful information.

Thanks,
Amit





Re: pg12 release notes

2019-05-09 Thread Tom Lane
David Rowley  writes:
> Just a question about the item: "Allow IN comparisons with arrays to
> use IS NOT NULL partial indexes more frequently (Tom Lane)"

> From what I can tell this must refer to 65ce07e0202f.

You can tell for sure by looking into the SGML comments in
release-12.sgml:




Allow IS NOT NULL with mis-matching types to use partial indexes more 
frequently (Tom Lane)


> If so, I think James Coleman should be the author.

... and yeah, James should get the credit.  But there's more wrong with
the summary than that, because I don't think this was about mismatched
types particularly.  The real motivation was to avoid failing to prove
the usability of WHERE-x-IS-NOT-NULL partial indexes for IN clauses with
more than 100 elements.

regards, tom lane




Re: pg12 release notes

2019-05-09 Thread David Rowley
On Fri, 10 May 2019 at 13:03, Bruce Momjian  wrote:
>
> On Thu, May  9, 2019 at 07:13:35PM -0500, Justin Pryzby wrote:
> > On Thu, May 09, 2019 at 07:35:18PM -0400, Bruce Momjian wrote:
> > > I have made your other changes, with adjustment, patch attached.
> > >
> > > The results are here:
> > >
> > > http://momjian.us/pgsql_docs/release-12.html

Hi Bruce,

Just a question about the item: "Allow IN comparisons with arrays to
use IS NOT NULL partial indexes more frequently (Tom Lane)"

>From what I can tell this must refer to 65ce07e0202f. If so, I think
James Coleman should be the author.

-- 
 David Rowley   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services




Re: pg12 release notes

2019-05-09 Thread David Rowley
On Fri, 10 May 2019 at 12:08, Bruce Momjian  wrote:
> > 17f206f Set pg_class.relhassubclass for partitioned indexes
>
> I need help with this one.  I know the system column existed in previous
> releases, so how is it different now?  Do we document system table
> changes that are implementation-behavior in the release notes?  Usually
> we don't.

This appears to be fixing something that likely should have been done
in PG11, where partitioned indexes were added. Originally the column
was for inheritance parent tables, then later used for partitioned
tables.  It seems partitioned indexes just overlooked setting it to
true in PG11 and this commit fixed that.  Of course, backpacking that
fix wouldn't be very useful for partitioned indexes that were already
created, so it was a master only change.

-- 
 David Rowley   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services




Re: pg12 release notes

2019-05-09 Thread Peter Geoghegan
On Thu, May 9, 2019 at 6:03 PM Bruce Momjian  wrote:
> These were all very helpful.  I adjusted your changes to create the
> attached applied patch.  URL updated:

I noticed that the compatibility note for Andrew Gierth's RYU floating
point patch seems to simply say why the feature is useful. Shouldn't
it be listed separately, and its impact on users upgrading be listed
here instead?

Separately, please find attached suggested changes for items I was
involved in. I have attempted to explain them in a way that makes
their relevance to users clearer. Even if you don't end up using my
wording, you should still change the attribution along the same lines
as the patch.

Also, I added a compatibility note for the new version of nbtree,
which revises the "1/3 of a page" restriction downwards very slightly
(by 8 bytes). FWIW, I think it's very unlikely that anyone will be
affected, because tuples that are that wide are already compressed in
almost all cases -- it seems like it would be hard to be just at the
edge of the limit already.

Thanks
-- 
Peter Geoghegan


0001-Suggested-changes-to-v12-release-notes.patch
Description: Binary data


Re: pg12 release notes

2019-05-09 Thread Justin Pryzby
On Thu, May 09, 2019 at 09:02:51PM -0400, Bruce Momjian wrote:
> These were all very helpful.  I adjusted your changes to create the
> attached applied patch.  URL updated:

Thanks.

> -Allow more comparisons with information_schema text columns to use indexes 
> (Tom Lane)
> +Allow more use of indexes for text columns comparisons with 
> information_schema columns (Tom Lane)

I think "columns" should not be plural..but it could be better still:

|Allow use of indexes for more comparisons with text columns of 
information_schema (Tom Lane)

Regarding this proposed change of mine:
-Btree indexes pg_upgraded from previous releases will not have this ordering.  
This slightly reduces the maximum length of indexed values.
+Btree indexes pg_upgraded from previous releases will not have this ordering.  
This slightly reduces the maximum permitted length of indexed values.

I think "permitted" is important, since otherwise it sounds like maybe for
whatever values are being indexed, their maximum length is reduced by this
patch.  If you overthink it, you could decide that maybe that's happening due
to use of prefix/suffix truncation or something ..

Should this one be listed twice ?  I tried to tell if it was intentional but
couldn't decide..
249d64999 Add support TCP user timeout in libpq and the backend se

Justin




Re: pg12 release notes

2019-05-09 Thread Bruce Momjian
On Thu, May  9, 2019 at 07:13:35PM -0500, Justin Pryzby wrote:
> On Thu, May 09, 2019 at 07:35:18PM -0400, Bruce Momjian wrote:
> > I have made your other changes, with adjustment, patch attached.
> > 
> > The results are here:
> > 
> > http://momjian.us/pgsql_docs/release-12.html
> 
> Thanks

These were all very helpful.  I adjusted your changes to create the
attached applied patch.  URL updated:

http://momjian.us/pgsql_docs/build.html

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+  Ancient Roman grave inscription +
commit d0bbf871ca
Author: Bruce Momjian 
Date:   Thu May 9 20:58:02 2019 -0400

doc: PG 12 wording improvments

Reported-by: Justin Pryzby

Discussion: https://postgr.es/m/20190510001335.gj3...@telsasoft.com

diff --git a/doc/src/sgml/release-12.sgml b/doc/src/sgml/release-12.sgml
index 54f66e13dc..ef761c9c4b 100644
--- a/doc/src/sgml/release-12.sgml
+++ b/doc/src/sgml/release-12.sgml
@@ -119,7 +119,7 @@ Do not allow multiple different recovery_target* 
specifications (Peter Eisentrau
 
 
 
-Previously multiple different recovery_target* variables could be specified, 
and the last one specified was honored.  Now, only one can be specified, though 
the same one can
+Previously, multiple different recovery_target* variables could be specified, 
and the last one specified was honored.  Now, only one can be specified, though 
the same one can
 be specified multiple times and the last specification is honored.
 
 
@@ -131,7 +131,7 @@ Author: Peter Eisentraut 
 -->
 
 
-Cause recovery to recover to the latest timeline by default (Peter Eisentraut)
+Cause recovery to advance to the latest timeline by default (Peter Eisentraut)
 
 
 
@@ -204,7 +204,7 @@ Change XML functions like xpath() to never pretty-print 
their output (Tom Lane)
 
 
 
-Previously this happened in some rare cases.  ACCURATE?  HOW TO GET PRETTY 
PRINT OUTPUT?
+Previously, this happened in some rare cases.  ACCURATE?  HOW TO GET PRETTY 
PRINT OUTPUT?
 
 
 
@@ -226,7 +226,7 @@ Author: Alvaro Herrera 
 -->
 
 
-Require pg_restore to use "-f -" to output the dump contents to stdout (Euler 
Taveira)
+Require specification of "-f -" to send the dump contents to stdout (Euler 
Taveira)
 
 
 
@@ -400,7 +400,7 @@ Allow partitions bounds to be any expression (Kyotaro 
Horiguchi, Tom Lane, Amit
 
 
 
-Expressions are evaluated at table partitioned table creation time.  
Previously only constants were allowed as partitions bounds.
+Expressions are evaluated at table partitioned table creation time.  
Previously, only constants were allowed as partitions bounds.
 
 
 
@@ -531,7 +531,7 @@ Allow parallel query when in SERIALIZABLE isolation mode 
(Thomas Munro)
 
 
 
-Previously parallelism was disabled when in this mode.
+Previously, parallelism was disabled when in this mode.
 
 
 
@@ -824,7 +824,7 @@ Store statistics using the collation defined for each 
column (Tom Lane)
 
 
 
-Previously the default collation was used for all statistics storage.  This 
potentially gives better optimizer behavior for columns with non-default 
collations.
+Previously, the default collation was used for all statistics storage.  This 
potentially gives better optimizer behavior for columns with non-default 
collations.
 
 
 
@@ -1093,7 +1093,7 @@ Add tracking of global objects in system view 
pg_stat_database (Julien Rouhaud)
 
 
 
-The system view row's datoid is reported as zero.
+Global objects have a pg_stat_database.datoid value of zero.
 
 
 
@@ -1149,7 +1149,7 @@ Author: Peter Eisentraut 
 -->
 
 
-Allow viewers of pg_stat_ssl to only see their own rows (Peter Eisentraut)
+Restrict visibility of rows in pg_stat_ssl by unprivileged users (Peter 
Eisentraut)
 
 
 
@@ -1233,7 +1233,7 @@ Author: Tom Lane 
 -->
 
 
-Allow more comparisons with information_schema text columns to use indexes 
(Tom Lane)
+Allow more use of indexes for text columns comparisons with information_schema 
columns (Tom Lane)
 
 
 
@@ -1297,7 +1297,7 @@ Author: Magnus Hagander 
 -->
 
 
-Allow the clientcert pg_hba.conf option to check the database user name 
matches the certificate common name (Julian Markwort, Marius Timmer)
+Allow the clientcert pg_hba.conf option to check that the database user name 
matches the certificate common name (Julian Markwort, Marius Timmer)
 
 
 
@@ -1545,7 +1545,7 @@ Allow the streaming replication timeout to be set per 
connection (Tsunakawa Taka
 
 
 
-Previously this could only be set cluster-wide.
+Previously, this could only be set cluster-wide.
 
 
 
@@ -1840,7 +1840,7 @@ Use all column names when creating default foreign key 
constraint names (Peter E
 
 
 
-Previously only the first column name was used.
+Previously, only the first column name was used.
 
 
 
@@ -2344,7 +2344,7 @@ Allow control of log file rotation via pg_ctl (Kyotaro 
Horiguchi, Alexander Kuzm
 
 
 

Re: pg12 release notes

2019-05-09 Thread Bruce Momjian
On Thu, May  9, 2019 at 07:19:59PM -0500, Justin Pryzby wrote:
> > +Author: Thomas Munro 
> > +2018-07-13 [387a5cfb9] Add pg_dump - -on-conflict-do-nothing option.
> > +-->
> > +
> > +
> > +Allow restore of INSERT statements to skip rows which would cause 
> > conflicts (Surafel Temesgen)
> > +
> 
> restore *using* INSERT statements ?
> cause "unique index" conflicts ?

I am not sure "unique index" helps since most people think of ON
CONFLICT and not its implementation.

Applied patch attached, URL updated:

http://momjian.us/pgsql_docs/build.html

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+  Ancient Roman grave inscription +
diff --git a/doc/src/sgml/release-12.sgml b/doc/src/sgml/release-12.sgml
index 977dc53f3e..54f66e13dc 100644
--- a/doc/src/sgml/release-12.sgml
+++ b/doc/src/sgml/release-12.sgml
@@ -722,11 +722,11 @@ Author: Peter Eisentraut 
 -->
 
 
-Allow contol over when generic plans are used for prepared statements (Pavel 
Stehule)
+Allow control over when generic plans are used for prepared statements (Pavel 
Stehule)
 
 
 
-The server variable plan_cache_mode enables this control.
+This is controlled by the plan_cache_mode server variable.
 
 
 
@@ -2476,7 +2476,7 @@ Author: Thomas Munro 
 -->
 
 
-Allow restore of INSERT statements to skip rows which would cause conflicts 
(Surafel Temesgen)
+Allow restoration of an INSERT-statement dump to skip rows which would cause 
conflicts (Surafel Temesgen)
 
 
 


Re: pg12 release notes

2019-05-09 Thread Justin Pryzby
On Thu, May 09, 2019 at 07:35:18PM -0400, Bruce Momjian wrote:
> I have made your other changes, with adjustment, patch attached.
> 
> The results are here:
> 
>   http://momjian.us/pgsql_docs/release-12.html

Thanks

> -Many system tables now have an 'oid' column that will be expanded with
> -SELECT * by default.
> +The many system tables with such columns will now display those columns
> +with SELECT * by default.

I think "The many" is hard to parse but YMMV.

Find attached additional changes from another pass I've made.


>From 97ddf06bc9221153c52613b8c840409ee698bbad Mon Sep 17 00:00:00 2001
From: Justin Pryzby 
Date: Thu, 9 May 2019 14:15:57 -0500
Subject: [PATCH v2 1/2] pg12 relnotes v2

---
 doc/src/sgml/release-12.sgml | 18 +++---
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/doc/src/sgml/release-12.sgml b/doc/src/sgml/release-12.sgml
index ab4d1b3..cc48960 100644
--- a/doc/src/sgml/release-12.sgml
+++ b/doc/src/sgml/release-12.sgml
@@ -127,7 +127,7 @@ Author: Peter Eisentraut 
 -->
 
 
-Cause recovery to recover to the latest timeline by default (Peter Eisentraut)
+Cause recovery to advance to the latest timeline by default (Peter Eisentraut)
 
 
 
@@ -205,7 +205,8 @@ Author: Alvaro Herrera 
 -->
 
 
-Require pg_restore to use "-f -" to output the dump contents to stdout (Euler 
Taveira)
+Require specification of "-f -" to cause pg_restore to write to stdout (Euler
+Taveira)
 
 
 
@@ -1003,7 +1004,7 @@ Allow logging of only a percentage of statements and 
transactions meeting log_mi
 
 
 
-The parameters log_statement_sample_rate and log_transaction_sample_rate 
control this.
+This is controlled by the new parameters log_statement_sample_rate and 
log_transaction_sample_rate.
 
 
 
@@ -1076,7 +1077,7 @@ Add tracking of global objects in system view 
pg_stat_database (Julien Rouhaud)
 
 
 
-The system view row's datoid is reported as zero.
+The system wide objects are shown with a datoid of zero.
 
 
 
@@ -1132,7 +1133,8 @@ Author: Peter Eisentraut 
 -->
 
 
-Allow viewers of pg_stat_ssl to only see their own rows (Peter Eisentraut)
+Restrict visibility of rows in pg_stat_ssl by unprivileged users (Peter
+Eisentraut)
 
 
 
@@ -1216,7 +1218,8 @@ Author: Tom Lane 
 -->
 
 
-Allow more comparisons with information_schema text columns to use indexes 
(Tom Lane)
+Allow use of indexes for more comparisons with text columns of
+information_schema (Tom Lane)
 
 
 
@@ -1280,7 +1283,8 @@ Author: Magnus Hagander 
 -->
 
 
-Allow the clientcert pg_hba.conf option to check the database user name 
matches the certificate common name (Julian Markwort, Marius Timmer)
+Allow the clientcert pg_hba.conf option to check that the database user name
+matches the certificate common name (Julian Markwort, Marius Timmer)
 
 
 



>From f9d2ee1232090d9087f110d3299bdfae3ed2eab9 Mon Sep 17 00:00:00 2001
From: Justin Pryzby 
Date: Thu, 9 May 2019 18:50:42 -0500
Subject: [PATCH v2 2/2] Add commas: "Previously,"

---
 doc/src/sgml/release-12.sgml | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/doc/src/sgml/release-12.sgml b/doc/src/sgml/release-12.sgml
index cc48960..3f9893e 100644
--- a/doc/src/sgml/release-12.sgml
+++ b/doc/src/sgml/release-12.sgml
@@ -115,7 +115,7 @@ Do not allow multiple different recovery_target* 
specifications (Peter Eisentrau
 
 
 
-Previously multiple different recovery_target* variables could be specified, 
and the last one specified was honored.  Now, only one can be specified, though 
the same one can
+Previously, multiple different recovery_target* variables could be specified, 
and the last one specified was honored.  Now, only one can be specified, though 
the same one can
 be specified multiple times and the last specification is honored.
 
 
@@ -183,7 +183,7 @@ Change XML functions like xpath() to never pretty-print 
their output (Tom Lane)
 
 
 
-Previously this happened in some rare cases.  ACCURATE?  HOW TO GET PRETTY 
PRINT OUTPUT?
+Previously, this happened in some rare cases.  ACCURATE?  HOW TO GET PRETTY 
PRINT OUTPUT?
 
 
 
@@ -384,7 +384,7 @@ Allow partitions bounds to be any expression (Kyotaro 
Horiguchi, Tom Lane, Amit
 
 
 
-Expressions are evaluated at table partitioned table creation time.  
Previously only constants were allowed as partitions bounds.
+Expressions are evaluated at table partitioned table creation time.  
Previously, only constants were allowed as partitions bounds.
 
 
 
@@ -515,7 +515,7 @@ Allow parallel query when in SERIALIZABLE ISOLATION MODE 
(Thomas Munro)
 
 
 
-Previously parallelism was disabled when in this mode.
+Previously, parallelism was disabled when in this mode.
 
 
 
@@ -793,7 +793,7 @@ Store statistics using the collation defined for each 
column (Tom Lane)
 
 
 
-Previously the default collation was used for all statistics storage.  This 
potentially gives better optimizer behavior for columns with non-default 
collations.
+Previously, the default collation was used for 

Re: pg12 release notes

2019-05-09 Thread Justin Pryzby
On Thu, May 09, 2019 at 08:08:53PM -0400, Bruce Momjian wrote:
> On Wed, May  8, 2019 at 03:32:04PM -0500, Justin Pryzby wrote:
> > I think these should also be mentioned?
> > 
> > f7cb284 Add plan_cache_mode setting
> > 387a5cf Add pg_dump --on-conflict-do-nothing option.
> 
> Applied patch attached, docs updated:

Thanks, comments:

> +Author: Peter Eisentraut 
> +2018-07-16 [f7cb2842b] Add plan_cache_mode setting
> +-->
> +
> +
> +Allow contol over when generic plans are used for prepared statements (Pavel 
> Stehule)

control

> +
> +The server variable plan_cache_mode enables this control.

"This is controlled by the plan_cache_mode parameter".

>  Author: Tom Lane 
>  2018-12-30 [b5415e3c2] Support parameterized TidPaths.
>  Author: Tom Lane 
> @@ -2456,6 +2471,21 @@ Add --exclude-database option to pg_dumpall (Andrew 
> Dunstan)
>  
>  
>  
> +
> +
> +Allow restore of INSERT statements to skip rows which would cause conflicts 
> (Surafel Temesgen)
> +

restore *using* INSERT statements ?
cause "unique index" conflicts ?

Justin




Re: pg12 release notes

2019-05-09 Thread Bruce Momjian
On Wed, May  8, 2019 at 03:32:04PM -0500, Justin Pryzby wrote:
> I noticed you added release notes at bdf595adbca195fa54a909c74a5233ebc30641a1,
> thanks for writing them.
> 
> I reviewed notes; find proposed changes attached+included.
> 
> I think these should also be mentioned?
> 
> f7cb284 Add plan_cache_mode setting
> 387a5cf Add pg_dump --on-conflict-do-nothing option.

I am confused how I missed these.  There is only one commit between
them, and I suspect I deleted them by accident.  I hope those are the
only ones.

> a6da004 Add index_get_partition convenience function

A C function just isn't normally mentioned in the release notes.

> 17f206f Set pg_class.relhassubclass for partitioned indexes

I need help with this one.  I know the system column existed in previous
releases, so how is it different now?  Do we document system table
changes that are implementation-behavior in the release notes?  Usually
we don't.

Applied patch attached, docs updated:

http://momjian.us/pgsql_docs/release-12.html

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+  Ancient Roman grave inscription +
diff --git a/doc/src/sgml/release-12.sgml b/doc/src/sgml/release-12.sgml
index 816c8309e5..8bffb0ae03 100644
--- a/doc/src/sgml/release-12.sgml
+++ b/doc/src/sgml/release-12.sgml
@@ -717,6 +717,21 @@ forced by specifying NOT MATERIALIZED.  Previously, CTEs 
were never inlined and
 
 
 
+
+
+Allow contol over when generic plans are used for prepared statements (Pavel 
Stehule)
+
+
+
+The server variable plan_cache_mode enables this control.
+
+
+
+
+
+
+
+Allow restore of INSERT statements to skip rows which would cause conflicts 
(Surafel Temesgen)
+
+
+
+The pg_dump option is --on-conflict-do-nothing.
+
+
+
+
+


Re: pg12 release notes

2019-05-09 Thread Bruce Momjian
On Wed, May  8, 2019 at 03:32:04PM -0500, Justin Pryzby wrote:
> I noticed you added release notes at bdf595adbca195fa54a909c74a5233ebc30641a1,
> thanks for writing them.

> -This improve optimization for columns with non-uniform distributions that 
> often appear in WHERE clauses.
> +This improves query plans for columns with non-uniform distributions that 
> often appear in WHERE clauses.

I think "query plans" is less clear.

> -Author: Amit Kapila 
> -2019-02-04 [b0eaa4c51] Avoid creation of the free space map for small heap 
> rela
> --->
> -
> -
> -Avoid creation of the free space map files for small table (John Naylor, 
> Amit Kapila)
> -
> -
> -
> -Such files are not useful.
> -
> -
> -
> -
> -
 
 
-Allow ATTACH PARTITION to be performed with reduced locking requirements 
(Robert Haas)
+ATTACH PARTITION is now performed with reduced locking requirements (Robert 
Haas)
 
 
 
@@ -634,7 +634,7 @@ Have new btree indexes sort duplicate index entries in 
heap-storage order (Peter
 
 
 
-Btree indexes pg_upgraded from previous releases will not have this ordering.  
This does slightly reduce the maximum length of indexed values.
+Btree indexes pg_upgraded from previous releases will not have this ordering.  
This slightly reduces the maximum length of indexed values.
 
 
 
@@ -693,7 +693,7 @@ Allow CREATE STATISTICS to create most-common-value 
statistics for multiple colu
 
 
 
-This improve optimization for columns with non-uniform distributions that 
often appear in WHERE clauses.
+This improves optimization for columns with non-uniform distributions that 
often appear in WHERE clauses.
 
 
 
@@ -1005,7 +1005,7 @@ Allow logging of only a percentage of statements and 
transactions meeting log_mi
 
 
 
-The parameters log_statement_sample_rate and log_transaction_sample_rate 
controls this.
+The parameters log_statement_sample_rate and log_transaction_sample_rate 
control this.
 
 
 
@@ -1218,7 +1218,7 @@ Author: Tom Lane 
 -->
 
 
-Allow more comparisons with information_schema text columns use indexes (Tom 
Lane)
+Allow more comparisons with information_schema text columns to use indexes 
(Tom Lane)
 
 
 
@@ -1297,7 +1297,7 @@ Author: Thomas Munro 
 -->
 
 
-Allow discovery of the LDAP server using DNS (Thomas Munro)
+Allow discovery of the LDAP server using DNS SRV records (Thomas Munro)
 
 
 
@@ -1489,7 +1489,7 @@ Add server variable to control the type of shared memory 
to use (Andres Freund)
 
 
 
-The variable is shared_memory_type.  It purpose is to allow selection of 
System V shared memory, if desired.
+The variable is shared_memory_type.  Its purpose is to allow selection of 
System V shared memory, if desired.
 
 
 


Re: pg12 release notes

2019-05-09 Thread Thomas Munro
On Thu, May 9, 2019 at 8:32 AM Justin Pryzby  wrote:
> I noticed you added release notes at bdf595adbca195fa54a909c74a5233ebc30641a1,
> thanks for writing them.

+1

> I reviewed notes; find proposed changes attached+included.

+1 to all the corrections shown.

One more:  "Allow parallel query when in SERIALIZABLE ISOLATION MODE
(Thomas Munro)"

Only SERIALIZABLE should be in all-caps IMHO.

-- 
Thomas Munro
https://enterprisedb.com




Re: pg12 release notes

2019-05-08 Thread Alvaro Herrera
On 2019-May-08, Justin Pryzby wrote:

> I noticed you added release notes at bdf595adbca195fa54a909c74a5233ebc30641a1,
> thanks for writing them.
> 
> I reviewed notes; find proposed changes attached+included.
> 
> I think these should also be mentioned?
> 
> a6da004 Add index_get_partition convenience function

I don't disagree with the other three you suggest, but this one is a C
function and I think it's below the level of usefulness that we publish
in relnotes.

-- 
Álvaro Herrerahttps://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




pg12 release notes

2019-05-08 Thread Justin Pryzby
I noticed you added release notes at bdf595adbca195fa54a909c74a5233ebc30641a1,
thanks for writing them.

I reviewed notes; find proposed changes attached+included.

I think these should also be mentioned?

f7cb284 Add plan_cache_mode setting
a6da004 Add index_get_partition convenience function
387a5cf Add pg_dump --on-conflict-do-nothing option.
17f206f Set pg_class.relhassubclass for partitioned indexes

diff --git a/doc/src/sgml/release-12.sgml b/doc/src/sgml/release-12.sgml
index 88bdcbd..ab4d1b3 100644
--- a/doc/src/sgml/release-12.sgml
+++ b/doc/src/sgml/release-12.sgml
@@ -61,8 +61,8 @@ Remove the special behavior of OID columns (Andres Freund, 
John Naylor)
 
 
 Previously, a normally-invisible OID column could be specified during table 
creation using WITH OIDS;  that ability has been removed. Columns can still be 
explicitly
-specified as type OID.  pg_dump and pg_upgrade operations on databases using 
WITH OIDS will need adjustment.  Many system tables now have an 'oid' column 
that will be
-expanded with SELECT * by default.
+specified as type OID.  pg_dump and pg_upgrade operations on databases using 
WITH OIDS will need adjustment.  The 'oid' column of many system tables will be
+shown by default with SELECT *.
 
 
 
@@ -115,7 +115,7 @@ Do not allow multiple different recovery_target* 
specifications (Peter Eisentrau
 
 
 
-Previously multiple different recovery_target* variables could be specified, 
and last one specified was honored.  Now, only one can be specified, though the 
same one can
+Previously multiple different recovery_target* variables could be specified, 
and the last one specified was honored.  Now, only one can be specified, though 
the same one can
 be specified multiple times and the last specification is honored.
 
 
@@ -405,7 +405,7 @@ Author: Robert Haas 
 -->
 
 
-Allow ATTACH PARTITION to be performed with reduced locking requirements 
(Robert Haas)
+ATTACH PARTITION is performed with lower locking requirement (Robert Haas)
 
 
 
@@ -617,7 +617,7 @@ Have new btree indexes sort duplicate index entries in 
heap-storage order (Peter
 
 
 
-Btree indexes pg_upgraded from previous releases will not have this ordering.  
This does slightly reduce the maximum length of indexed values.
+Btree indexes pg_upgraded from previous releases will not have this ordering.  
This slightly reduces the maximum permitted length of indexed values.
 
 
 
@@ -676,7 +676,7 @@ Allow CREATE STATISTICS to create most-common-value 
statistics for multiple colu
 
 
 
-This improve optimization for columns with non-uniform distributions that 
often appear in WHERE clauses.
+This improves query plans for columns with non-uniform distributions that 
often appear in WHERE clauses.
 
 
 
@@ -954,21 +954,6 @@ This dramatically speeds up processing of floating-point 
values.  Users who wish
 
 
 
-
-
-Avoid creation of the free space map files for small table (John Naylor, Amit 
Kapila)
-
-
-
-Such files are not useful.
-
-
-
-
-
 
 
-Allow more comparisons with information_schema text columns use indexes (Tom 
Lane)
+Allow more comparisons with information_schema text columns to use indexes 
(Tom Lane)
 
 
 
@@ -1310,7 +1295,7 @@ Author: Thomas Munro 
 -->
 
 
-Allow discovery of the LDAP server using DNS (Thomas Munro)
+Allow discovery of the LDAP server using DNS SRV records (Thomas Munro)
 
 
 
@@ -1446,7 +1431,7 @@ Add wal_recycle and wal_init_zero server variables to 
avoid WAL file recycling (
 
 
 
-This can be beneficial on copy-on-write file systems like ZFS.
+This can be beneficial on copy-on-write filesystems like ZFS.
 
 
 
@@ -1502,7 +1487,7 @@ Add server variable to control the type of shared memory 
to use (Andres Freund)
 
 
 
-The variable is shared_memory_type.  It purpose is to allow selection of 
System V shared memory, if desired.
+The variable is shared_memory_type.  Its purpose is to allow selection of 
System V shared memory, if desired.
 
 
 
>From a2d7fccc8cd8035898a4459e4b7176ef1168f713 Mon Sep 17 00:00:00 2001
From: Justin Pryzby 
Date: Wed, 8 May 2019 15:22:36 -0500
Subject: [PATCH v1] review pg12 release notes

---
 doc/src/sgml/release-12.sgml | 37 +++--
 1 file changed, 11 insertions(+), 26 deletions(-)

diff --git a/doc/src/sgml/release-12.sgml b/doc/src/sgml/release-12.sgml
index 88bdcbd..ab4d1b3 100644
--- a/doc/src/sgml/release-12.sgml
+++ b/doc/src/sgml/release-12.sgml
@@ -61,8 +61,8 @@ Remove the special behavior of OID columns (Andres Freund, John Naylor)
 
 
 Previously, a normally-invisible OID column could be specified during table creation using WITH OIDS;  that ability has been removed. Columns can still be explicitly
-specified as type OID.  pg_dump and pg_upgrade operations on databases using WITH OIDS will need adjustment.  Many system tables now have an 'oid' column that will be
-expanded with SELECT * by default.
+specified as type OID.  pg_dump and pg_upgrade operations on databases using WITH OIDS will need a