pgsql: meson: Fix typo in pkgconfig generation

2023-02-01 Thread Peter Eisentraut
meson: Fix typo in pkgconfig generation

Reviewed-by: Andres Freund 
Discussion: 
https://www.postgresql.org/message-id/flat/07b37c70-349a-8fcd-bcc9-6c3ce0f6c2a4%40enterprisedb.com

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/253432f42661fdd67d235252949e2838aa6421fd

Modified Files
--
src/interfaces/ecpg/ecpglib/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



pgsql: Refactor heapam.c adding heapgettup_initial_block function

2023-02-01 Thread David Rowley
Refactor heapam.c adding heapgettup_initial_block function

Here we adjust heapgettup() and heapgettup_pagemode() to move the code
that fetches the first block number to scan out into a helper function.
This removes some code duplication.

Author: Melanie Plageman
Reviewed-by: David Rowley
Discussion: 
https://postgr.es/m/CAAKRu_bvkhka0CZQun28KTqhuUh5ZqY=_t8qeqzqol02rpi...@mail.gmail.com

Branch
--
master

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

Modified Files
--
src/backend/access/heap/heapam.c | 223 ++-
1 file changed, 102 insertions(+), 121 deletions(-)



Re: pgsql: Do assorted mop-up in the planner.

2023-02-01 Thread Robins Tharakan
Hi Tom,

On Tue, 31 Jan 2023 at 05:43, Tom Lane  wrote:
>
> Do assorted mop-up in the planner.

This commit is causing occasional Asserts in my testing.
SQL / Backtrace / triaging below.

Program terminated with signal SIGABRT, Aborted.
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50  ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x7f6d091d0859 in __GI_abort () at abort.c:79
#2  0x55bf99f9d962 in ExceptionalCondition
(conditionName=0x55bf9a153280 "bms_is_subset(rinfo->required_relids,
both_input_relids)", fileName=0x55bf9a152faf "relnode.c",
lineNumber=1314) at assert.c:66
#3  0x55bf99cc3689 in subbuild_joinrel_restrictlist
(root=0x55bf9b35ec08, joinrel=0x55bf9b36bc38,
input_rel=0x55bf9b367420, both_input_relids=0x55bf9b36c7f8,
new_restrictlist=0x0)
at relnode.c:1314
#4  0x55bf99cc33f9 in build_joinrel_restrictlist
(root=0x55bf9b35ec08, joinrel=0x55bf9b36bc38,
outer_rel=0x55bf9b367420, inner_rel=0x55bf9b3660e0) at relnode.c:1232
#5  0x55bf99cc2730 in build_join_rel (root=0x55bf9b35ec08,
joinrelids=0x55bf9b36b2a8, outer_rel=0x55bf9b367420,
inner_rel=0x55bf9b3660e0, sjinfo=0x55bf9b368068,
restrictlist_ptr=0x7ffd89ee7560) at relnode.c:771
#6  0x55bf99c5eedf in make_join_rel (root=0x55bf9b35ec08,
rel1=0x55bf9b367420, rel2=0x55bf9b3660e0) at joinrels.c:756
#7  0x55bf99c5e3bd in make_rels_by_clause_joins
(root=0x55bf9b35ec08, old_rel=0x55bf9b367420,
other_rels_list=0x55bf9b36b408, other_rels=0x55bf9b36b420) at
joinrels.c:312
#8  0x55bf99c5dedd in join_search_one_level (root=0x55bf9b35ec08,
level=3) at joinrels.c:123
#9  0x55bf99c3fbc7 in standard_join_search (root=0x55bf9b35ec08,
levels_needed=3, initial_rels=0x55bf9b36b408) at allpaths.c:3387
#10 0x55bf99c3fb34 in make_rel_from_joinlist (root=0x55bf9b35ec08,
joinlist=0x55bf9b367f18) at allpaths.c:3318
#11 0x55bf99c3aabd in make_one_rel (root=0x55bf9b35ec08,
joinlist=0x55bf9b367f18) at allpaths.c:211
#12 0x55bf99c7aa5e in query_planner (root=0x55bf9b35ec08,
qp_callback=0x55bf99c8112d ,
qp_extra=0x7ffd89ee79b0) at planmain.c:278
#13 0x55bf99c7d374 in grouping_planner (root=0x55bf9b35ec08,
tuple_fraction=0) at planner.c:1488
#14 0x55bf99c7ca2f in subquery_planner (glob=0x55bf9b340e18,
parse=0x55bf9b26f5b8, parent_root=0x0, hasRecursion=false,
tuple_fraction=0) at planner.c:1057
#15 0x55bf99c7b137 in standard_planner (parse=0x55bf9b26f5b8,
query_string=0x55bf9b26de28 "SELECT pg_catalog.avg(NULL::NUMERIC)
OVER (ORDER BY ref_3.schemaname) AS c2\nFROM (SELECT) AS subq_0\n
LEFT JOIN pg_catalog.pg_statio_all_sequences AS ref_3 ON NULL;",
cursorOptions=2048, boundParams=0x0) at planner.c:411


SQL:
SELECT pg_catalog.avg(NULL::NUMERIC) OVER (ORDER BY ref_3.schemaname) AS c2
FROM (SELECT) AS subq_0
 LEFT JOIN pg_catalog.pg_statio_all_sequences AS ref_3 ON NULL;

Checking (fb1a59de0c~10) - 8c1cd726c5d997d5d170505ec15a2dc1dfe81d6a - Crash
Checking (fb1a59de0c~11) - 54e72b66ed1a55c2fa558bc60d534bdc61dbb62f - Crash
Checking (fb1a59de0c~12) - 3bef56e11650a33f70adeb6dd442bc2b48bb9b72 - Crash
Checking (fb1a59de0c~13) - b448f1c8d83f8b65e2f0080c556ee21a7076da25 - Crash
Checking (fb1a59de0c~14) - 2489d76c4906f4461a364ca8ad7e0751ead8aa0d - Success
Checking (fb1a59de0c~15) - ec7e053a98f39a9e3c7e6d35f0d2e83933882399 - Success


Thanks to SQLSmith / SQLReduce.

-
Robins Tharakan
Amazon Web Services




Re: pgsql: Do assorted mop-up in the planner.

2023-02-01 Thread Tom Lane
Robins Tharakan  writes:
> This commit is causing occasional Asserts in my testing.

Thanks!  I'm tired now, but will have a look tomorrow.

regards, tom lane




pgsql: Allow the logical_replication_mode to be used on the subscriber.

2023-02-01 Thread Amit Kapila
Allow the logical_replication_mode to be used on the subscriber.

Extend the existing developer option 'logical_replication_mode' to help
test the parallel apply of large transactions on the subscriber.

When set to 'buffered', the leader sends changes to parallel apply workers
via a shared memory queue. When set to 'immediate', the leader serializes
all changes to files and notifies the parallel apply workers to read and
apply them at the end of the transaction.

This helps in adding tests to cover the serialization code path in
parallel streaming mode.

Author: Hou Zhijie
Reviewed-by: Peter Smith, Kuroda Hayato, Sawada Masahiko, Amit Kapila
Discussion: 
https://postgr.es/m/caa4ek1+wyn6zpahukclorewnx75mg0xhmwcfhvjqm2kurze...@mail.gmail.com

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/9f2213a7c575bae43a2d41abc8b60770066ca81c

Modified Files
--
doc/src/sgml/config.sgml   | 35 +
.../replication/logical/applyparallelworker.c  | 16 --
src/backend/utils/misc/guc_tables.c|  6 ++-
src/test/subscription/t/015_stream.pl  | 28 ++
.../subscription/t/018_stream_subxact_abort.pl | 61 +-
src/test/subscription/t/023_twophase_stream.pl | 46 +++-
6 files changed, 172 insertions(+), 20 deletions(-)



pgsql: Doc: Abstract AF_UNIX sockets don't work on Windows.

2023-02-01 Thread Thomas Munro
Doc: Abstract AF_UNIX sockets don't work on Windows.

An early release of AF_UNIX in Windows apparently supported Linux-style
"abstract" Unix sockets, but they do not seem to work in current Windows
versions and there is no mention of any of this in the Winsock
documentation.  Remove the mention of Windows from the documentation.

Back-patch to 14, where commit c9f0624b landed.

Discussion: 
https://postgr.es/m/CA%2BhUKGKrYbSZhrk4NGfoQGT_3LQS5pC5KNE1g0tvE_pPBZ7uew%40mail.gmail.com

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/117d2604c2a59eb853e894410b94b4c453f8bd43

Modified Files
--
doc/src/sgml/config.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



pgsql: Doc: Abstract AF_UNIX sockets don't work on Windows.

2023-02-01 Thread Thomas Munro
Doc: Abstract AF_UNIX sockets don't work on Windows.

An early release of AF_UNIX in Windows apparently supported Linux-style
"abstract" Unix sockets, but they do not seem to work in current Windows
versions and there is no mention of any of this in the Winsock
documentation.  Remove the mention of Windows from the documentation.

Back-patch to 14, where commit c9f0624b landed.

Discussion: 
https://postgr.es/m/CA%2BhUKGKrYbSZhrk4NGfoQGT_3LQS5pC5KNE1g0tvE_pPBZ7uew%40mail.gmail.com

Branch
--
REL_15_STABLE

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

Modified Files
--
doc/src/sgml/config.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



pgsql: Doc: Abstract AF_UNIX sockets don't work on Windows.

2023-02-01 Thread Thomas Munro
Doc: Abstract AF_UNIX sockets don't work on Windows.

An early release of AF_UNIX in Windows apparently supported Linux-style
"abstract" Unix sockets, but they do not seem to work in current Windows
versions and there is no mention of any of this in the Winsock
documentation.  Remove the mention of Windows from the documentation.

Back-patch to 14, where commit c9f0624b landed.

Discussion: 
https://postgr.es/m/CA%2BhUKGKrYbSZhrk4NGfoQGT_3LQS5pC5KNE1g0tvE_pPBZ7uew%40mail.gmail.com

Branch
--
REL_14_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/36c910f037836ed1b4143f40af43df488c9fbd6c

Modified Files
--
doc/src/sgml/config.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)