pgsql: Use valid compression method in brin_form_tuple

2021-03-20 Thread Tomas Vondra
Use valid compression method in brin_form_tuple When compressing the BRIN summary, we can't simply use the compression method from the indexed attribute. The summary may use a different data type, e.g. fixed-length attribute may have varlena summary, leading to compression failures. For the buil

pgsql: Fix up pg_dump's handling of per-attribute compression options.

2021-03-20 Thread Tom Lane
Fix up pg_dump's handling of per-attribute compression options. The approach used in commit bbe0a81db would've been disastrous for portability of dumps. Instead handle non-default compression options in separate ALTER TABLE commands. This reduces chatter for the common case where most columns ar

pgsql: Fix memory leak when initializing DH parameters in backend

2021-03-20 Thread Tom Lane
Fix memory leak when initializing DH parameters in backend When loading DH parameters used for the generation of ephemeral DH keys in the backend, the code has never bothered releasing the memory used for the DH information loaded from a file or from libpq's default. This commit makes sure that t

pgsql: Fix memory leak when rejecting bogus DH parameters.

2021-03-20 Thread Tom Lane
Fix memory leak when rejecting bogus DH parameters. While back-patching e0e569e1d, I noted that there were some other places where we ought to be applying DH_free(); namely, where we load some DH parameters from a file and then reject them as not being sufficiently secure. While it seems really u

pgsql: Fix memory leak when rejecting bogus DH parameters.

2021-03-20 Thread Tom Lane
Fix memory leak when rejecting bogus DH parameters. While back-patching e0e569e1d, I noted that there were some other places where we ought to be applying DH_free(); namely, where we load some DH parameters from a file and then reject them as not being sufficiently secure. While it seems really u

pgsql: Fix memory leak when initializing DH parameters in backend

2021-03-20 Thread Tom Lane
Fix memory leak when initializing DH parameters in backend When loading DH parameters used for the generation of ephemeral DH keys in the backend, the code has never bothered releasing the memory used for the DH information loaded from a file or from libpq's default. This commit makes sure that t

pgsql: Fix memory leak when rejecting bogus DH parameters.

2021-03-20 Thread Tom Lane
Fix memory leak when rejecting bogus DH parameters. While back-patching e0e569e1d, I noted that there were some other places where we ought to be applying DH_free(); namely, where we load some DH parameters from a file and then reject them as not being sufficiently secure. While it seems really u

pgsql: Fix memory leak when initializing DH parameters in backend

2021-03-20 Thread Tom Lane
Fix memory leak when initializing DH parameters in backend When loading DH parameters used for the generation of ephemeral DH keys in the backend, the code has never bothered releasing the memory used for the DH information loaded from a file or from libpq's default. This commit makes sure that t

pgsql: Fix memory leak when rejecting bogus DH parameters.

2021-03-20 Thread Tom Lane
Fix memory leak when rejecting bogus DH parameters. While back-patching e0e569e1d, I noted that there were some other places where we ought to be applying DH_free(); namely, where we load some DH parameters from a file and then reject them as not being sufficiently secure. While it seems really u

pgsql: Fix memory leak when rejecting bogus DH parameters.

2021-03-20 Thread Tom Lane
Fix memory leak when rejecting bogus DH parameters. While back-patching e0e569e1d, I noted that there were some other places where we ought to be applying DH_free(); namely, where we load some DH parameters from a file and then reject them as not being sufficiently secure. While it seems really u

Re: pgsql: Blindly try to fix test script's tar invocation for MSYS.

2021-03-20 Thread Andrew Dunstan
On 3/20/21 11:05 AM, Tom Lane wrote: > Andrew Dunstan writes: >> On 3/18/21 10:43 PM, Tom Lane wrote: >>> Buildfarm member fairywren doesn't like the test case I added >>> in commit 081876d75. I'm guessing the reason is that I shouldn't >>> be using a perl2host-ified path in the tar command lin

Re: pgsql: Blindly try to fix test script's tar invocation for MSYS.

2021-03-20 Thread Tom Lane
Andrew Dunstan writes: > On 3/18/21 10:43 PM, Tom Lane wrote: >> Buildfarm member fairywren doesn't like the test case I added >> in commit 081876d75. I'm guessing the reason is that I shouldn't >> be using a perl2host-ified path in the tar command line. > No, you shouldn't. The rule is that you

Re: pgsql: Blindly try to fix test script's tar invocation for MSYS.

2021-03-20 Thread Andrew Dunstan
On 3/18/21 10:43 PM, Tom Lane wrote: > Blindly try to fix test script's tar invocation for MSYS. > > Buildfarm member fairywren doesn't like the test case I added > in commit 081876d75. I'm guessing the reason is that I shouldn't > be using a perl2host-ified path in the tar command line. > No,

pgsql: Avoid leaking memory in RestoreGUCState(), and improve comments.

2021-03-20 Thread Tom Lane
Avoid leaking memory in RestoreGUCState(), and improve comments. RestoreGUCState applied InitializeOneGUCOption to already-live GUC entries, causing any malloc'd subsidiary data to be forgotten. We do want the effect of resetting the GUC to its compiled-in default, and InitializeOneGUCOption seems