Re: pgsql: Clone extended stats in CREATE TABLE (LIKE INCLUDING ALL)

2018-03-05 Thread Thomas Munro
On Tue, Mar 6, 2018 at 11:39 AM, Alvaro Herrera wrote: > Clone extended stats in CREATE TABLE (LIKE INCLUDING ALL) Is this commit responsible for this valgrind error? https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=lousyjack&dt=2018-03-05%2023%3A03%3A01 ==430== Invalid read of size 2 ==

pgsql: Add parenthesized options syntax for ANALYZE.

2018-03-05 Thread Andres Freund
Add parenthesized options syntax for ANALYZE. This is analogous to the syntax allowed for VACUUM. This allows us to avoid making new options reserved keywords and makes it easier to allow arbitrary argument order. Oh, and it's consistent with the other commands, too. Author: Nathan Bossart Review

pgsql: Fix parent node of WCO expressions in partitioned tables.

2018-03-05 Thread Andres Freund
Fix parent node of WCO expressions in partitioned tables. Since edd44738bc8814 WCO expressions of partitioned tables are initialized with the first subplan as parent. That's not correct, as the correct context is the ModifyTableState node. That's also what is used for RETURNING processing, initial

Re: [COMMITTERS] pgsql: Fix inadequate locking during get_rel_oids().

2018-03-05 Thread Michael Paquier
On Mon, Mar 05, 2018 at 04:34:09PM -0800, Andres Freund wrote: > Scratch that, we should be going down the > /* If caller supplied OID, there's nothing we need do here. */ > if (OidIsValid(vrel->oid)) > { > oldcontext = MemoryContextSwitchTo(vac_context); >

Re: [COMMITTERS] pgsql: Fix inadequate locking during get_rel_oids().

2018-03-05 Thread Andres Freund
On 2018-03-05 16:11:52 -0800, Andres Freund wrote: > Hi Tom, > > On 2017-09-29 20:26:42 +, Tom Lane wrote: > > get_rel_oids used to not take any relation locks at all, but that stopped > > being a good idea with commit 3c3bb9933, which inserted a syscache lookup > > into the function. A concu

Re: [COMMITTERS] pgsql: Fix inadequate locking during get_rel_oids().

2018-03-05 Thread Andres Freund
Hi Tom, On 2017-09-29 20:26:42 +, Tom Lane wrote: > get_rel_oids used to not take any relation locks at all, but that stopped > being a good idea with commit 3c3bb9933, which inserted a syscache lookup > into the function. A concurrent DROP TABLE could now produce "cache lookup > failed", whi

pgsql: Fix HEAP_INSERT_IS_SPECULATIVE to HEAP_INSERT_SPECULATIVE in com

2018-03-05 Thread Andres Freund
Fix HEAP_INSERT_IS_SPECULATIVE to HEAP_INSERT_SPECULATIVE in comments. This was wrong since 168d5805e4c08bed7b95d351bf097cff7c07dd65, which introduced speculative inserts. Author: Andres Freund Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/b2a177bff10e86016a53bb7

pgsql: Clone extended stats in CREATE TABLE (LIKE INCLUDING ALL)

2018-03-05 Thread Alvaro Herrera
Clone extended stats in CREATE TABLE (LIKE INCLUDING ALL) The LIKE INCLUDING ALL clause to CREATE TABLE intuitively indicates cloning of extended statistics on the source table, but it failed to do so. Patch it up so that it does. Also include an INCLUDING STATISTICS option to the LIKE clause, s

pgsql: Clone extended stats in CREATE TABLE (LIKE INCLUDING ALL)

2018-03-05 Thread Alvaro Herrera
Clone extended stats in CREATE TABLE (LIKE INCLUDING ALL) The LIKE INCLUDING ALL clause to CREATE TABLE intuitively indicates cloning of extended statistics on the source table, but it failed to do so. Patch it up so that it does. Also include an INCLUDING STATISTICS option to the LIKE clause, s

pgsql: Temporarily instrument postgres_fdw test to look for statistics

2018-03-05 Thread Tom Lane
Temporarily instrument postgres_fdw test to look for statistics changes. It seems fairly hard to explain recent buildfarm failures without the theory that something is doing an ANALYZE behind our backs. Probe for this directly to see if it's true. In principle the outputs of these queries should

pgsql: Add infrastructure to support server-version-dependent tab compl

2018-03-05 Thread Tom Lane
Add infrastructure to support server-version-dependent tab completion. Up to now we've not worried about whether psql's tab completion queries would work against prior server versions. But since we support older server versions in describe.c, we really ought to do so here as well. Failing to take

pgsql: shm_mq: Fix detach race condition.

2018-03-05 Thread Robert Haas
shm_mq: Fix detach race condition. Commit 34db06ef9a1d7f36391c64293bf1e0ce44a33915 adopted a lock-free design for shm_mq.c, but it introduced a race condition that could lose messages. When shm_mq_receive_bytes() detects that the other end has detached, it must make sure that it has seen the fina

pgsql: Fix pg_rewind to handle relation data files in tablespaces prope

2018-03-05 Thread Fujii Masao
Fix pg_rewind to handle relation data files in tablespaces properly. pg_rewind checks whether each file is a relation data file, from its path. Previously this check logic had the bug which made pg_rewind fail to recognize any relation data files in tablespaces. Which also caused an assertion fail

pgsql: Fix pg_rewind to handle relation data files in tablespaces prope

2018-03-05 Thread Fujii Masao
Fix pg_rewind to handle relation data files in tablespaces properly. pg_rewind checks whether each file is a relation data file, from its path. Previously this check logic had the bug which made pg_rewind fail to recognize any relation data files in tablespaces. Which also caused an assertion fail

pgsql: Fix pg_rewind to handle relation data files in tablespaces prope

2018-03-05 Thread Fujii Masao
Fix pg_rewind to handle relation data files in tablespaces properly. pg_rewind checks whether each file is a relation data file, from its path. Previously this check logic had the bug which made pg_rewind fail to recognize any relation data files in tablespaces. Which also caused an assertion fail

pgsql: Fix pg_rewind to handle relation data files in tablespaces prope

2018-03-05 Thread Fujii Masao
Fix pg_rewind to handle relation data files in tablespaces properly. pg_rewind checks whether each file is a relation data file, from its path. Previously this check logic had the bug which made pg_rewind fail to recognize any relation data files in tablespaces. Which also caused an assertion fail

pgsql: doc: Tiny whitespace fix

2018-03-05 Thread Peter Eisentraut
doc: Tiny whitespace fix Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/dd9ed0bf7039eb2b97d9afa198409c0e9798f4ac Modified Files -- doc/src/sgml/ref/call.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Remove some obsolete procedure-specific code from PLs

2018-03-05 Thread Peter Eisentraut
Remove some obsolete procedure-specific code from PLs Since procedures are now declared to return void, code that handled return values for procedures separately is no longer necessary. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/09230e54fb39e8cd8add3f119d03afd7