<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/postgresql.git/src/backend/utils/adt, branch master</title>
<subtitle>git.postgresql.org: git/postgresql.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/'/>
<entry>
<title>ICU: check for U_STRING_NOT_TERMINATED_WARNING.</title>
<updated>2023-05-17T21:18:45+00:00</updated>
<author>
<name>Jeff Davis</name>
<email>jdavis@postgresql.org</email>
</author>
<published>2023-05-17T20:43:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=1c634f6647c28354258d114041252475325aea32'/>
<id>1c634f6647c28354258d114041252475325aea32</id>
<content type='text'>
Fixes memory error in cases where the length of the language name
returned by uloc_getLanguage() is exactly ULOC_LANG_CAPACITY, in which
case the status is set to U_STRING_NOT_TERMINATED_WARNING.

Also check in call sites for other ICU functions that are expected to
return a C string to be safe (no bug is known at these other call
sites).

Reported-by: Alexander Lakhin
Discussion: https://postgr.es/m/2098874d-c111-41e4-9063-30bcf135226b@gmail.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes memory error in cases where the length of the language name
returned by uloc_getLanguage() is exactly ULOC_LANG_CAPACITY, in which
case the status is set to U_STRING_NOT_TERMINATED_WARNING.

Also check in call sites for other ICU functions that are expected to
return a C string to be safe (no bug is known at these other call
sites).

Reported-by: Alexander Lakhin
Discussion: https://postgr.es/m/2098874d-c111-41e4-9063-30bcf135226b@gmail.com
</pre>
</div>
</content>
</entry>
<entry>
<title>Reduce icu_validation_level default to WARNING.</title>
<updated>2023-05-17T20:18:40+00:00</updated>
<author>
<name>Jeff Davis</name>
<email>jdavis@postgresql.org</email>
</author>
<published>2023-05-17T20:18:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=6de31ce446e59a1f947c7ebe4e4bbe7ca2b842bc'/>
<id>6de31ce446e59a1f947c7ebe4e4bbe7ca2b842bc</id>
<content type='text'>
Discussion: https://postgr.es/m/daa9f060aa2349ebc84444515efece49e7b32c5d.camel@j-davis.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Discussion: https://postgr.es/m/daa9f060aa2349ebc84444515efece49e7b32c5d.camel@j-davis.com
</pre>
</div>
</content>
</entry>
<entry>
<title>Add writeback to pg_stat_io</title>
<updated>2023-05-17T18:18:35+00:00</updated>
<author>
<name>Andres Freund</name>
<email>andres@anarazel.de</email>
</author>
<published>2023-05-17T18:18:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=093e5c57d506783a95dd8feddd9a3f2651e1aeba'/>
<id>093e5c57d506783a95dd8feddd9a3f2651e1aeba</id>
<content type='text'>
28e626bde00 added the concept of IOOps but neglected to include writeback
operations. ac8d53dae5 added time spent doing these I/O operations. Without
counting writeback, checkpointer write time in the log often differed
substantially from that in pg_stat_io. To fix this, add IOOp IOOP_WRITEBACK
and track writeback in pg_stat_io.

Bumps catversion.

Author: Melanie Plageman &lt;melanieplageman@gmail.com&gt;
Reviewed-by: Kyotaro Horiguchi &lt;horikyota.ntt@gmail.com&gt;
Reported-by: Andres Freund &lt;andres@anarazel.de&gt;
Discussion: https://postgr.es/m/20230419172326.dhgyo4wrrhulovt6%40awork3.anarazel.de
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
28e626bde00 added the concept of IOOps but neglected to include writeback
operations. ac8d53dae5 added time spent doing these I/O operations. Without
counting writeback, checkpointer write time in the log often differed
substantially from that in pg_stat_io. To fix this, add IOOp IOOP_WRITEBACK
and track writeback in pg_stat_io.

Bumps catversion.

Author: Melanie Plageman &lt;melanieplageman@gmail.com&gt;
Reviewed-by: Kyotaro Horiguchi &lt;horikyota.ntt@gmail.com&gt;
Reported-by: Andres Freund &lt;andres@anarazel.de&gt;
Discussion: https://postgr.es/m/20230419172326.dhgyo4wrrhulovt6%40awork3.anarazel.de
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Add USER SET parameter values for pg_db_role_setting"</title>
<updated>2023-05-17T17:28:57+00:00</updated>
<author>
<name>Alexander Korotkov</name>
<email>akorotkov@postgresql.org</email>
</author>
<published>2023-05-17T17:06:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=b9a7a822723aebb16cbe7e5fb874e5124745b07e'/>
<id>b9a7a822723aebb16cbe7e5fb874e5124745b07e</id>
<content type='text'>
This reverts commit 096dd80f3ccc and its fixups beecbe8e5001, afdd9f7f0e00,
529da086ba, db93e739ac61.

Catversion is bumped.

Discussion: https://postgr.es/m/d46f9265-ff3c-6743-2278-6772598233c2%40pgmasters.net
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 096dd80f3ccc and its fixups beecbe8e5001, afdd9f7f0e00,
529da086ba, db93e739ac61.

Catversion is bumped.

Discussion: https://postgr.es/m/d46f9265-ff3c-6743-2278-6772598233c2%40pgmasters.net
</pre>
</div>
</content>
</entry>
<entry>
<title>Add back SQLValueFunction for SQL keywords</title>
<updated>2023-05-17T01:19:17+00:00</updated>
<author>
<name>Michael Paquier</name>
<email>michael@paquier.xyz</email>
</author>
<published>2023-05-17T01:19:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=d8c3106bb60e4f87be595f241e173ba3c2b7aa2c'/>
<id>d8c3106bb60e4f87be595f241e173ba3c2b7aa2c</id>
<content type='text'>
This is equivalent to a revert of f193883 and fb32748, with the addition
that the declaration of the SQLValueFunction node needs to gain a couple
of node_attr for query jumbling.  The performance impact of removing the
function call inlining is proving to be too huge for some workloads
where these are used.  A worst-case test case of involving only simple
SELECT queries with a SQL keyword is proving to lead to a reduction of
10% in TPS via pgbench and prepared queries on a high-end machine.

None of the tests I ran back for this set of changes saw such a huge
gap, but Alexander Lakhin and Andres Freund have found that this can be
noticeable.  Keeping the older performance would mean to do more
inlining in the executor when using COERCE_SQL_SYNTAX for a function
expression, similarly to what SQLValueFunction does.  This requires more
redesign work and there is little time until 16beta1 is released, so for
now reverting the change is the best way forward, bringing back the
previous performance.

Bump catalog version.

Reported-by: Alexander Lakhin
Discussion: https://postgr.es/m/b32bed1b-0746-9b20-1472-4bdc9ca66d52@gmail.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is equivalent to a revert of f193883 and fb32748, with the addition
that the declaration of the SQLValueFunction node needs to gain a couple
of node_attr for query jumbling.  The performance impact of removing the
function call inlining is proving to be too huge for some workloads
where these are used.  A worst-case test case of involving only simple
SELECT queries with a SQL keyword is proving to lead to a reduction of
10% in TPS via pgbench and prepared queries on a high-end machine.

None of the tests I ran back for this set of changes saw such a huge
gap, but Alexander Lakhin and Andres Freund have found that this can be
noticeable.  Keeping the older performance would mean to do more
inlining in the executor when using COERCE_SQL_SYNTAX for a function
expression, similarly to what SQLValueFunction does.  This requires more
redesign work and there is little time until 16beta1 is released, so for
now reverting the change is the best way forward, bringing back the
previous performance.

Bump catalog version.

Reported-by: Alexander Lakhin
Discussion: https://postgr.es/m/b32bed1b-0746-9b20-1472-4bdc9ca66d52@gmail.com
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "ICU: do not convert locale 'C' to 'en-US-u-va-posix'."</title>
<updated>2023-05-09T03:50:51+00:00</updated>
<author>
<name>Jeff Davis</name>
<email>jdavis@postgresql.org</email>
</author>
<published>2023-05-09T03:50:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=455f948b0d03a556533a7e4a1a8abf45f0eb202e'/>
<id>455f948b0d03a556533a7e4a1a8abf45f0eb202e</id>
<content type='text'>
This reverts commit f7faa9976cc0504c027a20ed66ceca9018041dd4.

Discussion: https://postgr.es/m/483826.1683582475@sss.pgh.pa.us
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit f7faa9976cc0504c027a20ed66ceca9018041dd4.

Discussion: https://postgr.es/m/483826.1683582475@sss.pgh.pa.us
</pre>
</div>
</content>
</entry>
<entry>
<title>ICU: do not convert locale 'C' to 'en-US-u-va-posix'.</title>
<updated>2023-05-08T17:34:51+00:00</updated>
<author>
<name>Jeff Davis</name>
<email>jdavis@postgresql.org</email>
</author>
<published>2023-05-08T17:34:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=f7faa9976cc0504c027a20ed66ceca9018041dd4'/>
<id>f7faa9976cc0504c027a20ed66ceca9018041dd4</id>
<content type='text'>
The conversion was intended to be for convenience, but it's more
likely to be confusing than useful.

The user can still directly specify 'en-US-u-va-posix' if desired.

Discussion: https://postgr.es/m/f83f089ee1e9acd5dbbbf3353294d24e1f196e95.camel@j-davis.com
Discussion: https://postgr.es/m/37520ec1ae9591f83132f82dbd625f3fc2d69c16.camel@j-davis.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The conversion was intended to be for convenience, but it's more
likely to be confusing than useful.

The user can still directly specify 'en-US-u-va-posix' if desired.

Discussion: https://postgr.es/m/f83f089ee1e9acd5dbbbf3353294d24e1f196e95.camel@j-davis.com
Discussion: https://postgr.es/m/37520ec1ae9591f83132f82dbd625f3fc2d69c16.camel@j-davis.com
</pre>
</div>
</content>
</entry>
<entry>
<title>Add ruleutils support for decompiling MERGE commands.</title>
<updated>2023-05-07T15:01:15+00:00</updated>
<author>
<name>Tom Lane</name>
<email>tgl@sss.pgh.pa.us</email>
</author>
<published>2023-05-07T15:01:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=41e2c52fd6ebed6eff4184f68048813cc8886ec1'/>
<id>41e2c52fd6ebed6eff4184f68048813cc8886ec1</id>
<content type='text'>
This was overlooked when MERGE was added, but it's essential
support for MERGE in new-style SQL functions.

Alvaro Herrera

Discussion: https://postgr.es/m/3579737.1683293801@sss.pgh.pa.us
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was overlooked when MERGE was added, but it's essential
support for MERGE in new-style SQL functions.

Alvaro Herrera

Discussion: https://postgr.es/m/3579737.1683293801@sss.pgh.pa.us
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix ExecCheckPermissions call in RI_Initial_Check</title>
<updated>2023-05-04T17:55:56+00:00</updated>
<author>
<name>Alvaro Herrera</name>
<email>alvherre@alvh.no-ip.org</email>
</author>
<published>2023-05-04T17:55:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=f75cec4fff877ef24e4932a628fc974f3116ed16'/>
<id>f75cec4fff877ef24e4932a628fc974f3116ed16</id>
<content type='text'>
RI_Initial_Check was setting up a list of RTEPermissionInfo for
ExecCheckPermissions() wrong, and the problem is subtle enough that it
doesn't have any immediate effect in core code.  However, if an
extension is using the ExecutorCheckPerms_hook, then it would get the
wrong parameters and perhaps arrive at a wrong conclusion, or outright
malfunction.  Fix by constructing that list and the RTE list more
honestly.

We also add an assertion check to verify that these lists match.  This
new assertion would have caught this bug.

Co-authored-by: Олег Целебровский (Oleg Tselebrovskii) &lt;o.tselebrovskiy@postgrespro.ru&gt;
Co-authored-by: Álvaro Herrera &lt;alvherre@alvh.no-ip.org&gt;
Reviewed-by: Amit Langote &lt;amitlangote09@gmail.com&gt;
Discussion: https://postgr.es/m/3722b7a2cbe27a1796ee40824bd86dd1@postgrespro.ru
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
RI_Initial_Check was setting up a list of RTEPermissionInfo for
ExecCheckPermissions() wrong, and the problem is subtle enough that it
doesn't have any immediate effect in core code.  However, if an
extension is using the ExecutorCheckPerms_hook, then it would get the
wrong parameters and perhaps arrive at a wrong conclusion, or outright
malfunction.  Fix by constructing that list and the RTE list more
honestly.

We also add an assertion check to verify that these lists match.  This
new assertion would have caught this bug.

Co-authored-by: Олег Целебровский (Oleg Tselebrovskii) &lt;o.tselebrovskiy@postgrespro.ru&gt;
Co-authored-by: Álvaro Herrera &lt;alvherre@alvh.no-ip.org&gt;
Reviewed-by: Amit Langote &lt;amitlangote09@gmail.com&gt;
Discussion: https://postgr.es/m/3722b7a2cbe27a1796ee40824bd86dd1@postgrespro.ru
</pre>
</div>
</content>
</entry>
<entry>
<title>In array_position()/array_positions(), beware of empty input array.</title>
<updated>2023-05-04T15:48:23+00:00</updated>
<author>
<name>Tom Lane</name>
<email>tgl@sss.pgh.pa.us</email>
</author>
<published>2023-05-04T15:48:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=4c40995f61227c579bd7269a829c00013ac66492'/>
<id>4c40995f61227c579bd7269a829c00013ac66492</id>
<content type='text'>
These functions incautiously fetched the array's first lower bound
even when the array is zero-dimensional, thus fetching the word
after the allocated array space.  While almost always harmless,
with very bad luck this could result in SIGSEGV.  Fix by adding
an early exit for empty input.

Per bug #17920 from Alexander Lakhin.

Discussion: https://postgr.es/m/17920-f7c228c627b6d02e%40postgresql.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These functions incautiously fetched the array's first lower bound
even when the array is zero-dimensional, thus fetching the word
after the allocated array space.  While almost always harmless,
with very bad luck this could result in SIGSEGV.  Fix by adding
an early exit for empty input.

Per bug #17920 from Alexander Lakhin.

Discussion: https://postgr.es/m/17920-f7c228c627b6d02e%40postgresql.org
</pre>
</div>
</content>
</entry>
</feed>
