Re: pgsql: Remove BufFile's isTemp flag.

2017-11-16 Thread Tom Lane
Andres Freund writes: > On 2017-11-16 21:58:14 -0500, Tom Lane wrote: >> [ squint... ] That used to have an actual purpose connected to >> transaction-abort cleanup, IIRC. It disturbs me that this seems >> to have been lost. > I've not found any such use, searching through buffile.c's history.

Re: pgsql: Remove BufFile's isTemp flag.

2017-11-16 Thread Andres Freund
On 2017-11-16 21:58:14 -0500, Tom Lane wrote: > Andres Freund writes: > > Remove BufFile's isTemp flag. > > The isTemp flag controls whether buffile.c chops BufFile data up into > > 1GB segments on disk. Since it was badly named and always true, get > > rid of it. > > [ squint... ] That used to

Re: pgsql: Remove BufFile's isTemp flag.

2017-11-16 Thread Tom Lane
Andres Freund writes: > Remove BufFile's isTemp flag. > The isTemp flag controls whether buffile.c chops BufFile data up into > 1GB segments on disk. Since it was badly named and always true, get > rid of it. [ squint... ] That used to have an actual purpose connected to transaction-abort clean

pgsql: Remove BufFile's isTemp flag.

2017-11-16 Thread Andres Freund
Remove BufFile's isTemp flag. The isTemp flag controls whether buffile.c chops BufFile data up into 1GB segments on disk. Since it was badly named and always true, get rid of it. Author: Thomas Munro (based on suggestion by Peter Geoghegan) Reviewed-By: Peter Geoghegan, Andres Freund Discussion:

pgsql: Provide DSM segment to ExecXXXInitializeWorker functions.

2017-11-16 Thread Andres Freund
Provide DSM segment to ExecXXXInitializeWorker functions. Previously, executor nodes running in parallel worker processes didn't have access to the dsm_segment object used for parallel execution. In order to support resource management based on DSM segment lifetime, they need that. So create a P

pgsql: Clean up warnings in MinGW builds.

2017-11-16 Thread Tom Lane
Clean up warnings in MinGW builds. Experimentation with modern MinGW (specifically the 5.0.2 version packaged for Fedora 26) shows that its version of sys/stat.h *does* provide S_IRGRP and friends, contrary to the expectation of win32_port.h. This results in an astonishing number of compiler warn

pgsql: Make PL/Python handle domain-type conversions correctly.

2017-11-16 Thread Tom Lane
Make PL/Python handle domain-type conversions correctly. Fix PL/Python so that it can handle domains over composite, and so that it enforces domain constraints correctly in other cases that were not always done properly before. Notably, it didn't do arrays of domains right (oversight in commit c1

pgsql: Remove redundant line from Makefile.

2017-11-16 Thread Robert Haas
Remove redundant line from Makefile. Masahiko Sawada, reviewed by Michael Paquier Discussion: http://postgr.es/m/cad21aodfes_mgye-1k89rmtgeu3rxyf3zgtjzcjvq2kzzcp...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/575cead991398aac255cf6f0e333c6d59053

pgsql: Fix broken cleanup interlock for GIN pending list.

2017-11-16 Thread Robert Haas
Fix broken cleanup interlock for GIN pending list. The pending list must (for correctness) always be cleaned up by vacuum, and should (for the avoidance of surprising behavior) always be cleaned up by an explicit call to gin_clean_pending_list, but cleanup is optional when inserting. The old logi

pgsql: Fix broken cleanup interlock for GIN pending list.

2017-11-16 Thread Robert Haas
Fix broken cleanup interlock for GIN pending list. The pending list must (for correctness) always be cleaned up by vacuum, and should (for the avoidance of surprising behavior) always be cleaned up by an explicit call to gin_clean_pending_list, but cleanup is optional when inserting. The old logi

pgsql: Fix broken cleanup interlock for GIN pending list.

2017-11-16 Thread Robert Haas
Fix broken cleanup interlock for GIN pending list. The pending list must (for correctness) always be cleaned up by vacuum, and should (for the avoidance of surprising behavior) always be cleaned up by an explicit call to gin_clean_pending_list, but cleanup is optional when inserting. The old logi

pgsql: Fix typo in comment.

2017-11-16 Thread Robert Haas
Fix typo in comment. Etsuro Fujita Discussion: http://postgr.es/m/5a0d7c3d.80...@lab.ntt.co.jp Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/6b2cd278a9d1e4643c419b598780aa55520f4f1a Modified Files -- src/backend/catalog/partition.c | 2 +- 1 file chan

pgsql: Update postgresql.conf.sample to match pg_settings classificaito

2017-11-16 Thread Robert Haas
Update postgresql.conf.sample to match pg_settings classificaitons. A handful of settings, most notably shared_preload_libraries, were just plain the wrong place compared to their assigned config_group value in guc.c (and thus pg_settings). In other cases the names of the sections in postgresql.c

pgsql: Pass InitPlan values to workers via Gather (Merge).

2017-11-16 Thread Robert Haas
Pass InitPlan values to workers via Gather (Merge). If a PARAM_EXEC parameter is used below a Gather (Merge) but the InitPlan that computes it is attached to or above the Gather (Merge), force the value to be computed before starting parallelism and pass it down to all workers. This allows us to

pgsql: Define _WINSOCK_DEPRECATED_NO_WARNINGS in all MSVC builds.

2017-11-16 Thread Tom Lane
Define _WINSOCK_DEPRECATED_NO_WARNINGS in all MSVC builds. Commit 0fb54de9a thought that this was only needed in VS2015 and later, but buildfarm member woodlouse shows that at least VS2013 whines as well. Let's just define it regardless of MSVC version; it should be harmless enough in older relea

pgsql: Back out the session_start and session_end hooks feature.

2017-11-16 Thread Andrew Dunstan
Back out the session_start and session_end hooks feature. It's become apparent during testing that there are problems with at least the testing regime. I don't think we should have it without a working test regime, and the difficulties might indicate implementation problems anyway, so I'm backing

pgsql: Fix bogus logic for checking data dirs' versions within pg_upgra

2017-11-16 Thread Tom Lane
Fix bogus logic for checking data dirs' versions within pg_upgrade. Commit 9be95ef15 failed to cure all of the redundancy here: we were actually calling get_major_server_version() three times for each of the old and new data directories. While that's not enormously expensive, it's still sloppy.

pgsql: Fix bogus logic for checking data dirs' versions within pg_upgra

2017-11-16 Thread Tom Lane
Fix bogus logic for checking data dirs' versions within pg_upgrade. Commit 9be95ef15 failed to cure all of the redundancy here: we were actually calling get_major_server_version() three times for each of the old and new data directories. While that's not enormously expensive, it's still sloppy.

pgsql: Further refactoring of c.h and nearby files.

2017-11-16 Thread Tom Lane
Further refactoring of c.h and nearby files. This continues the work of commit 91aec93e6 by getting rid of a lot of Windows-specific funny business in "section 0". Instead of including pg_config_os.h in different places depending on platform, let's standardize on putting it before the system head

pgsql: Refactor routine to test connection to SSL server

2017-11-16 Thread Peter Eisentraut
Refactor routine to test connection to SSL server Move the sub-routines wrappers to check if a connection to a server is fine or not into the test main module. This is useful for other tests willing to check connectivity into a server. Author: Michael Paquier Branch -- master Details -

Re: pgsql: Add hooks for session start and session end

2017-11-16 Thread Stephen Frost
Greetings, * Andrew Dunstan (andrew.duns...@2ndquadrant.com) wrote: > On 11/15/2017 04:30 PM, Tom Lane wrote: > > Andrew Dunstan writes: > >> Maybe we need to shift from installcheck to check mode for these > >> modules. That would involve a buildfarm script change. > > Seems like expending an aw