Re: [HACKERS] proposal psql \gdesc

2017-09-05 Thread Tom Lane
Fabien COELHO writes: > I did yet another rebase of your patch after Tom alphabetically ordered > backslash commands. Here is the result. Pushed with some massaging. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make change

Re: [HACKERS] [Proposal] Allow users to specify multiple tables in VACUUM commands

2017-09-05 Thread Michael Paquier
On Wed, Sep 6, 2017 at 2:36 AM, Bossart, Nathan wrote: > On 9/4/17, 8:16 PM, "Michael Paquier" wrote: >> So I would tend to think that the same column specified multiple times >> should cause an error, and that we could let VACUUM run work N times >> on a relation if it is specified this much. Th

Re: [HACKERS] pg_basebackup behavior on non-existent slot

2017-09-05 Thread Magnus Hagander
On Mon, Sep 4, 2017 at 3:21 PM, Jeff Janes wrote: > > If I tell pg_basebackup to use a non-existent slot, it immediately reports > an error. And then it exits with an error, but only after streaming the > entire database contents. > > If you are doing this interactively and are on the ball, of c

[HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the same transaction

2017-09-05 Thread Arseny Sher
Hello, Currently, DROP SUBSCRIPTION on REL_10_STABLE would block forever in the following setup: node 1: create table t (i int); create publication p for table t; node 2: create table t (i int); create subscription s CONNECTION 'port=5432' publication p; begin; alter subscription s disable ; alt

Re: [HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the same transaction

2017-09-05 Thread Arseny Sher
Arseny Sher writes: > Attached patch fixes this by stopping workers before RO drop, as > already done in case when we drop replication slot. Sorry, here is the patch. >From 008d54dfe2e8ba610bb7c897cfbb4ee7a700aa2e Mon Sep 17 00:00:00 2001 From: Arseny Sher Date: Mon, 4 Sep 2017 16:55:08 +0300 S

Re: [HACKERS] Fix performance of generic atomics

2017-09-05 Thread Jesper Pedersen
Hi, On 05/25/2017 11:12 AM, Sokolov Yura wrote: I agree that lonely semicolon looks bad. Applied your suggestion for empty loop body (/* skip */). Patch in first letter had while(true), but I removed it cause I think it is uglier: - `while(true)` was necessary for grouping read with `if`, - but

Re: [HACKERS] Copyright in partition.h and partition.c

2017-09-05 Thread Amit Langote
On 2017/09/05 21:14, Tom Lane wrote: > Amit Langote writes: >> On 2017/09/05 15:48, Etsuro Fujita wrote: >>> Here is the copyright in partition.h: >>> >>>  * Copyright (c) 2007-2017, PostgreSQL Global Development Group >>> >>> I think it's reasonable that that matches the copyright in partition.c,

Re: [HACKERS] increasing the default WAL segment size

2017-09-05 Thread Andres Freund
Hi, I was looking to commit this, but the changes I made ended up being pretty large. Here's what I changed in the attached: - split GUC_UNIT_BYTE into a separate commit, squashed rest - renamed GUC_UNIT_BYT to GUC_UNIT_BYTE, don't see why we'd have such a weird abbreviation? - bumped control fi

[HACKERS] atomics/arch-x86.h is stupider than atomics/generic-gcc.h?

2017-09-05 Thread Tom Lane
I spent some time trying to devise a suitable performance microbenchmark for the atomic ops, in pursuit of whether the proposal at https://commitfest.postgresql.org/14/1154/ is worth doing. I came up with the attached very simple-minded test case, which you run with something like create

Re: [HACKERS] pg_stat_wal_write statistics view

2017-09-05 Thread Haribabu Kommi
On Tue, Aug 15, 2017 at 7:39 AM, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 3/29/17 22:10, Haribabu Kommi wrote: > > Updated patch to use shared counter instead of adding pg_stat_ calls to > send > > the statistics from each background process/worker. > > Your patch needs to

Re: [HACKERS] proposal psql \gdesc

2017-09-05 Thread Pavel Stehule
2017-09-06 0:18 GMT+02:00 Tom Lane : > Fabien COELHO writes: > > I did yet another rebase of your patch after Tom alphabetically ordered > > backslash commands. Here is the result. > > Pushed with some massaging. > Thank you very much > > regards, tom lane >

Re: [HACKERS] Fix performance of generic atomics

2017-09-05 Thread Tom Lane
Jeff Janes writes: > What scale factor and client count? How many cores per socket? It looks > like Sokolov was just starting to see gains at 200 clients on 72 cores, > using -N transaction. I spent some time poking at this with the test scaffolding I showed at https://www.postgresql.org/message

[HACKERS] GatherMerge misses to push target list

2017-09-05 Thread Amit Kapila
During my recent work on costing of parallel paths [1], I noticed that we are missing to push target list below GatherMerge in some simple cases like below. Test prepration - create or replace function simple_func(var1 integer) returns integer as $$ begin return var1 +

Re: [HACKERS] Coverage improvements of src/bin/pg_basebackup and pg_receivewal --endpos

2017-09-05 Thread Michael Paquier
On Tue, Sep 5, 2017 at 10:19 PM, Peter Eisentraut wrote: > On 6/9/17 02:08, Michael Paquier wrote: >> I have just played with that, and attached is a patch to implement the >> so-said option with a basic set of tests, increasing code coverage of >> pg_receivewal.c from 15% to 60%. I'll park that i

Re: [HACKERS] Making clausesel.c Smarter

2017-09-05 Thread David Rowley
On 6 September 2017 at 00:43, Daniel Gustafsson wrote: > This patch was moved to the currently open Commitfest. Given the above > comment, is the last patch in this thread still up for review, or are you > working on a new version? Just to avoid anyone reviewing an outdated version. Hi Daniel,

Re: [HACKERS] Replacing lfirst() with lfirst_node() appropriately in planner.c

2017-09-05 Thread Ashutosh Bapat
On Wed, Sep 6, 2017 at 1:32 AM, Tom Lane wrote: > Ashutosh Bapat writes: >> On Tue, Sep 5, 2017 at 4:02 PM, Jeevan Chalke >> wrote: >>> Attached patch for replacing linitial() with linital_node() appropriately in >>> planner.c > >> Ok. The patch looks good to me. It compiles and make check passe

Re: [HACKERS] [bug fix] Savepoint-related statements terminates connection

2017-09-05 Thread Catalin Iacob
On Mon, Sep 4, 2017 at 4:15 PM, Tom Lane wrote: > Also, the main thing that we need xact.c's involvement for in the first > place is the fact that implicit transaction blocks, unlike regular ones, > auto-cancel on an error, leaving you outside a block not inside a failed > one. So I don't exactly

Re: [HACKERS] Parallel Append implementation

2017-09-05 Thread Amit Khandekar
On 30 August 2017 at 17:32, Amit Khandekar wrote: > On 16 August 2017 at 18:34, Robert Haas wrote: >> Thanks for the benchmarking results! >> >> On Tue, Aug 15, 2017 at 11:35 PM, Rafia Sabih >> wrote: >>> Q4 | 244 | 12 | PA and PWJ, time by only PWJ - 41 >> >> 12 seconds instead of 244? Whoa.

Re: [HACKERS] pgbench: Skipping the creating primary keys after initialization

2017-09-05 Thread Masahiko Sawada
On Wed, Sep 6, 2017 at 12:11 AM, Fabien COELHO wrote: > >> Sorry, I don't follow that. You meant I should add a newline before >> pg_realloc()? That is, >> >> +initialize_cmds = >> +(char *) pg_realloc(initialize_cmds, >> +

Re: [HACKERS] [PATCH] Assert that the correct locks are held when calling PageGetLSN()

2017-09-05 Thread Michael Paquier
On Wed, Sep 6, 2017 at 1:15 AM, Jacob Champion wrote: > On Sun, Sep 3, 2017 at 11:14 PM, Michael Paquier > wrote: >> +#if defined(USE_ASSERT_CHECKING) && !defined(FRONTEND) >> +void >> +AssertPageIsLockedForLSN(Page page) >> +{ >> From a design point of view, bufmgr.c is an API interface for buff

Re: [HACKERS] assorted code cleanup

2017-09-05 Thread Michael Paquier
On Wed, Sep 6, 2017 at 4:12 AM, Peter Eisentraut wrote: > On 8/21/17 01:11, Michael Paquier wrote: >>> - Drop excessive dereferencing of function pointers >> >> - (*next_ProcessUtility_hook) (pstmt, queryString, >> + next_ProcessUtility_hook(pstmt, queryString, >>

Re: [HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the same transaction

2017-09-05 Thread Masahiko Sawada
On Mon, Sep 4, 2017 at 11:43 PM, Arseny Sher wrote: > Arseny Sher writes: > >> Attached patch fixes this by stopping workers before RO drop, as >> already done in case when we drop replication slot. > > Sorry, here is the patch. > I could reproduce this issue, it's a bug. Added this to the open

[HACKERS] Re: Tuple-routing for certain partitioned tables not working as expected

2017-09-05 Thread Noah Misch
On Tue, Sep 05, 2017 at 08:35:13PM +0900, Etsuro Fujita wrote: > On 2017/08/30 17:20, Etsuro Fujita wrote: > >On 2017/08/30 9:13, Amit Langote wrote: > >>On 2017/08/29 20:18, Etsuro Fujita wrote: > >>>On 2017/08/25 22:26, Robert Haas wrote: > On Wed, Aug 23, 2017 at 4:55 AM, Etsuro Fujita > >>>

Re: [HACKERS] [WIP] Zipfian distribution in pgbench

2017-09-05 Thread Fabien COELHO
Hello Alik, Applies, compiles, works for me. Some minor comments and suggestions. Two typos: - "usinng" -> "using" - "a rejection method used" -> "a rejection method is used" I'm not sure of "least_recently_used_i", this naming style is not used in pgbench. "least_recently_used" would be o

Re: [HACKERS] cache lookup errors for missing replication origins

2017-09-05 Thread Michael Paquier
On Tue, Sep 5, 2017 at 12:59 PM, Michael Paquier wrote: > ERROR: 42704: replication slot "%s" does not exist s/slot/origin/ > As far as I can see, replorigin_by_oid makes no use of its missing_ok > = false in the backend code, so letting it untouched would have no > impact. replorigin_by_name w

Re: [HACKERS] CLUSTER command progress monitor

2017-09-05 Thread Tatsuro Yamada
Hi Hackers, I revised the patch like this: - Add "command" column in the view It tells that the running command is CLUSTER or VACUUM FULL. - Enable VACUUM FULL progress monitor Add heap_tuples_vacuumed and heap_tuples_recently_dead as a counter in the view. Sequence of phases a

<    1   2