Thread: PG 18 release notes draft committed

PG 18 release notes draft committed

From
Bruce Momjian
Date:
I have committd the first draft of the PG 18 release notes.  The item
count looks strong:

    release-7.4:  263
    release-8.0:  230
    release-8.1:  174
    release-8.2:  215
    release-8.3:  214
    release-8.4:  314
    release-9.0:  237
    release-9.1:  203
    release-9.2:  238
    release-9.3:  177
    release-9.4:  211
    release-9.5:  193
    release-9.6:  214
    release-10:   189
    release-11:   170
    release-12:   180
    release-13:   178
    release-14:   220
    release-15:   184
    release-16:   206
    release-17:   182
    release-18:   209

I will continue improving it until beta 1, and until the final release. 
I will probably add markup in 1-3 weeks.  Let the feedback begin.  ;-)

You can see the most current HTML-built version here:

    https://momjian.us/pgsql_docs/release-18.html

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Do not let urgent matters crowd out time for investment in the future.



Re: PG 18 release notes draft committed

From
Amit Langote
Date:
Hi Bruce,

On Fri, May 2, 2025 at 11:44 AM Bruce Momjian <bruce@momjian.us> wrote:
> I have committd the first draft of the PG 18 release notes.
>
> I will continue improving it until beta 1, and until the final release.
> I will probably add markup in 1-3 weeks.  Let the feedback begin.  ;-)

Thanks as always for working on this.

I noticed the release notes currently combine several
partition-related commits under one item:

+<!--
+Author: Amit Langote <amitlan@postgresql.org>
+2025-01-30 [bb3ec16e1] Move PartitionPruneInfo out of plan nodes into PlannedSt
+Author: Amit Langote <amitlan@postgresql.org>
+2025-01-31 [d47cbf474] Perform runtime initial pruning outside ExecInitNode()
+Author: Amit Langote <amitlan@postgresql.org>
+2025-02-07 [cbc127917] Track unpruned relids to avoid processing pruned relatio
+Author: Amit Langote <amitlan@postgresql.org>
+2025-02-20 [525392d57] Don't lock partitions pruned by initial pruning
+Author: Amit Langote <amitlan@postgresql.org>
+2025-04-04 [88f55bc97] Make derived clause lookup in EquivalenceClass more effi
+Author: David Rowley <drowley@postgresql.org>
+2025-04-08 [d69d45a5a] Speedup child EquivalenceMember lookup in planner
+-->
+<listitem>
+<para>
+Allow partitions to be pruned earlier and quicker, and skipped in
more places (Amit Langote, Ashutosh Bapat, Yuya Watari, David Rowley)
+<ulink url="&commit_baseurl;bb3ec16e1">§</ulink>
+<ulink url="&commit_baseurl;d47cbf474">§</ulink>
+<ulink url="&commit_baseurl;cbc127917">§</ulink>
+<ulink url="&commit_baseurl;525392d57">§</ulink>
+<ulink url="&commit_baseurl;88f55bc97">§</ulink>
+<ulink url="&commit_baseurl;d69d45a5a">§</ulink>
+</para>
+</listitem>

But I think these really fall into three separate improvements:

1. Speed up execution of cached plans by deferring locks on partitions
subject to pruning (Amit Langote)
(bb3ec16e1, d47cbf474, cbc127917, 525392d57)

2. Speed up child EquivalenceMember lookup in planner (Yuya Watari,
David Rowley)
(d69d45a5a)

3. Speed up derived clause lookup in EquivalenceClass (Ashutosh Bapat)
(88f55bc97)

Alternatively, 2 and 3 can be combined as:

2. Speed up partition planning by improving EquivalenceClass lookups
(Yuya Watari, David Rowley, Ashutosh Bapat)

I think 1 should go under Partitioning, which I see is currently missing.

Any thoughts, David?

Can work on a patch if you'd like.

--
Thanks, Amit Langote



Re: PG 18 release notes draft committed

From
Jacob Champion
Date:
On Thu, May 1, 2025 at 7:44 PM Bruce Momjian <bruce@momjian.us> wrote:
> I will probably add markup in 1-3 weeks.  Let the feedback begin.  ;-)

Thanks!

>    <para>
>     Version 18 contains a number of changes that may affect compatibility
>     with previous releases.  Observe the following incompatibilities:
>    </para>
>    [...]
> Rename server variable ssl_ecdh_curve to ssl_groups and allow multiple colon-separated ECDH curves to be specified
(EricaZhang, Daniel Gustafsson) 

The previous setting name should continue to function correctly, since
it's mapped as an alias, so this can probably be moved into the
"standard" config features rather than a compatibility change.

--Jacob



Re: PG 18 release notes draft committed

From
Bruce Momjian
Date:
On Fri, May  2, 2025 at 08:24:42AM -0700, Jacob Champion wrote:
> On Thu, May 1, 2025 at 7:44 PM Bruce Momjian <bruce@momjian.us> wrote:
> > I will probably add markup in 1-3 weeks.  Let the feedback begin.  ;-)
> 
> Thanks!
> 
> >    <para>
> >     Version 18 contains a number of changes that may affect compatibility
> >     with previous releases.  Observe the following incompatibilities:
> >    </para>
> >    [...]
> > Rename server variable ssl_ecdh_curve to ssl_groups and allow multiple colon-separated ECDH curves to be specified
(EricaZhang, Daniel Gustafsson)
 
> 
> The previous setting name should continue to function correctly, since
> it's mapped as an alias, so this can probably be moved into the
> "standard" config features rather than a compatibility change.

Thanks, done.  The commit message didn't indicate the old name would
still work, and I didn't review the patch for that.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Do not let urgent matters crowd out time for investment in the future.



Re: PG 18 release notes draft committed

From
Bruce Momjian
Date:
On Fri, May  2, 2025 at 01:00:57PM +0900, Amit Langote wrote:
> 1. Speed up execution of cached plans by deferring locks on partitions
> subject to pruning (Amit Langote)
> (bb3ec16e1, d47cbf474, cbc127917, 525392d57)
> 
> 2. Speed up child EquivalenceMember lookup in planner (Yuya Watari,
> David Rowley)
> (d69d45a5a)
> 
> 3. Speed up derived clause lookup in EquivalenceClass (Ashutosh Bapat)
> (88f55bc97)
> 
> Alternatively, 2 and 3 can be combined as:
> 
> 2. Speed up partition planning by improving EquivalenceClass lookups
> (Yuya Watari, David Rowley, Ashutosh Bapat)
> 
> I think 1 should go under Partitioning, which I see is currently missing.
> 
> Any thoughts, David?
> 
> Can work on a patch if you'd like.

So, a few things.  First, these set of commits was in a group of 10 that
I added since there have been complaints in the past that optimizer
improvements were not listed and therefore patch authors were not given
sufficient credit.  That means the 209 item count for PG 18 is 10 higher
than my normal filtering would produce.

Second, looking at the items, these are a case of "X is faster", which
we don't normally mention in the release notes.  We normally mention
"faster" when it is so much faster that use cases which were not
possible before might be possible now, so it is recommended to retest.
That is what I saw this grouped item as, whereas I don't think the
individual items meet that criteria.

Also, I didn't see enough partition items to warrant a separate
partition section, and we didn't have one in PG 17 either.  We could
pull all the partition items from the sections they are already in, but
they seem more natural in the sections they are in.

I don't think most people would know what EquivalenceMember is, and even
if they did, would they be able to connect it to an SQL query?

Finally, I see the big increases in this release as being the optimizer,
monitoring, and constraints.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Do not let urgent matters crowd out time for investment in the future.



Re: PG 18 release notes draft committed

From
Bruce Momjian
Date:
On Fri, May  2, 2025 at 12:18:06PM -0400, Bruce Momjian wrote:
> Finally, I see the big increases in this release as being the optimizer,
> monitoring, and constraints.

Also, and I am loving the chapter markers linking to gitweb.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Do not let urgent matters crowd out time for investment in the future.



Re: PG 18 release notes draft committed

From
Jelte Fennema-Nio
Date:
On Fri, 2 May 2025 at 04:45, Bruce Momjian <bruce@momjian.us> wrote:
>
> I have committd the first draft of the PG 18 release notes.  The item
> count looks strong:

Thanks for all the work. Some notes:

1. There's currently no mention that protocol version 3.2 was
introduced in this release. I'm not sure where/how this should be
mentioned, but I definitely think it should be somewhere. It's a
pretty major change. One option is to replace/amend the "Make cancel
request keys 256 bits" item. Maybe replace that with something like:
"Postgres 18 introduces protocol version 3.2. This is the first new
protocol version since 3.0, which was introduced in Postgres 7.4. This
new protocol version 3.2 allows a server to use longer cancel request
keys. When the client advertises support for protocol version 3.2 (or
higher) Postgres 18 will use a cancel key size of 256 bits."
2. Obviously biased since it's my contribution, but I think d38bab5
might deserve a mention.
3. The "Add PQtrace() output..." commitlist should also contain 7adec2d5fc



Re: PG 18 release notes draft committed

From
Bruce Momjian
Date:
On Sat, May  3, 2025 at 01:46:29AM +0200, Jelte Fennema-Nio wrote:
> On Fri, 2 May 2025 at 04:45, Bruce Momjian <bruce@momjian.us> wrote:
> >
> > I have committd the first draft of the PG 18 release notes.  The item
> > count looks strong:
> 
> Thanks for all the work. Some notes:
> 
> 1. There's currently no mention that protocol version 3.2 was
> introduced in this release. I'm not sure where/how this should be
> mentioned, but I definitely think it should be somewhere. It's a
> pretty major change. One option is to replace/amend the "Make cancel
> request keys 256 bits" item. Maybe replace that with something like:
> "Postgres 18 introduces protocol version 3.2. This is the first new
> protocol version since 3.0, which was introduced in Postgres 7.4. This
> new protocol version 3.2 allows a server to use longer cancel request
> keys. When the client advertises support for protocol version 3.2 (or
> higher) Postgres 18 will use a cancel key size of 256 bits."

Okay, I added a mention next to the libpq version function entries.

> 2. Obviously biased since it's my contribution, but I think d38bab5
> might deserve a mention.

I disagree.  pgbench limits like this are not something we give much
detail around error avoidance to in the release notes.

> 3. The "Add PQtrace() output..." commitlist should also contain 7adec2d5fc

Added.  Patch attached.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Do not let urgent matters crowd out time for investment in the future.

Attachment

Re: PG 18 release notes draft committed

From
Jelte Fennema-Nio
Date:
On Sat, 3 May 2025 at 02:06, Bruce Momjian <bruce@momjian.us> wrote:
>
> On Sat, May  3, 2025 at 01:46:29AM +0200, Jelte Fennema-Nio wrote:
> > On Fri, 2 May 2025 at 04:45, Bruce Momjian <bruce@momjian.us> wrote:
> > >
> > > I have committd the first draft of the PG 18 release notes.  The item
> > > count looks strong:
> >
> > Thanks for all the work. Some notes:
> >
> > 1. There's currently no mention that protocol version 3.2 was
> > introduced in this release. I'm not sure where/how this should be
> > mentioned, but I definitely think it should be somewhere. It's a
> > pretty major change. One option is to replace/amend the "Make cancel
> > request keys 256 bits" item. Maybe replace that with something like:
> > "Postgres 18 introduces protocol version 3.2. This is the first new
> > protocol version since 3.0, which was introduced in Postgres 7.4. This
> > new protocol version 3.2 allows a server to use longer cancel request
> > keys. When the client advertises support for protocol version 3.2 (or
> > higher) Postgres 18 will use a cancel key size of 256 bits."
>
> Okay, I added a mention next to the libpq version function entries.

I think it should be mentioned in the server section. How about we
replace: "This is enabled when the libpq client and server are
Postgres 18 or later. ", with the following:

This is only enabled when the client supports the wire protocol
version 3.2 (or up), Wire protocol version 3.2 is introduced in this
release. For libpq based clients that means that libpq needs to be of
version 18 or higher.

That also makes it clear that for non-libpq based clients people
should check if their client supports it.



Re: PG 18 release notes draft committed

From
jian he
Date:
On Fri, May 2, 2025 at 10:44 AM Bruce Momjian <bruce@momjian.us> wrote:
>
> I have committd the first draft of the PG 18 release notes.  The item
> count looks strong:
>         release-17:   182
>         release-18:   209
>
> I will continue improving it until beta 1, and until the final release.
> I will probably add markup in 1-3 weeks.  Let the feedback begin.  ;-)
>
> You can see the most current HTML-built version here:
>
>         https://momjian.us/pgsql_docs/release-18.html
>

seems you missed this ([1]):

Detect redundant GROUP BY columns using UNIQUE indexes

d4c3a156c added support that when the GROUP BY contained all of the columns
belonging to a relation's PRIMARY KEY, all other columns belonging to that
relation would be removed from the GROUP BY clause. That's possible because all
other columns are functionally dependent on the PRIMARY KEY and those columns
alone ensure the groups are distinct.

[1] https://git.postgresql.org/cgit/postgresql.git/commit/?id=bd10ec529796a13670645e6acd640c6f290df020



Re: PG 18 release notes draft committed

From
Bruce Momjian
Date:
On Sat, May  3, 2025 at 01:16:24PM +0200, Jelte Fennema-Nio wrote:
> On Sat, 3 May 2025 at 02:06, Bruce Momjian <bruce@momjian.us> wrote:
> >
> > On Sat, May  3, 2025 at 01:46:29AM +0200, Jelte Fennema-Nio wrote:
> > > On Fri, 2 May 2025 at 04:45, Bruce Momjian <bruce@momjian.us> wrote:
> > > >
> > > > I have committd the first draft of the PG 18 release notes.  The item
> > > > count looks strong:
> > >
> > > Thanks for all the work. Some notes:
> > >
> > > 1. There's currently no mention that protocol version 3.2 was
> > > introduced in this release. I'm not sure where/how this should be
> > > mentioned, but I definitely think it should be somewhere. It's a
> > > pretty major change. One option is to replace/amend the "Make cancel
> > > request keys 256 bits" item. Maybe replace that with something like:
> > > "Postgres 18 introduces protocol version 3.2. This is the first new
> > > protocol version since 3.0, which was introduced in Postgres 7.4. This
> > > new protocol version 3.2 allows a server to use longer cancel request
> > > keys. When the client advertises support for protocol version 3.2 (or
> > > higher) Postgres 18 will use a cancel key size of 256 bits."
> >
> > Okay, I added a mention next to the libpq version function entries.
> 
> I think it should be mentioned in the server section. How about we
> replace: "This is enabled when the libpq client and server are
> Postgres 18 or later. ", with the following:
> 
> This is only enabled when the client supports the wire protocol
> version 3.2 (or up), Wire protocol version 3.2 is introduced in this
> release. For libpq based clients that means that libpq needs to be of
> version 18 or higher.
> 
> That also makes it clear that for non-libpq based clients people
> should check if their client supports it.

I moved the item and added some text, patch attached.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Do not let urgent matters crowd out time for investment in the future.

Attachment

Re: PG 18 release notes draft committed

From
Bruce Momjian
Date:
On Sat, May  3, 2025 at 11:04:45PM +0800, jian he wrote:
> On Fri, May 2, 2025 at 10:44 AM Bruce Momjian <bruce@momjian.us> wrote:
> >
> > I have committd the first draft of the PG 18 release notes.  The item
> > count looks strong:
> >         release-17:   182
> >         release-18:   209
> >
> > I will continue improving it until beta 1, and until the final release.
> > I will probably add markup in 1-3 weeks.  Let the feedback begin.  ;-)
> >
> > You can see the most current HTML-built version here:
> >
> >         https://momjian.us/pgsql_docs/release-18.html
> >
> 
> seems you missed this ([1]):
> 
> Detect redundant GROUP BY columns using UNIQUE indexes
> 
> d4c3a156c added support that when the GROUP BY contained all of the columns
> belonging to a relation's PRIMARY KEY, all other columns belonging to that
> relation would be removed from the GROUP BY clause. That's possible because all
> other columns are functionally dependent on the PRIMARY KEY and those columns
> alone ensure the groups are distinct.
> 
> [1] https://git.postgresql.org/cgit/postgresql.git/commit/?id=bd10ec529796a13670645e6acd640c6f290df020

We added this item to the PG 9.6 release notes:

    <!--
    2016-02-11 [d4c3a156c] Remove GROUP BY columns that are functionally dependent
    -->
           <para>
            Ignore <literal>GROUP BY</> columns that are
            functionally dependent on other columns (David Rowley)
           </para>
    
           <para>
            If a <literal>GROUP BY</> clause includes all columns of a
            non-deferred primary key, as well as other columns of the same
            table, those other columns are redundant and can be dropped
            from the grouping.  This saves computation in many common cases.
           </para>
          </listitem>

Interestingly, the first paragraph suggests this optimization already
works for unique indexes, but the text below it states it only works for
primary keys.

As a nod to PG 9.6, which was released in 2016, I duplicated that item
and reworded it for this commit.  :-)  Patch attached.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Do not let urgent matters crowd out time for investment in the future.

Attachment

Re: PG 18 release notes draft committed

From
Jelte Fennema-Nio
Date:
On Sat, 3 May 2025 at 18:19, Bruce Momjian <bruce@momjian.us> wrote:
> I moved the item and added some text, patch attached.

LGTM, apart from the typo in the word "client' (it's spelled as
"cliient" in the diff).

Noticed a few other small things when rereading:

1. "Add libpq functions and environment..." should be "Add libpq
connection parameters and environment
2. "Allow the specification of non-overlapping PRIMARY KEY and UNIQUE
constraints" has no commit attached to it. I noticed this because it
wasn't fully clear to me what this feature entailed, so I wanted to
look at it in more detail.
3. "Report search_path changes to the client." is currently in the
libpq section, but this is a server-only change. So that seems a bit
strange. Not sure where to put it though.



Re: PG 18 release notes draft committed

From
Alexander Borisov
Date:
Hi hackers,

> I will continue improving it until beta 1, and until the final release.
> I will probably add markup in 1-3 weeks.  Let the feedback begin.  ;-)
> 
> You can see the most current HTML-built version here:
> 
>     https://momjian.us/pgsql_docs/release-18.html
> 


I'm not sure, but I'll ask.

I have significantly improved the handling of Unicode Case in
PostgreSQL.
The improvements affect important functions such as lower(), upper(),
casefold().
Specifically, the patch has significantly reduced the size of Unicode
Case tables (and consequently the size of the object file).
We got a significant speed gain:
ASCII by ≈10%
Cyrillic by ≈80%
Unicode in general by ≈30%

But, unfortunately, I didn't see any mention of this improvement in the
release notes.
Hence the question to the community - are such improvements worth
mentioning?

I'm just new to the community, and want to understand.

Commit: 
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=27bdec06841d1bb004ca7627eac97808b08a7ac7

I am now actively working on a major improvement to Unicode
Normalization Forms.

Thanks!


-- 
Regards,
Alexander Borisov




Re: PG 18 release notes draft committed

From
Bruce Momjian
Date:
On Sun, May  4, 2025 at 01:31:51AM +0300, Alexander Borisov wrote:
> Hi hackers,
> 
> > I will continue improving it until beta 1, and until the final release.
> > I will probably add markup in 1-3 weeks.  Let the feedback begin.  ;-)
> > 
> > You can see the most current HTML-built version here:
> > 
> >     https://momjian.us/pgsql_docs/release-18.html
> > 
> 
> 
> I'm not sure, but I'll ask.
> 
> I have significantly improved the handling of Unicode Case in
> PostgreSQL.
> The improvements affect important functions such as lower(), upper(),
> casefold().
> Specifically, the patch has significantly reduced the size of Unicode
> Case tables (and consequently the size of the object file).
> We got a significant speed gain:
> ASCII by ≈10%
> Cyrillic by ≈80%
> Unicode in general by ≈30%
> 
> But, unfortunately, I didn't see any mention of this improvement in the
> release notes.
> Hence the question to the community - are such improvements worth
> mentioning?
> 
> I'm just new to the community, and want to understand.
> 
> Commit: https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=27bdec06841d1bb004ca7627eac97808b08a7ac7
> 
> I am now actively working on a major improvement to Unicode
> Normalization Forms.

Given the performance numbers above, which were not in the commit, maybe
I should add it to the case folding item, and add his name as a
co-author.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Do not let urgent matters crowd out time for investment in the future.



Re: PG 18 release notes draft committed

From
Bruce Momjian
Date:
On Sat, May  3, 2025 at 09:40:47PM +0200, Jelte Fennema-Nio wrote:
> On Sat, 3 May 2025 at 18:19, Bruce Momjian <bruce@momjian.us> wrote:
> > I moved the item and added some text, patch attached.
> 
> LGTM, apart from the typo in the word "client' (it's spelled as
> "cliient" in the diff).

Thanks, fixed.

> Noticed a few other small things when rereading:
> 
> 1. "Add libpq functions and environment..." should be "Add libpq
> connection parameters and environment

Fixed.

> 2. "Allow the specification of non-overlapping PRIMARY KEY and UNIQUE
> constraints" has no commit attached to it. I noticed this because it
> wasn't fully clear to me what this feature entailed, so I wanted to
> look at it in more detail.

Fixed.

> 3. "Report search_path changes to the client." is currently in the
> libpq section, but this is a server-only change. So that seems a bit
> strange. Not sure where to put it though.

Not sure.  The only idea I had was server configuration, which doesn't
match well.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Do not let urgent matters crowd out time for investment in the future.



Re: PG 18 release notes draft committed

From
Alexander Borisov
Date:
04.05.2025 01:47, Bruce Momjian wrote:

[...]

> Given the performance numbers above, which were not in the commit, maybe
> I should add it to the case folding item, and add his name as a
> co-author.
> 

I'm not a co-author, I'm the author of my own algorithm that
significantly improves PostgreSQL code.
The author of casefold() is Jeff Davis (and in general, as I understand,
Jeff is responsible for Unicode in Postgres).
I only suggested how to significantly improve the storage of Unicode
Case data and provide fast access to this data.
In other words, I improved, accelerated the algorithms.

Because of which the functions lower(), upper(), casefold() got a
significant boost.

-- 
Regards,
Alexander Borisov




Re: PG 18 release notes draft committed

From
Bruce Momjian
Date:
On Sun, May  4, 2025 at 02:24:16AM +0300, Alexander Borisov wrote:
> 04.05.2025 01:47, Bruce Momjian wrote:
> 
> [...]
> 
> > Given the performance numbers above, which were not in the commit, maybe
> > I should add it to the case folding item, and add his name as a
> > co-author.
> > 
> 
> I'm not a co-author, I'm the author of my own algorithm that
> significantly improves PostgreSQL code.
> The author of casefold() is Jeff Davis (and in general, as I understand,
> Jeff is responsible for Unicode in Postgres).
> I only suggested how to significantly improve the storage of Unicode
> Case data and provide fast access to this data.
> In other words, I improved, accelerated the algorithms.
> 
> Because of which the functions lower(), upper(), casefold() got a
> significant boost.

It doesn't warrant its own item because it is not user-facing work.  The
best we can do is add the commit to an existing item and add you as a
co-author on an existing item.  You will see several items that are that
way already.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Do not let urgent matters crowd out time for investment in the future.



Re: PG 18 release notes draft committed

From
Alexander Borisov
Date:
04.05.2025 02:28, Bruce Momjian wrote:


> It doesn't warrant its own item because it is not user-facing work.  The
> best we can do is add the commit to an existing item and add you as a
> co-author on an existing item.  You will see several items that are that
> way already.
> 

Thank you for clarifying!
Users are not interested in performance gains.
Then it's not worth considering. Sorry to interrupt.

-- 
Regards,
Alexander Borisov




Re: PG 18 release notes draft committed

From
Bruce Momjian
Date:
On Sun, May  4, 2025 at 02:48:31AM +0300, Alexander Borisov wrote:
> 04.05.2025 02:28, Bruce Momjian wrote:
> 
> 
> > It doesn't warrant its own item because it is not user-facing work.  The
> > best we can do is add the commit to an existing item and add you as a
> > co-author on an existing item.  You will see several items that are that
> > way already.
> > 
> 
> Thank you for clarifying!
> Users are not interested in performance gains.
> Then it's not worth considering. Sorry to interrupt.

So the logic is something I posted to this thread already:

    So, a few things.  First, these set of commits was in a group of 10 that
    I added since there have been complaints in the past that optimizer
    improvements were not listed and therefore patch authors were not given
    sufficient credit.  That means the 209 item count for PG 18 is 10 higher
    than my normal filtering would produce.
    
    Second, looking at the items, these are a case of "X is faster", which
    we don't normally mention in the release notes.  We normally mention
    "faster" when it is so much faster that use cases which were not
    possible before might be possible now, so it is recommended to retest.
    That is what I saw this grouped item as, whereas I don't think the
    individual items meet that criteria.

So, users are interested in performance in the sense it makes use cases
possible, and if your commit is making the case folding useful, we
should mention it in the release notes.  I don't think making it
separate would fit though.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Do not let urgent matters crowd out time for investment in the future.



Re: PG 18 release notes draft committed

From
Jelte Fennema-Nio
Date:
On Sun, 4 May 2025 at 03:21, Bruce Momjian <bruce@momjian.us> wrote:
> So the logic is something I posted to this thread already:
>
>         So, a few things.  First, these set of commits was in a group of 10 that
>         I added since there have been complaints in the past that optimizer
>         improvements were not listed and therefore patch authors were not given
>         sufficient credit.  That means the 209 item count for PG 18 is 10 higher
>         than my normal filtering would produce.
>
>         Second, looking at the items, these are a case of "X is faster", which
>         we don't normally mention in the release notes.  We normally mention
>         "faster" when it is so much faster that use cases which were not
>         possible before might be possible now, so it is recommended to retest.
>         That is what I saw this grouped item as, whereas I don't think the
>         individual items meet that criteria.

Let me start off the yearly thread of people saying they disagree with
this filtering logic. I think there's an important utility of the
Release Notes that these logic is not covering well:

Many people read the release notes to see if upgrading is worth the
hassle & risk for them specifically. The aggregate of some small
performance improvements that apply to their queries could very well
push them over the edge. These performance improvements don't need to
"allow any new use cases" for that to be the case.

The filtering that you currently do makes the release notes much less
useful for people using the release notes for this purpose. Users
might very well care more about ~10% perf improvement for a feature
they use heavily, than all of the newly added SQL syntax combined.

> So, users are interested in performance in the sense it makes use cases
> possible, and if your commit is making the case folding useful, we
> should mention it in the release notes.  I don't think making it
> separate would fit though.

For this specific commit, I think if it had only changed the
performance of casefold(), then I'd agree that it should be grouped
with the casefold addition in the release notes. My reasoning would be
that there's no "diff" in performance since the previous release,
because the function did not exist in the previous release. So the
perf improvements are simply part of the "initial implementation" of
casefold from a user perspective.

However since this commit also impacts the very commonly used lower()
and upper() functions, I think that it would make sense if it got its
own entry. It's neither clear for me from the commit message nor the
skimming the original thread, whether the perf improvement numbers
listed by Alexander also apply to lower() and upper(), or if they only
apply to casefold():

On Sun, 4 May 2025 at 00:32, Alexander Borisov <lex.borisov@gmail.com> wrote:
> ASCII by ≈10%
> Cyrillic by ≈80%
> Unicode in general by ≈30%

If they apply the lower() and upper() I definitely think this patch
deserves a place in "General Performance".



Re: PG 18 release notes draft committed

From
Jelte Fennema-Nio
Date:
On Fri, 2 May 2025 at 04:45, Bruce Momjian <bruce@momjian.us> wrote:
> I have committd the first draft of the PG 18 release notes.

Some suggestions for additional commits to list for the items in the changelog:
1. I think 5070349102af12832c8528651c8ed18b16346323 should be listed
as a commit for "Add libpq connection parameters and environment
variables...". This commit contains a major part of the change that
allows supporting multiple protocol versions client side.
2. I think 9d9b9d46f3c509c722ebbf2a1e7dc6296a6c711d &
09be39112654c3f158098fdb5f820143c0330763 should be listed as a commits
for "Make cancel request keys 256 bits". These commits contain crucial
parts of that change. This would also put me in there as one of the
co-authors for this item.



Re: PG 18 release notes draft committed

From
Álvaro Herrera
Date:
Regarding these items

* Allow ALTER TABLE to set the NOT VALID attribute of NOT NULL constraints
  (Rushabh Lathia, Jian He)

* Allow NOT VALID foreign key constraints on partitioned tables (Amul Sul)

* Allow modification of the inheritability of constraints (Suraj Kharage, Álvaro Herrera)

  The syntax is ALTER TABLE ... ALTER CONSTRAINT ... [NO] INHERIT.

* Store column NOT NULL specifications in pg_constraint (Álvaro Herrera, Bernd Helmle)

  This allows names to be specified for NOT NULL constraint. This also adds NOT
  NULL constraints to foreign tables and NOT NULL inheritance control to local
  tables.


I think the wording and order of them is a bit unclear.  I would put the
last item first, immediately followed by the other two; alternatively we
could merge them all into a single one:

* Store NOT NULL constraints in pg_constraint for better preservability
  (Álvaro, Bernd, Suraj, Rushabh, Jian)

  The constraint names are well defined and are preserved across
  dump/restore.  Also, the NOT VALID and NO INHERIT properties work
  as expected and can be modified by users via ALTER TABLE.

Or something along those lines.

This one in particular:
  Allow modification of the inheritability of constraints (Suraj Kharage, Álvaro Herrera)

  The syntax is ALTER TABLE ... ALTER CONSTRAINT ... [NO] INHERIT.

only works with not-null constraints, which is why I suggest to merge
together with the above item.  Ideally, on the next release somebody
would work to make that feature more general (work with other types of
constraints).


I think this item
  Allow CHECK and foreign key constraints to be specified as NOT ENFORCED
  (Amul Sul)

  This also adds column pg_constraint.conenforced.

should come second or maybe even first in that section, as it is I think
the most user-visible.


These two items
  Allow NOT VALID foreign key constraints on partitioned tables (Amul Sul)

  Allow dropping of constraints ONLY on partitioned tables (Álvaro Herrera)

  This was previously erroneously prohibited.

can mostly be considered bug-fixes, so they should be last in the
section; they aren't new features, just making existing features work
correctly.  The one I have second is I think of lesser importance.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"I'm impressed how quickly you are fixing this obscure issue. I came from 
MS SQL and it would be hard for me to put into words how much of a better job
you all are doing on [PostgreSQL]."
 Steve Midgley, http://archives.postgresql.org/pgsql-sql/2008-08/msg00000.php



Re: PG 18 release notes draft committed

From
Atsushi Torikoshi
Date:
Hi,

On Fri, May 2, 2025 at 11:44 AM Bruce Momjian <bruce@momjian.us> wrote:
>
> I have committd the first draft of the PG 18 release notes.  The item
> count looks strong:
>
>         release-7.4:  263
>         release-8.0:  230
>         release-8.1:  174
>         release-8.2:  215
>         release-8.3:  214
>         release-8.4:  314
>         release-9.0:  237
>         release-9.1:  203
>         release-9.2:  238
>         release-9.3:  177
>         release-9.4:  211
>         release-9.5:  193
>         release-9.6:  214
>         release-10:   189
>         release-11:   170
>         release-12:   180
>         release-13:   178
>         release-14:   220
>         release-15:   184
>         release-16:   206
>         release-17:   182
>         release-18:   209
>
> I will continue improving it until beta 1, and until the final release.
> I will probably add markup in 1-3 weeks.  Let the feedback begin.  ;-)

Thanks for your work!

> Add REJECT_LIMIT to control the number of invalid rows COPY IN can ignore (Atsushi Torikoshi)

Since REJECT_LIMIT cannot be used with COPY IN but can be used with
COPY FROM, I think "IN" should be "FROM".

  =# COPY t1 TO '/tmp/a' WITH (REJECT_LIMIT 3);
  ERROR:  COPY REJECT_LIMIT requires ON_ERROR to be set to IGNORE
  =# COPY t1 TO '/tmp/a' WITH ( ON_ERROR ignore, REJECT_LIMIT 3);
  ERROR:  COPY ON_ERROR cannot be used with COPY TO
  LINE 1: COPY t1 to '/tmp/a' WITH (ON_ERROR ignore, REJECT_LIMIT 3);


> This is active when ON_ERROR = 'ignore'.

As a non-native English speaker, I may be misunderstanding this, but
the word "active" might suggest that REJECT_LIMIT always takes effect
by default, causing the COPY operation to stop after a certain number
of errors.
However, in reality, REJECT_LIMIT does not have any effect by default
— unless explicitly set, there is no limit on the number of rows that
can be skipped when ON_ERROR is set to ignore.
To avoid this potential confusion, a phrasing like:

  This option must be used with ON_ERROR ignore.

might be clearer.

Also, in the v17 release notes, COPY option values are not enclosed in
single quotes but written in <literal> tag.
For consistency, it might be better to follow the same style in the
v18 notes as well.

  -- https://www.postgresql.org/docs/current/release-17.html
  Add new COPY option ON_ERROR ignore to discard error rows
  The default behavior is ON_ERROR stop


> Add COPY log_verbosity level "silent" to suppress all log output (Atsushi Torikoshi)

Similarly, in the v17 release notes, the log_verbosity option was
written in uppercase (LOG_VERBOSITY).
For consistency, it may be preferable to use the same case formatting
in this entry as well.

  -- https://www.postgresql.org/docs/current/release-17.html
  Add new COPY option LOG_VERBOSITY which reports COPY FROM ignored error rows

Also, the phrase "suppress all log output" may be slightly misleading.
Even with log_verbosity = 'silent', COPY still outputs logs — it only
suppresses log messages related to skipped rows when ON_ERROR ignore
is used.
It might help to clarify this nuance to avoid confusion.
For example, how about "Add COPY LOG_VERBOSITY silent to suppress logs
related to skipped rows"?


> Add on_error and log_verbosity options to file_fdw (Atsushi Torikoshi)
> Add REJECT_LIMIT to control the number of invalid rows file_fdw can ignore (Atsushi Torikoshi)
> This is active when ON_ERROR = 'ignore'.

The case of option names for file_fdw is inconsistent — some are
lowercase (on_error, log_verbosity), while others use uppercase
(REJECT_LIMIT, ON_ERROR).
For consistency, it might be better to standardize the option names
throughout the release notes.
Since the file_fdw documentation consistently uses lowercase for all
options, using lowercase in the release notes as well might feel more
natural.


--
Regards,
Atsushi Torikoshi



Re: PG 18 release notes draft committed

From
Alexander Borisov
Date:
04.05.2025 12:19, Jelte Fennema-Nio wrote:
> On Sun, 4 May 2025 at 03:21, Bruce Momjian <bruce@momjian.us> wrote:
>> So the logic is something I posted to this thread already:
>>
>>          So, a few things.  First, these set of commits was in a group of 10 that
>>          I added since there have been complaints in the past that optimizer
>>          improvements were not listed and therefore patch authors were not given
>>          sufficient credit.  That means the 209 item count for PG 18 is 10 higher
>>          than my normal filtering would produce.
>>
>>          Second, looking at the items, these are a case of "X is faster", which
>>          we don't normally mention in the release notes.  We normally mention
>>          "faster" when it is so much faster that use cases which were not
>>          possible before might be possible now, so it is recommended to retest.
>>          That is what I saw this grouped item as, whereas I don't think the
>>          individual items meet that criteria.
> 
> Let me start off the yearly thread of people saying they disagree with
> this filtering logic. I think there's an important utility of the
> Release Notes that these logic is not covering well:
> 
> Many people read the release notes to see if upgrading is worth the
> hassle & risk for them specifically. The aggregate of some small
> performance improvements that apply to their queries could very well
> push them over the edge. These performance improvements don't need to
> "allow any new use cases" for that to be the case.
> 
> The filtering that you currently do makes the release notes much less
> useful for people using the release notes for this purpose. Users
> might very well care more about ~10% perf improvement for a feature
> they use heavily, than all of the newly added SQL syntax combined.
> 
>> So, users are interested in performance in the sense it makes use cases
>> possible, and if your commit is making the case folding useful, we
>> should mention it in the release notes.  I don't think making it
>> separate would fit though.
> 
> For this specific commit, I think if it had only changed the
> performance of casefold(), then I'd agree that it should be grouped
> with the casefold addition in the release notes. My reasoning would be
> that there's no "diff" in performance since the previous release,
> because the function did not exist in the previous release. So the
> perf improvements are simply part of the "initial implementation" of
> casefold from a user perspective.
> 
> However since this commit also impacts the very commonly used lower()
> and upper() functions, I think that it would make sense if it got its
> own entry. It's neither clear for me from the commit message nor the
> skimming the original thread, whether the perf improvement numbers
> listed by Alexander also apply to lower() and upper(), or if they only
> apply to casefold():
> 
> On Sun, 4 May 2025 at 00:32, Alexander Borisov <lex.borisov@gmail.com> wrote:
>> ASCII by ≈10%
>> Cyrillic by ≈80%
>> Unicode in general by ≈30%
> 
> If they apply the lower() and upper() I definitely think this patch
> deserves a place in "General Performance".

I'm actually a bit confused, and didn't expect such a heated discussion
about creating an entry about my patch in Release Notes.

I thought I had made significant Unicode improvements to Postgres.
Namely, significantly reduce the object file size for Unicode Case, and
most importantly increased performance.
Thanks to my approach/algorithm, all Unicode Case related functions got
a significant boost.
Namely: lower(), upper(), casefold(). I have already given the figures.
Why casefold() is the one that got caught here is not clear to me, I
have nothing to do with the implementation of this function.
I improved the overall Unicode Case algorithm, which caused a boost in
all of the listed functions.

I thought it would be useful for users to know that Postgres is
improving in the performance direction, especially in such functions
that are very often used by users to compare text by bringing it to a
certain case.

The discussion made me realize that it's not that important.
I'm not insisting. If it really doesn't matter to users, then it's not
worth discussing.


Thank you for your attention.
I will continue to improve Postgres.

-- 
Regards,
Alexander Borisov



Re: PG 18 release notes draft committed

From
"Jonathan S. Katz"
Date:

On 5/3/25 7:48 PM, Alexander Borisov wrote:
> 04.05.2025 02:28, Bruce Momjian wrote:
> 
> 
>> It doesn't warrant its own item because it is not user-facing work.  The
>> best we can do is add the commit to an existing item and add you as a
>> co-author on an existing item.  You will see several items that are that
>> way already.
>>
> 
> Thank you for clarifying!
> Users are not interested in performance gains.
> Then it's not worth considering. Sorry to interrupt.

I do know that users are interested in performance gains - and it is 
definitely user facing - and as such I try to include these things in 
the release announcement (which I'm currently drafting) as part of 
making the release available. Similarly, we do need to use discretion 
with how we discuss performance enhancements in the release announcement 
to ensure we make directionally accurate claims and look towards broad 
impact.

I've noted the claims on upper/lower; we'll see if it makes the cut in 
the release announcement.

Thanks,

Jonathan



Re: PG 18 release notes draft committed

From
Jelte Fennema-Nio
Date:
On Sun, 4 May 2025 at 22:28, Alexander Borisov <lex.borisov@gmail.com> wrote:
> I'm actually a bit confused, and didn't expect such a heated discussion
> about creating an entry about my patch in Release Notes.

I definitely understand this. And to make my own opinion on this
matter extremely clear: I *do* think it's important to users, and it
should be included in the release notes.

I think there are a few things at play here why that did not happen in
Bruce his initial draft:
1. I personally think the requirement that Bruce uses for perf
improvements to make it into the changelog is too strict (see my
previous email for details)
2. Bruce is only a single person, and as such cannot read all emails
on pgsql-hackers, so he relies only on commit messages to determine
impact for release notes. The commit message for your change did not
include any details on the perf improvements that could be expected.
3. After skimming the email thread[1], it's hard for me to understand
where these perf numbers came from. And the first few results only
mention casefold performance i.e. they call the results: "casefold()
test." So, it's unclear what perf gains are expected for the other
functions mentioned in the email subject.

As for how to improve these:
1 is discussed/complained about basically every year whenever release
notes are created. I don't think we can do any better than having
those discussions. Unless someone else wants to start owning writing
the release notes, or we somehow share the burden, e.g. by having the
person that commits also write a release note entry.
2 can be improved by people including perf numbers in their commit
messages. The second way to improve is by sending feedback on the
release notes if things are missed, like you did.
3 is something you could help with I think. It would have been helpful
if you had shared the script/commands you used to get these
performance numbers. That way I could reproduce them myself. Also if
you had included some perf numbers for lower() and upper() that would
have been great too, as those are (currently) much more commonly used
than casefold(). NOTE: I might have missed the script or be wrong
about this some other way, since Jeff did not require this for
committing it. If so, please disregard.

[1]: https://www.postgresql.org/message-id/flat/7cac7e66-9a3b-4e3f-a997-42aa0c401f80%40gmail.com

> I will continue to improve Postgres.

Please do, your work is very much appreciated!



Re: PG 18 release notes draft committed

From
Bruce Momjian
Date:
On Sun, May  4, 2025 at 11:49:47AM +0200, Jelte Fennema-Nio wrote:
> On Fri, 2 May 2025 at 04:45, Bruce Momjian <bruce@momjian.us> wrote:
> > I have committd the first draft of the PG 18 release notes.
> 
> Some suggestions for additional commits to list for the items in the changelog:
> 1. I think 5070349102af12832c8528651c8ed18b16346323 should be listed
> as a commit for "Add libpq connection parameters and environment
> variables...". This commit contains a major part of the change that
> allows supporting multiple protocol versions client side.

Added.

> 2. I think 9d9b9d46f3c509c722ebbf2a1e7dc6296a6c711d &
> 09be39112654c3f158098fdb5f820143c0330763 should be listed as a commits
> for "Make cancel request keys 256 bits". These commits contain crucial
> parts of that change. This would also put me in there as one of the
> co-authors for this item.

I added the first commit but the second one is:

    commit 09be3911265
    Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
    Date:   Wed Apr 2 15:32:40 2025 +0300
    
        Add timingsafe_bcmp(), for constant-time memory comparison
    
        timingsafe_bcmp() should be used instead of memcmp() or a naive
        for-loop, when comparing passwords or secret tokens, to avoid leaking
        information about the secret token by timing. This commit just
        introduces the function but does not change any existing code to use
        it yet.
    
        Co-authored-by: Jelte Fennema-Nio <github-tech@jeltef.nl>
        Discussion: https://www.postgresql.org/message-id/7b86da3b-9356-4e50-aa1b-56570825e234@iki.fi

which is either the wrong commit hash or too far away from the item
description to be added.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Do not let urgent matters crowd out time for investment in the future.



Re: PG 18 release notes draft committed

From
Bruce Momjian
Date:
On Sun, May  4, 2025 at 01:35:30PM +0200, Álvaro Herrera wrote:
> Regarding these items
> 
> * Allow ALTER TABLE to set the NOT VALID attribute of NOT NULL constraints
>   (Rushabh Lathia, Jian He)
> 
> * Allow NOT VALID foreign key constraints on partitioned tables (Amul Sul)
> 
> * Allow modification of the inheritability of constraints (Suraj Kharage, Álvaro Herrera)
> 
>   The syntax is ALTER TABLE ... ALTER CONSTRAINT ... [NO] INHERIT.
> 
> * Store column NOT NULL specifications in pg_constraint (Álvaro Herrera, Bernd Helmle)
> 
>   This allows names to be specified for NOT NULL constraint. This also adds NOT
>   NULL constraints to foreign tables and NOT NULL inheritance control to local
>   tables.
> 
> 
> I think the wording and order of them is a bit unclear.  I would put the
> last item first, immediately followed by the other two; alternatively we
> could merge them all into a single one:

I moved the last item to first in the group.

> * Store NOT NULL constraints in pg_constraint for better preservability
>   (Álvaro, Bernd, Suraj, Rushabh, Jian)
> 
>   The constraint names are well defined and are preserved across
>   dump/restore.  Also, the NOT VALID and NO INHERIT properties work
>   as expected and can be modified by users via ALTER TABLE.
> 
> Or something along those lines.

I think the merged text is too confusing.

> This one in particular:
>   Allow modification of the inheritability of constraints (Suraj Kharage, Álvaro Herrera)
> 
>   The syntax is ALTER TABLE ... ALTER CONSTRAINT ... [NO] INHERIT.
> 
> only works with not-null constraints, which is why I suggest to merge
> together with the above item.  Ideally, on the next release somebody
> would work to make that feature more general (work with other types of
> constraints).

Yes, I see that detail in the docs of the first commit, and in the second commit
text.  I modified to say NOT NULL.

> 
> I think this item
>   Allow CHECK and foreign key constraints to be specified as NOT ENFORCED
>   (Amul Sul)
> 
>   This also adds column pg_constraint.conenforced.
> 
> should come second or maybe even first in that section, as it is I think
> the most user-visible.

I made it second.

> These two items
>   Allow NOT VALID foreign key constraints on partitioned tables (Amul Sul)
> 
>   Allow dropping of constraints ONLY on partitioned tables (Álvaro Herrera)
> 
>   This was previously erroneously prohibited.
> 
> can mostly be considered bug-fixes, so they should be last in the
> section; they aren't new features, just making existing features work
> correctly.  The one I have second is I think of lesser importance.

Agreed, moved as you suggested.  I have trouble figuring out the
importance sometimes, and this section is very large.

Patch attached.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Do not let urgent matters crowd out time for investment in the future.

Attachment

Re: PG 18 release notes draft committed

From
Bruce Momjian
Date:
On Sun, May  4, 2025 at 10:41:30PM +0900, Atsushi Torikoshi wrote:
> > I will continue improving it until beta 1, and until the final release.
> > I will probably add markup in 1-3 weeks.  Let the feedback begin.  ;-)
> 
> Thanks for your work!
> 
> > Add REJECT_LIMIT to control the number of invalid rows COPY IN can ignore (Atsushi Torikoshi)
> 
> Since REJECT_LIMIT cannot be used with COPY IN but can be used with
> COPY FROM, I think "IN" should be "FROM".
> 
>   =# COPY t1 TO '/tmp/a' WITH (REJECT_LIMIT 3);
>   ERROR:  COPY REJECT_LIMIT requires ON_ERROR to be set to IGNORE
>   =# COPY t1 TO '/tmp/a' WITH ( ON_ERROR ignore, REJECT_LIMIT 3);
>   ERROR:  COPY ON_ERROR cannot be used with COPY TO
>   LINE 1: COPY t1 to '/tmp/a' WITH (ON_ERROR ignore, REJECT_LIMIT 3);

Agreed.  A PG 18 commit had "COPY IN" and I ended up using that, even
though we have no COPY IN but only COPY FROM.  Fixed in all placed.

> > This is active when ON_ERROR = 'ignore'.
> 
> As a non-native English speaker, I may be misunderstanding this, but
> the word "active" might suggest that REJECT_LIMIT always takes effect
> by default, causing the COPY operation to stop after a certain number
> of errors.
> However, in reality, REJECT_LIMIT does not have any effect by default
> — unless explicitly set, there is no limit on the number of rows that
> can be skipped when ON_ERROR is set to ignore.
> To avoid this potential confusion, a phrasing like:
> 
>   This option must be used with ON_ERROR ignore.
> 
> might be clearer.

Uh, that might suggest you have to use REJECT_LIMIT with ON_ERROR, which
is untrue.  I used:

    This is available when ON_ERROR = 'ignore'.

> Also, in the v17 release notes, COPY option values are not enclosed in
> single quotes but written in <literal> tag.
> For consistency, it might be better to follow the same style in the
> v18 notes as well.
> 
>   -- https://www.postgresql.org/docs/current/release-17.html
>   Add new COPY option ON_ERROR ignore to discard error rows
>   The default behavior is ON_ERROR stop

The quotes will be removed when I add XML markup in 1-3 weeks.

> > Add COPY log_verbosity level "silent" to suppress all log output (Atsushi Torikoshi)
> 
> Similarly, in the v17 release notes, the log_verbosity option was
> written in uppercase (LOG_VERBOSITY).
>
> For consistency, it may be preferable to use the same case formatting
> in this entry as well.
> 
>   -- https://www.postgresql.org/docs/current/release-17.html
>   Add new COPY option LOG_VERBOSITY which reports COPY FROM ignored error rows

Same.

> Also, the phrase "suppress all log output" may be slightly misleading.
> Even with log_verbosity = 'silent', COPY still outputs logs — it only
> suppresses log messages related to skipped rows when ON_ERROR ignore
> is used.
> It might help to clarify this nuance to avoid confusion.
> For example, how about "Add COPY LOG_VERBOSITY silent to suppress logs
> related to skipped rows"?

I went with:

    Add COPY LOG_VERBOSITY level "silent" to suppress log output of ignored rows

because the docs call them "ignored" rows rather than "skipped" rows. 

> > Add on_error and log_verbosity options to file_fdw (Atsushi Torikoshi)
> > Add REJECT_LIMIT to control the number of invalid rows file_fdw can ignore (Atsushi Torikoshi)
> > This is active when ON_ERROR = 'ignore'.
> 
> The case of option names for file_fdw is inconsistent — some are
> lowercase (on_error, log_verbosity), while others use uppercase
> (REJECT_LIMIT, ON_ERROR).
> For consistency, it might be better to standardize the option names
> throughout the release notes.
> Since the file_fdw documentation consistently uses lowercase for all
> options, using lowercase in the release notes as well might feel more
> natural.

Case changed.  Patch attached.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Do not let urgent matters crowd out time for investment in the future.

Attachment

Re: PG 18 release notes draft committed

From
David Rowley
Date:
On Fri, 2 May 2025 at 16:01, Amit Langote <amitlangote09@gmail.com> wrote:
> +Allow partitions to be pruned earlier and quicker, and skipped in
> more places (Amit Langote, Ashutosh Bapat, Yuya Watari, David Rowley)
>
> Alternatively, 2 and 3 can be combined as:

> 2. Speed up partition planning by improving EquivalenceClass lookups
> (Yuya Watari, David Rowley, Ashutosh Bapat)

> Any thoughts, David?

I agree that 88f55bc97 and d69d45a5a should be in their own item.
Likely no need to go into detail about the speed up being about
"EquivalenceClass lookups". I imagine something like "Reduce planner
overheads when planning queries to partitioned and inheritance parent
tables"

Then for bb3ec16e1, d47cbf474, cbc127917 and 525392d57, something like
"Defer locking of partitions during execution until after partition
elimination".  The release notes for 11.0 called it "partition
elimination", so I went with that naming.

David



Re: PG 18 release notes draft committed

From
David Rowley
Date:
On Fri, 2 May 2025 at 14:44, Bruce Momjian <bruce@momjian.us> wrote:
> You can see the most current HTML-built version here:
>
>         https://momjian.us/pgsql_docs/release-18.html

Thanks for working on these.

For "Improve the performance of hash joins (David Rowley)", 0f5738202
did the same thing for GROUP BY and hashed subplans too. It might be
worth adjusting this to some more generic text which covers all of
these. Something like "Speed up hash value generation in Hash Join,
GROUP BY, hashed Subplan and hashed set operations</p><p>This change
also allows JIT compilation for obtaining hash values for these
operations". The set operations I likely should have mentioned in the
commit message.

There's also Jeff's work in cc721c459, 4d143509c, a0942f441, 626df47ad
which does work to reduce the memory overheads of hashed GROUP BY,
hashed Subplans and hashed set operations. I think Jeff might have
understated the possible performance gains from these commits. I very
much think this is worth something like "Reduce memory overheads for
hashed GROUP BY, subplans and set operation processing (Jeff Davis)".

A quick test with: explain analyze select a from
generate_series(1,1000000) a group by a;

v17: Batches: 1  Memory Usage: 90145kB
v18: Batches: 1  Memory Usage: 57385kB

A 37% reduction for this case. Not insignificant.

David



Re: PG 18 release notes draft committed

From
Bertrand Drouvot
Date:
Hi,

On Thu, May 01, 2025 at 10:44:50PM -0400, Bruce Momjian wrote:
> I have committd the first draft of the PG 18 release notes. 

Thanks for working on this!

> You can see the most current HTML-built version here:
> 
>     https://momjian.us/pgsql_docs/release-18.html


I have one comment related to "per backend" statistics.

We have this:

"
Add per-backend I/O statistics reporting (Bertrand Drouvot)

The statistics are accessed via pg_stat_get_backend_io(). Per-backend statistics can be cleared via
pg_stat_reset_backend_stats().
 
"

and

"
Add function pg_stat_get_backend_wal() to return per-backend WAL statistics (Bertrand Drouvot) 
"

I think that we could mention pg_stat_reset_backend_stats() in both case, something
like:

A.

"Per-backend I/O statistics can be cleared via pg_stat_reset_backend_stats()"

and

"Per-backend WAL statistics can be cleared via pg_stat_reset_backend_stats()"

for consitency.

Or:

B.  mention pg_stat_reset_backend_stats() "separately" just saying:

"
Per-backend statistics can be cleared via pg_stat_reset_backend_stats()
"

and get rid of the mention in "per-backend I/O statistics".

I'd be tempted to vote for B (so that pg_stat_reset_backend_stats() is introduced
separately): thoughts?

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com



Re: PG 18 release notes draft committed

From
"Daniel Westermann (DWE)"
Date:
On Thu, May 01, 2025 at 10:44:50PM -0400, Bruce Momjian wrote:
> I have committd the first draft of the PG 18 release notes.

I don't think pg_buffercache_numa does exist.

Regards
Daniel

Re: PG 18 release notes draft committed

From
"Daniel Westermann (DWE)"
Date:
>On Thu, May 01, 2025 at 10:44:50PM -0400, Bruce Momjian wrote:
>> I have committd the first draft of the PG 18 release notes.

>I don't think pg_buffercache_numa does exist.

Please ignore

Regards
Daniel

Re: PG 18 release notes draft committed

From
Bruce Momjian
Date:
On Mon, May  5, 2025 at 09:42:10PM +1200, David Rowley wrote:
> On Fri, 2 May 2025 at 16:01, Amit Langote <amitlangote09@gmail.com> wrote:
> > +Allow partitions to be pruned earlier and quicker, and skipped in
> > more places (Amit Langote, Ashutosh Bapat, Yuya Watari, David Rowley)
> >
> > Alternatively, 2 and 3 can be combined as:
> 
> > 2. Speed up partition planning by improving EquivalenceClass lookups
> > (Yuya Watari, David Rowley, Ashutosh Bapat)
> 
> > Any thoughts, David?
> 
> I agree that 88f55bc97 and d69d45a5a should be in their own item.
> Likely no need to go into detail about the speed up being about
> "EquivalenceClass lookups". I imagine something like "Reduce planner
> overheads when planning queries to partitioned and inheritance parent
> tables"
> 
> Then for bb3ec16e1, d47cbf474, cbc127917 and 525392d57, something like
> "Defer locking of partitions during execution until after partition
> elimination".  The release notes for 11.0 called it "partition
> elimination", so I went with that naming.

Okay, I split them up and went with the attached patch.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Do not let urgent matters crowd out time for investment in the future.

Attachment

Re: PG 18 release notes draft committed

From
Bruce Momjian
Date:
On Mon, May  5, 2025 at 10:14:22PM +1200, David Rowley wrote:
> On Fri, 2 May 2025 at 14:44, Bruce Momjian <bruce@momjian.us> wrote:
> > You can see the most current HTML-built version here:
> >
> >         https://momjian.us/pgsql_docs/release-18.html
> 
> Thanks for working on these.
> 
> For "Improve the performance of hash joins (David Rowley)", 0f5738202
> did the same thing for GROUP BY and hashed subplans too. It might be
> worth adjusting this to some more generic text which covers all of
> these. Something like "Speed up hash value generation in Hash Join,
> GROUP BY, hashed Subplan and hashed set operations</p><p>This change
> also allows JIT compilation for obtaining hash values for these
> operations". The set operations I likely should have mentioned in the
> commit message.

Okay, text added.

> There's also Jeff's work in cc721c459, 4d143509c, a0942f441, 626df47ad
> which does work to reduce the memory overheads of hashed GROUP BY,
> hashed Subplans and hashed set operations. I think Jeff might have
> understated the possible performance gains from these commits. I very
> much think this is worth something like "Reduce memory overheads for
> hashed GROUP BY, subplans and set operation processing (Jeff Davis)".
> 
> A quick test with: explain analyze select a from
> generate_series(1,1000000) a group by a;
> 
> v17: Batches: 1  Memory Usage: 90145kB
> v18: Batches: 1  Memory Usage: 57385kB
> 
> A 37% reduction for this case. Not insignificant.

Commits added and Jeff's name added, patch attached.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Do not let urgent matters crowd out time for investment in the future.

Attachment

Re: PG 18 release notes draft committed

From
Bruce Momjian
Date:
On Mon, May  5, 2025 at 02:09:26PM +0000, Bertrand Drouvot wrote:
> A.
> 
> "Per-backend I/O statistics can be cleared via pg_stat_reset_backend_stats()"
> 
> and
> 
> "Per-backend WAL statistics can be cleared via pg_stat_reset_backend_stats()"
> 
> for consitency.
> 
> Or:

I went with the A option, patch attached.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Do not let urgent matters crowd out time for investment in the future.

Attachment

Re: PG 18 release notes draft committed

From
Jacob Champion
Date:
On Thu, May 1, 2025 at 7:44 PM Bruce Momjian <bruce@momjian.us> wrote:
>         https://momjian.us/pgsql_docs/release-18.html

> +Add support for the "oauth" authentication (Jacob Champion, Daniel Gustafsson, Thomas Munro)

Should be either 'support for "oauth" authentication' or 'support for
the "oauth" authentication method', I think.

> +This adds an "oauth" authentication method to pg_hba.conf, a server variable oauth_validator_libraries to specify
OAUTHlibraries, a configure flag --with-libcurl to add the required 
> +compile-time libraries, and libpq OAUTH options.

Maybe the description of oauth_validator_libraries could be something
like "to load token validation modules"?

Also, "OAUTH" should just be "OAuth". We should probably lock in the
capitalization:

- "OAuth" is the name of the framework we're using
- "oauth" is the HBA method name in the configs
- "OAUTHBEARER" is the internal name of the SASL method, which most
users don't care about and should only rarely appear in the docs

Thanks!
--Jacob



Re: PG 18 release notes draft committed

From
Bruce Momjian
Date:
On Mon, May  5, 2025 at 12:20:15PM -0700, Jacob Champion wrote:
> On Thu, May 1, 2025 at 7:44 PM Bruce Momjian <bruce@momjian.us> wrote:
> >         https://momjian.us/pgsql_docs/release-18.html
> 
> > +Add support for the "oauth" authentication (Jacob Champion, Daniel Gustafsson, Thomas Munro)
> 
> Should be either 'support for "oauth" authentication' or 'support for
> the "oauth" authentication method', I think.
Okay.

 
> > +This adds an "oauth" authentication method to pg_hba.conf, a server variable oauth_validator_libraries to specify
OAUTHlibraries, a configure flag --with-libcurl to add the required
 
> > +compile-time libraries, and libpq OAUTH options.
> 
> Maybe the description of oauth_validator_libraries could be something
> like "to load token validation modules"?

Done.

> Also, "OAUTH" should just be "OAuth". We should probably lock in the
> capitalization:
> 
> - "OAuth" is the name of the framework we're using
> - "oauth" is the HBA method name in the configs
> - "OAUTHBEARER" is the internal name of the SASL method, which most
> users don't care about and should only rarely appear in the docs

Capitalization changed, patch attached.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Do not let urgent matters crowd out time for investment in the future.

Attachment

Re: PG 18 release notes draft committed

From
Alexander Borisov
Date:
05.05.2025 03:22, Jelte Fennema-Nio wrote:

[...]

> 
> I think there are a few things at play here why that did not happen in
> Bruce his initial draft:
> 1. I personally think the requirement that Bruce uses for perf
> improvements to make it into the changelog is too strict (see my
> previous email for details)
> 2. Bruce is only a single person, and as such cannot read all emails
> on pgsql-hackers, so he relies only on commit messages to determine
> impact for release notes. The commit message for your change did not
> include any details on the perf improvements that could be expected.
> 3. After skimming the email thread[1], it's hard for me to understand
> where these perf numbers came from. And the first few results only
> mention casefold performance i.e. they call the results: "casefold()
> test." So, it's unclear what perf gains are expected for the other
> functions mentioned in the email subject.

I totally agree with you, it's hard to keep track of everything. It's
also a lot of work to read every commit and understand its essence.

I have no complaints, I'm just trying to understand the rules of getting
into Release Notes.
The rules, as it turns out, are not simple. But they are rules, even
though I don't agree with them, I accept them.

> 
> As for how to improve these:
> 1 is discussed/complained about basically every year whenever release
> notes are created. I don't think we can do any better than having
> those discussions. Unless someone else wants to start owning writing
> the release notes, or we somehow share the burden, e.g. by having the
> person that commits also write a release note entry.
> 2 can be improved by people including perf numbers in their commit
> messages. The second way to improve is by sending feedback on the
> release notes if things are missed, like you did.
> 3 is something you could help with I think. It would have been helpful
> if you had shared the script/commands you used to get these
> performance numbers. That way I could reproduce them myself. Also if
> you had included some perf numbers for lower() and upper() that would
> have been great too, as those are (currently) much more commonly used
> than casefold(). NOTE: I might have missed the script or be wrong
> about this some other way, since Jeff did not require this for
> committing it. If so, please disregard.
> 
> [1]: https://www.postgresql.org/message-id/flat/7cac7e66-9a3b-4e3f-a997-42aa0c401f80%40gmail.com

A bit about what those numbers are, in the discussion for the patch I
described how I got those numbers.

The point is that functions lower(), upper(), casefold() have one common
algorithm, the difference is in what table for mapping we pass to this
algorithm.
Therefore, there is no sense to measure the performance of each function
separately. Any of these functions will show the performance of the
algorithm of getting codepoints from tables in the same way.

Therefore, we can take lower() or upper() or casefold() and get the
result of Unicode table mapping algorithm (that's where I changed the
code, the algorithm).
I can measure everything, but there is no sense in it.
Here are the measurements made at the moment of patch discussion:

For each test, a sql file was created for pgbench. The data description
is present.

casefold() test.

ASCII:
Repeated characters (700kb) in the range from 0x20 to 0x7E.
Patch: tps = 278.449809
Without: tps = 266.526168

Cyrillic:
Repeated characters (1MB) in the range from 0x0410 to 0x042F.
Patch: tps = 86.740680
Without: tps = 49.373695

Unicode:
A query consisting of all Unicode characters from 0xA0 to 0x2FA1D
(excluding 0xD800..0xDFFF).
Patch: tps = 102.221092
Without: tps = 92.477798

* Ubuntu 24.04.1 (Intel(R) Xeon(R) Gold 6140) (gcc version 13.3.0)

ASCII:
Repeated characters (700kb) in the range from 0x20 to 0x7E.
Patch: tps = 146.712371
Without: tps = 120.794307

Cyrillic:
Repeated characters (1MB) in the range from 0x0410 to 0x042F.
Patch: tps = 44.499567
Without: tps = 24.237999

Unicode:
A query consisting of all Unicode characters from 0xA0 to 0x2FA1D
(excluding 0xD800..0xDFFF).
Patch: tps = 54.354833
Without: tps = 46.556531

> 
>> I will continue to improve Postgres.
> 
> Please do, your work is very much appreciated!

I thought it was worthy of a separate line in the Release Notes.
As I think, it is not so easy to increase the performance for Unicode.
So many users use lower() and upper(), and it would be nice to know that
work is being done to improve performance in this area.
But again, I'm new to the Postgres community and I'm getting to know
what's going on here and how it works.

Thank you for paying attention to it!

-- 
Regards,
Alexander Borisov



Re: PG 18 release notes draft committed

From
Tom Lane
Date:
Bruce Momjian <bruce@momjian.us> writes:
> Capitalization changed, patch attached.

I need to start wrapping the tarballs soon ... are you done
with the release notes for today?

            regards, tom lane



Re: PG 18 release notes draft committed

From
Bruce Momjian
Date:
On Mon, May  5, 2025 at 04:12:16PM -0400, Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > Capitalization changed, patch attached.
> 
> I need to start wrapping the tarballs soon ... are you done
> with the release notes for today?

Yes, I am, thanks for asking.  I was waiting for the case folding thread
to conclude, but I think it is still being discussed so let's not wait
for it.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Do not let urgent matters crowd out time for investment in the future.



Re: PG 18 release notes draft committed

From
David Rowley
Date:
On Tue, 6 May 2025 at 03:59, Bruce Momjian <bruce@momjian.us> wrote:
>
> On Mon, May  5, 2025 at 09:42:10PM +1200, David Rowley wrote:
> > I agree that 88f55bc97 and d69d45a5a should be in their own item.
> > Likely no need to go into detail about the speed up being about
> > "EquivalenceClass lookups". I imagine something like "Reduce planner
> > overheads when planning queries to partitioned and inheritance parent
> > tables"
> >
> > Then for bb3ec16e1, d47cbf474, cbc127917 and 525392d57, something like
> > "Defer locking of partitions during execution until after partition
> > elimination".  The release notes for 11.0 called it "partition
> > elimination", so I went with that naming.
>
> Okay, I split them up and went with the attached patch.


> +Allow partitions to be pruned more efficienty (Ashutosh Bapat, Yuya Watari, David Rowley)

I think you've misunderstood what's been changed here. Unfortunately,
it's not even true with a bit of eye squinting as these changes have
nothing to do with partition pruning. I think it would be much more
informative to state it as I suggested. Also, the spelling of
"efficiently" needs adjusted.

> +Avoid the locking of pruned partitions during planning (Amit Langote)

At the very least, you'd need to swap "planning" for "execution" as
the above statement isn't true.

David



Re: PG 18 release notes draft committed

From
Amit Langote
Date:
On Sat, May 3, 2025 at 1:18 AM Bruce Momjian <bruce@momjian.us> wrote:
> On Fri, May  2, 2025 at 01:00:57PM +0900, Amit Langote wrote:
> > 1. Speed up execution of cached plans by deferring locks on partitions
> > subject to pruning (Amit Langote)
> > (bb3ec16e1, d47cbf474, cbc127917, 525392d57)
> >
> > 2. Speed up child EquivalenceMember lookup in planner (Yuya Watari,
> > David Rowley)
> > (d69d45a5a)
> >
> > 3. Speed up derived clause lookup in EquivalenceClass (Ashutosh Bapat)
> > (88f55bc97)
> >
> > Alternatively, 2 and 3 can be combined as:
> >
> > 2. Speed up partition planning by improving EquivalenceClass lookups
> > (Yuya Watari, David Rowley, Ashutosh Bapat)
> >
> > I think 1 should go under Partitioning, which I see is currently missing.
> >
> > Any thoughts, David?
> >
> > Can work on a patch if you'd like.
>
> So, a few things.  First, these set of commits was in a group of 10 that
> I added since there have been complaints in the past that optimizer
> improvements were not listed and therefore patch authors were not given
> sufficient credit.  That means the 209 item count for PG 18 is 10 higher
> than my normal filtering would produce.
>
> Second, looking at the items, these are a case of "X is faster", which
> we don't normally mention in the release notes.  We normally mention
> "faster" when it is so much faster that use cases which were not
> possible before might be possible now, so it is recommended to retest.
> That is what I saw this grouped item as, whereas I don't think the
> individual items meet that criteria.
>
> Also, I didn't see enough partition items to warrant a separate
> partition section, and we didn't have one in PG 17 either.  We could
> pull all the partition items from the sections they are already in, but
> they seem more natural in the sections they are in.
>
> I don't think most people would know what EquivalenceMember is, and even
> if they did, would they be able to connect it to an SQL query?

Thanks for splitting these (cf847d634). I think the text for the
locking item should mention “during execution,” as David also
suggested. Again, I don’t think this change belongs under Optimizer
since it doesn’t really affect the planner -- it’s mainly an executor
improvement. Maybe the General Performance section is a better fit.

Also, just to clarify why the individual items are meaningful
performance improvements:

* Locking change: Executing cached plans involving hundreds or
thousands of partitions was bottlenecked by locking; with this change,
execution is now roughly 20x faster with 1000 partitions.

* Planning time improvements: Planning certain commonly used queries
against partitioned tables when they don’t use partition pruning is
now roughly 20x faster with 1000 partitions.

--
Thanks, Amit Langote



Re: PG 18 release notes draft committed

From
jian he
Date:
On Fri, May 2, 2025 at 10:44 AM Bruce Momjian <bruce@momjian.us> wrote:
>
>         release-16:   206
>         release-17:   182
>         release-18:   209
>
> I will continue improving it until beta 1, and until the final release.
> I will probably add markup in 1-3 weeks.  Let the feedback begin.  ;-)
>
> You can see the most current HTML-built version here:
>
>         https://momjian.us/pgsql_docs/release-18.html
>


```
Add pg_dump options --with-schema, --with-data, and --with_statistics
(Jeff Davis) §
The negative versions of these options already existed.

Add pg_dump option --sequence-data to dump sequence data that would
normally be excluded (Nathan Bossart) §

Add pg_dump, pg_dumpall, and pg_restore options --statistics-only,
--no-statistics, --no-data, and --no-schema (Corey Huinker, Jeff
Davis) §
````

in pg17, we only have "--schema-only", "--data-only",
so description "The negative versions of these options already
existed." is wrong?
you can also see the above third item conflict with it.

``--with_statistics`` should be ``--with-statistics``.



Add option --no-policies to pg_dump, pg_dumpall, pg_restore to avoid
policy specification (Nikolay Samokhvalov) §
This is useful for migrating to systems with different policies.

generally, we should say "row level security policy" instead of "policy"?
I think this sentence ( Add --no-policies option to control row level
security policy handling
in dump and restore operations.) in the commit message is good.
maybe we can change it to
( Add --no-policies option to control row level security policy
handling in pg_dump, pg_dumpall, pg_restore)



Allow jsonb NULL values to be cast to scalar types as NULL (Tom Lane) §
Previously such casts generated an error.

here should be "jsonb null values", since we can not do ``select
'NULL'::jsonb;``



Re: PG 18 release notes draft committed

From
jian he
Date:
Allow partitions to be pruned more efficienty (Ashutosh Bapat, Yuya
Watari, David Rowley) § §
typo, "efficienty" should be "efficiently"?