pgsql: Improve whitespace

2020-10-18 Thread Peter Eisentraut
Improve whitespace The SQL file was using a mix of tabs and spaces inconsistently. Convert all to spaces and adjust indentation accordingly. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/afa0d53d4de6d2f43fbc0a76c88dceb22ba65e86 Modified Files -- src/t

pgsql: Change the docs for PARALLEL option of Vacuum.

2020-10-18 Thread Amit Kapila
Change the docs for PARALLEL option of Vacuum. The rules to choose the number of parallel workers to perform parallel vacuum operation were not clearly specified. Reported-by: Peter Eisentraut Author: Amit Kapila Backpatch-through: 13, where it was introduced Discussion: https://postgr.es/m/36aa

pgsql: Change the docs for PARALLEL option of Vacuum.

2020-10-18 Thread Amit Kapila
Change the docs for PARALLEL option of Vacuum. The rules to choose the number of parallel workers to perform parallel vacuum operation were not clearly specified. Reported-by: Peter Eisentraut Author: Amit Kapila Backpatch-through: 13, where it was introduced Discussion: https://postgr.es/m/36aa

pgsql: Fix potential memory leak in pgcrypto

2020-10-18 Thread Michael Paquier
Fix potential memory leak in pgcrypto When allocating a EVP context, it would have been possible to leak some memory allocated directly by OpenSSL, that PostgreSQL lost track of if the initialization of the context allocated failed. The cleanup can be done with EVP_MD_CTX_destroy(). Note that EV

pgsql: Fix potential memory leak in pgcrypto

2020-10-18 Thread Michael Paquier
Fix potential memory leak in pgcrypto When allocating a EVP context, it would have been possible to leak some memory allocated directly by OpenSSL, that PostgreSQL lost track of if the initialization of the context allocated failed. The cleanup can be done with EVP_MD_CTX_destroy(). Note that EV

pgsql: Fix potential memory leak in pgcrypto

2020-10-18 Thread Michael Paquier
Fix potential memory leak in pgcrypto When allocating a EVP context, it would have been possible to leak some memory allocated directly by OpenSSL, that PostgreSQL lost track of if the initialization of the context allocated failed. The cleanup can be done with EVP_MD_CTX_destroy(). Note that EV

pgsql: Fix potential memory leak in pgcrypto

2020-10-18 Thread Michael Paquier
Fix potential memory leak in pgcrypto When allocating a EVP context, it would have been possible to leak some memory allocated directly by OpenSSL, that PostgreSQL lost track of if the initialization of the context allocated failed. The cleanup can be done with EVP_MD_CTX_destroy(). Note that EV

pgsql: Fix potential memory leak in pgcrypto

2020-10-18 Thread Michael Paquier
Fix potential memory leak in pgcrypto When allocating a EVP context, it would have been possible to leak some memory allocated directly by OpenSSL, that PostgreSQL lost track of if the initialization of the context allocated failed. The cleanup can be done with EVP_MD_CTX_destroy(). Note that EV

pgsql: Fix potential memory leak in pgcrypto

2020-10-18 Thread Michael Paquier
Fix potential memory leak in pgcrypto When allocating a EVP context, it would have been possible to leak some memory allocated directly by OpenSSL, that PostgreSQL lost track of if the initialization of the context allocated failed. The cleanup can be done with EVP_MD_CTX_destroy(). Note that EV

pgsql: Fix potential memory leak in pgcrypto

2020-10-18 Thread Michael Paquier
Fix potential memory leak in pgcrypto When allocating a EVP context, it would have been possible to leak some memory allocated directly by OpenSSL, that PostgreSQL lost track of if the initialization of the context allocated failed. The cleanup can be done with EVP_MD_CTX_destroy(). Note that EV

pgsql: Prevent overly large and NaN row estimates in relations

2020-10-18 Thread David Rowley
Prevent overly large and NaN row estimates in relations Given a query with enough joins, it was possible that the query planner, after multiplying the row estimates with the join selectivity that the estimated number of rows would exceed the limits of the double data type and become infinite. To

pgsql: Update the Winsock API version requested by libpq.

2020-10-18 Thread Tom Lane
Update the Winsock API version requested by libpq. According to Microsoft's documentation, 2.2 has been the current version since Windows 98 or so. Moreover, that's what the Postgres backend has been requesting since 2004 (cf commit 4cdf51e64). So there seems no reason for libpq to keep asking fo

pgsql: In pg_restore's dump_lo_buf(), work a little harder on error han

2020-10-18 Thread Tom Lane
In pg_restore's dump_lo_buf(), work a little harder on error handling. Failure to write data to a large object during restore led to an ugly and uninformative error message. To add insult to injury, it then fatal'd out, where other SQL-level errors usually result in pressing on. Report the under