pgsql: Fix mistake in comment.

2022-07-11 Thread Robert Haas
Fix mistake in comment.

Kyotaro Horiguchi

Discussion: 
http://postgr.es/m/[email protected]

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/b2d5b4c6e09b2a505ced098d2cb1e7b015bfc50d

Modified Files
--
src/backend/storage/buffer/bufmgr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)



pgsql: Rationalize order of input files for gen_node_support.pl.

2022-07-11 Thread Tom Lane
Rationalize order of input files for gen_node_support.pl.

Per a question from Andres Freund.  While here, also make the
list of nodetag-only files easier to compare to the full list
of input files.

Discussion: 
https://postgr.es/m/[email protected]

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/bf022d337ef096c79e6a0b51f0b42e69749ae210

Modified Files
--
src/backend/nodes/Makefile| 28 
src/backend/nodes/gen_node_support.pl | 27 +--
src/tools/msvc/Solution.pm| 27 +--
3 files changed, 50 insertions(+), 32 deletions(-)



pgsql: relnotes: updates "cumulative statistics system" mention

2022-07-11 Thread Bruce Momjian
relnotes:  updates "cumulative statistics system" mention

Also add "the".

Reported-by: Justin Pryzby

Discussion: https://postgr.es/m/[email protected]

Backpatch-through: 15 only

Branch
--
REL_15_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/d8759a40bfce756f655b2afab129915640bebf0a

Modified Files
--
doc/src/sgml/release-15.sgml | 8 
1 file changed, 4 insertions(+), 4 deletions(-)



pgsql: Provide log_status_format(), useful for an emit_log_hook.

2022-07-11 Thread Jeff Davis
Provide log_status_format(), useful for an emit_log_hook.

Refactor so that log_line_prefix() is a thin wrapper over a new
function log_status_format(), and move the implementation to the
latter. Export log_status_format() so that it can be used by an
emit_log_hook.

Discussion: 
https://postgr.es/m/39c8197652f4d3050aedafae79fa5af31096505f.camel%40j-davis.com
Reviewed-by: Michael Paquier, Alvaro Herrera

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/b40baa96a7ad789718dcf59b1dd73bae15c3a7e1

Modified Files
--
src/backend/utils/error/elog.c | 15 ---
src/include/utils/elog.h   |  4 
2 files changed, 16 insertions(+), 3 deletions(-)



Re: pgsql: Build de-escaped JSON strings in larger chunks during lexing

2022-07-11 Thread Tom Lane
John Naylor  writes:
> Build de-escaped JSON strings in larger chunks during lexing

It looks like this broke buildfarm member skink (valgrind).

regards, tom lane




pgsql: Doc: Acknowledge historically supported CPUs and OSes.

2022-07-11 Thread Thomas Munro
Doc: Acknowledge historically supported CPUs and OSes.

PostgreSQL/POSTGRES has run on a huge range of CPUs and OSes.  As we're
dropping some of the earliest systems the project was founded on, let's
provide a place to remember them.

Discussion: https://postgr.es/m/959917.1657522169%40sss.pgh.pa.us

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/14168d3c62fa90f1ec447f873f0e4df16a57a717

Modified Files
--
doc/src/sgml/installation.sgml | 8 
1 file changed, 8 insertions(+)



pgsql: Further tidy-up for old CPU architectures.

2022-07-11 Thread Thomas Munro
Further tidy-up for old CPU architectures.

Further to commit 92d70b77, let's drop the code we carry for the
following untested architectures: M68K, M88K, M32R, SuperH.  We have no
idea if anything actually works there, and surely as vintage hardware
and microcontrollers they would be underpowered for modern purposes.

We could always consider re-adding SuperH based on evidence of usage and
build farm support, if someone shows up to provide it.

While here, SPARC is usually written in all caps.

Suggested-by: Tom Lane 
Reviewed-by: Tom Lane 
Reviewed-by: Robert Haas  (the idea, not the patch)
Discussion: https://postgr.es/m/959917.1657522169%40sss.pgh.pa.us

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/718aa43a4ee613bf85afadb1596f861e1228ca43

Modified Files
--
doc/src/sgml/installation.sgml|   5 +-
src/backend/storage/lmgr/s_lock.c |  65 
src/include/storage/s_lock.h  | 102 --
3 files changed, 2 insertions(+), 170 deletions(-)



pgsql: Support TRUNCATE triggers on foreign tables.

2022-07-11 Thread Fujii Masao
Support TRUNCATE triggers on foreign tables.

Now some foreign data wrappers support TRUNCATE command.
So it's useful to support TRUNCATE triggers on foreign tables for
audit logging or for preventing undesired truncation.

Author: Yugo Nagata
Reviewed-by: Fujii Masao, Ian Lawrence Barwick
Discussion: 
https://postgr.es/m/[email protected]

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/3b00a944a9b3847fb02dae7c9ea62fe0b211b396

Modified Files
--
contrib/postgres_fdw/expected/postgres_fdw.out | 9 ++---
contrib/postgres_fdw/sql/postgres_fdw.sql  | 5 +++--
doc/src/sgml/ref/create_trigger.sgml   | 4 ++--
src/backend/commands/trigger.c | 7 ---
4 files changed, 11 insertions(+), 14 deletions(-)



Re: pgsql: Build de-escaped JSON strings in larger chunks during lexing

2022-07-11 Thread John Naylor
On Tue, Jul 12, 2022 at 5:15 AM Tom Lane  wrote:
>
> It looks like this broke buildfarm member skink (valgrind).

Looking...

-- 
John Naylor
EDB: http://www.enterprisedb.com




pgsql: Fix out-of-bounds read in json_lex_string

2022-07-11 Thread John Naylor
Fix out-of-bounds read in json_lex_string

Commit 3838fa269 added a lookahead loop to allow building strings multiple
bytes at a time. This loop could exit because it reached the end of input,
yet did not check for that before checking if we reached the end of a
valid string. To fix, put the end of string check back in the outer loop.

Per Valgrind animal skink

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/d3117fc1a3e87717a57be0153408e5387e265e1b

Modified Files
--
src/common/jsonapi.c | 18 ++
1 file changed, 10 insertions(+), 8 deletions(-)



Re: pgsql: Fix out-of-bounds read in json_lex_string

2022-07-11 Thread John Naylor
On Tue, Jul 12, 2022 at 11:27 AM John Naylor  wrote:
>
> Fix out-of-bounds read in json_lex_string

The failure on peripatus (FreeBSD HEAD) seems completely unrelated to
the changes in the commit:

ld: error: unable to find library -lldap_r
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[3]: *** [../../../src/Makefile.shlib:258: libpq.so.5] Error 1


-- 
John Naylor
EDB: http://www.enterprisedb.com




Re: pgsql: Fix out-of-bounds read in json_lex_string

2022-07-11 Thread Tom Lane
John Naylor  writes:
> On Tue, Jul 12, 2022 at 11:27 AM John Naylor  
> wrote:
>> Fix out-of-bounds read in json_lex_string

> The failure on peripatus (FreeBSD HEAD) seems completely unrelated to
> the changes in the commit:
> ld: error: unable to find library -lldap_r

Agreed, that looks like some unrelated platform change.  Larry?

regards, tom lane




Re: pgsql: Fix out-of-bounds read in json_lex_string

2022-07-11 Thread Tom Lane
I wrote:
> John Naylor  writes:
>> ld: error: unable to find library -lldap_r

> Agreed, that looks like some unrelated platform change.  Larry?

Upon further thought, this looks like fallout from an upgrade to
OpenLDAP 2.5, which eliminated libldap_r.  That should be fine,
but you might need to blow away the animal's accache files to
make configure reconsider the situation.

regards, tom lane