pgsql: Fix thinko in 720e0327bc

2022-12-25 Thread Andrew Dunstan
Fix thinko in 720e0327bc

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/361ec4368b1da252e031e2ee8bce366bce5f72b2

Modified Files
--
contrib/isn/isn.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)



pgsql: Convert enum_in() to report errors softly.

2022-12-25 Thread Tom Lane
Convert enum_in() to report errors softly.

I missed this in my initial survey, probably because I examined
the contents of pg_type in the postgres database, which lacks
any enumerated types.

Discussion: 
https://postgr.es/m/caaj_b97kedwudptkgoafypv0oicjou6ew+qywj-ywrgj_ae...@mail.gmail.com

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/442e25d2485b1ecf3357725acee995a1c349163d

Modified Files
--
src/backend/utils/adt/enum.c   | 12 +---
src/test/regress/expected/enum.out | 25 +
src/test/regress/sql/enum.sql  |  6 ++
3 files changed, 40 insertions(+), 3 deletions(-)



pgsql: Switch query fixing aclitems in ~15 from O(N^2) to O(N) in upgra

2022-12-25 Thread Michael Paquier
Switch query fixing aclitems in ~15 from O(N^2) to O(N) in upgrade_adapt.sql

f4f2f2b was doing a sequential scan of pg_class before checking if a
relation had attributes dependent on aclitem as data typewhen building
the set of ALTER TABLE queries, but it would be costly on a regression
database.

While on it, make the query style more consistent with the rest.

Reported-by: Justin Pryzby
Discussion: https://postgr.es/m/[email protected]

Branch
--
master

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

Modified Files
--
src/bin/pg_upgrade/upgrade_adapt.sql | 26 +++---
1 file changed, 11 insertions(+), 15 deletions(-)



pgsql: Add 'logical_decoding_mode' GUC.

2022-12-25 Thread Amit Kapila
Add 'logical_decoding_mode' GUC.

This enables streaming or serializing changes immediately in logical
decoding. This parameter is intended to be used to test logical decoding
and replication of large transactions for which otherwise we need to
generate the changes till logical_decoding_work_mem is reached.

This helps in reducing the timing of existing tests related to logical
replication of in-progress transactions and will help in writing tests for
for the upcoming feature for parallelly applying large in-progress
transactions.

Author: Shi yu
Reviewed-by: Sawada Masahiko, Shveta Mallik, Amit Kapila, Dilip Kumar, Kuroda 
Hayato, Kyotaro Horiguchi
Discussion: 
https://postgr.es/m/oszpr01mb63104e7449dbe41932db19f1fd...@oszpr01mb6310.jpnprd01.prod.outlook.com

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/5de94a041ed7a51b571db2030ba87600c7fc6262

Modified Files
--
doc/src/sgml/config.sgml   | 28 
src/backend/replication/logical/reorderbuffer.c| 33 +-
src/backend/utils/misc/guc_tables.c| 17 
src/include/replication/reorderbuffer.h|  8 
src/test/subscription/t/016_stream_subxact.pl  | 18 
.../subscription/t/018_stream_subxact_abort.pl | 50 +++---
.../subscription/t/019_stream_subxact_ddl_abort.pl | 18 
src/test/subscription/t/023_twophase_stream.pl | 28 ++--
src/tools/pgindent/typedefs.list   |  1 +
9 files changed, 134 insertions(+), 67 deletions(-)