pgsql: Fix tiny memory leaks

2022-10-01 Thread Peter Eisentraut
Fix tiny memory leaks Both check_application_name() and check_cluster_name() use pg_clean_ascii() but didn't release the memory. Depending on when the GUC is set, this might be cleaned up at some later time or it would leak postmaster memory once. In any case, it seems better not to have to rely

Re: pgsql: Avoid improbable PANIC during heap_update.

2022-10-01 Thread Jeff Davis
On Fri, 2022-09-30 at 21:23 -0700, Peter Geoghegan wrote: > 2490 page = BufferGetPage(buffer); > 2491 > 2492 /* > 2493  * Before locking the buffer, pin the visibility map page if > it appears to > 2494  * be necessary.  Since we haven't got the lock yet, someone > else might be > 2

Re: pgsql: Avoid improbable PANIC during heap_update.

2022-10-01 Thread Peter Geoghegan
On Sat, Oct 1, 2022 at 9:35 AM Jeff Davis wrote: > Doesn't that deal with the case you brought up directly? heap_delete() > can't get the exclusive lock until VACUUM releases its cleanup lock, at > which point all-visible will be set. Then heap_delete() should notice > in line 2509 and then pin th

pgsql: meson: windows: Determine path to tmp_install + prefix using mes

2022-10-01 Thread Andres Freund
meson: windows: Determine path to tmp_install + prefix using meson Previously some paths (like c:\ or d:/) worked, but plenty others (like /path/to or //computer/share/path) didn't. As we'd like to change the default prefix to /usr/local/pgsql, that's a problem. Instead of trying to do this in me

pgsql: meson: Add prefix=/usr/local/pgsql to default_options

2022-10-01 Thread Andres Freund
meson: Add prefix=/usr/local/pgsql to default_options autoconf set PREFIX to /usr/local/pgsql, so using the same default for meson makes sense. The effect on windows is that installation defaults to installing to C:/usr/local/pgsql rather than meson's default of C:/, which doesn't seem perfect, bu

pgsql: ci: macos: Reduce test concurrency

2022-10-01 Thread Andres Freund
ci: macos: Reduce test concurrency Test performance regresses noticably when using all cores. This is more pronounced with meson than with autoconf, presumably because meson will schedule the "full number" of tests more consistently. 8 seems to work OK. Discussion: https://postgr.es/m/202209270

pgsql: ci: macos: Reduce test concurrency

2022-10-01 Thread Andres Freund
ci: macos: Reduce test concurrency Test performance regresses noticably when using all cores. This is more pronounced with meson than with autoconf, presumably because meson will schedule the "full number" of tests more consistently. 8 seems to work OK. Discussion: https://postgr.es/m/202209270

pgsql: ci: enable various runtime checks on FreeBSD and macOS

2022-10-01 Thread Andres Freund
ci: enable various runtime checks on FreeBSD and macOS Increase likelihood of discovering problems during CI rather the buildfarm by defining -DRELCACHE_FORCE_RELEASE -DCOPY_PARSE_PLAN_TREES -DWRITE_READ_PARSE_PLAN_TREES -DRAW_EXPRESSION_COVERAGE_TEST on FreeBSD, and -DRANDOMIZE_ALLOCATED_MEMORY o