pgsql: Improve documentation for COPY ... ON_ERROR ...

2024-02-02 Thread Alexander Korotkov
Improve documentation for COPY ... ON_ERROR ... Discussion: https://postgr.es/m/20240126112829.d420b28859fbe84379fdb7ad%40sraoss.co.jp Author: Yugo Nagata Reviewed-by: Masahiko Sawada, David G. Johnston, Atsushi Torikoshi Branch -- master Details ---

pgsql: Fix typo in comments

2024-02-02 Thread Heikki Linnakangas
Fix typo in comments Backpatch-through: v16 Branch -- REL_16_STABLE Details --- https://git.postgresql.org/pg/commitdiff/cd307c38f043e40fd2419d5a035b1a078a32c6b4 Modified Files -- src/backend/storage/buffer/bufmgr.c | 8 1 file changed, 4 insertions(+), 4

pgsql: Fix typo in comments

2024-02-02 Thread Heikki Linnakangas
Fix typo in comments Backpatch-through: v16 Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/18dd9d2ed978547ecc4c9195e2f5d3b80cc79bde Modified Files -- src/backend/storage/buffer/bufmgr.c | 8 1 file changed, 4 insertions(+), 4 deletions(-)

pgsql: Translate ENOMEM to ERRCODE_OUT_OF_MEMORY in errcode_for_file_ac

2024-02-02 Thread Tom Lane
Translate ENOMEM to ERRCODE_OUT_OF_MEMORY in errcode_for_file_access(). Previously you got ERRCODE_INTERNAL_ERROR, which seems inappropriate, especially given that we're trying to avoid emitting that in reachable cases. Alexander Kuzmenkov Discussion:

pgsql: Translate ENOMEM to ERRCODE_OUT_OF_MEMORY in errcode_for_file_ac

2024-02-02 Thread Tom Lane
Translate ENOMEM to ERRCODE_OUT_OF_MEMORY in errcode_for_file_access(). Previously you got ERRCODE_INTERNAL_ERROR, which seems inappropriate, especially given that we're trying to avoid emitting that in reachable cases. Alexander Kuzmenkov Discussion:

pgsql: Translate ENOMEM to ERRCODE_OUT_OF_MEMORY in errcode_for_file_ac

2024-02-02 Thread Tom Lane
Translate ENOMEM to ERRCODE_OUT_OF_MEMORY in errcode_for_file_access(). Previously you got ERRCODE_INTERNAL_ERROR, which seems inappropriate, especially given that we're trying to avoid emitting that in reachable cases. Alexander Kuzmenkov Discussion:

pgsql: Translate ENOMEM to ERRCODE_OUT_OF_MEMORY in errcode_for_file_ac

2024-02-02 Thread Tom Lane
Translate ENOMEM to ERRCODE_OUT_OF_MEMORY in errcode_for_file_access(). Previously you got ERRCODE_INTERNAL_ERROR, which seems inappropriate, especially given that we're trying to avoid emitting that in reachable cases. Alexander Kuzmenkov Discussion:

pgsql: Translate ENOMEM to ERRCODE_OUT_OF_MEMORY in errcode_for_file_ac

2024-02-02 Thread Tom Lane
Translate ENOMEM to ERRCODE_OUT_OF_MEMORY in errcode_for_file_access(). Previously you got ERRCODE_INTERNAL_ERROR, which seems inappropriate, especially given that we're trying to avoid emitting that in reachable cases. Alexander Kuzmenkov Discussion:

pgsql: Translate ENOMEM to ERRCODE_OUT_OF_MEMORY in errcode_for_file_ac

2024-02-02 Thread Tom Lane
Translate ENOMEM to ERRCODE_OUT_OF_MEMORY in errcode_for_file_access(). Previously you got ERRCODE_INTERNAL_ERROR, which seems inappropriate, especially given that we're trying to avoid emitting that in reachable cases. Alexander Kuzmenkov Discussion:

pgsql: Fix bug in bulk extending temp relation after failure

2024-02-02 Thread Heikki Linnakangas
Fix bug in bulk extending temp relation after failure A ResourceOwnerEnlarge() call was missing. That led to an error: ERROR: ResourceOwnerRemember called but array was full and an assertion failure, if you tried to extend a temp relation again after a failure. Alexander's test case used

pgsql: First-draft release notes for 16.2.

2024-02-02 Thread Tom Lane
First-draft release notes for 16.2. As usual, the release notes for other branches will be made by cutting these down, but put them up for community review first. Branch -- REL_16_STABLE Details --- https://git.postgresql.org/pg/commitdiff/87dcc5e45fad3021514f01360d3a2abd4e6480ee

pgsql: Allow Gather Merge in more cases for parallel DISTINCT

2024-02-02 Thread David Rowley
Allow Gather Merge in more cases for parallel DISTINCT Here we adjust the partial path generation for parallel DISTINCT queries to add Sort nodes on top of any unsorted partial distinct paths. This increases the likelihood of the planner pushing a Sort below a Gather Merge which enables the