[HACKERS] Re: [COMMITTERS] pgsql: Improve pg_dump regression tests and code coverage

2017-03-20 Thread Stephen Frost
Robert, * Robert Haas (robertmh...@gmail.com) wrote: > So was this 3340 line patch posted or discussed anyplace before it got > committed? I've mentioned a few times that I'm working on improving pg_dump regression tests and code coverage, which is what these were. I'm a bit surprised that

Re: [HACKERS] logical replication access control patches

2017-03-20 Thread Peter Eisentraut
On 3/18/17 09:31, Petr Jelinek wrote: >> 0003 Add USAGE privilege for publications >> >> a way to control who can subscribe to a publication >> > Hmm IIUC this removes ability of REPLICATION role to subscribe to > publications. I am not quite sure I like that. Well, this is kind of the way with

Re: [HACKERS] wait events for disk I/O

2017-03-20 Thread Rajkumar Raghuwanshi
On Sat, Mar 18, 2017 at 10:52 PM, Rushabh Lathia wrote: > > > On Sat, Mar 18, 2017 at 5:15 PM, Robert Haas wrote: >> >> On Fri, Mar 17, 2017 at 10:01 AM, Rushabh Lathia >> wrote: >> > I tried to cover all the suggestion

Re: [HACKERS] logical decoding of two-phase transactions

2017-03-20 Thread Craig Ringer
> I thought about having special field (or reusing one of the existing fields) > in snapshot struct to force filtering xmax > snap->xmax or xmin = snap->xmin > as Petr suggested. Then this logic can reside in ReorderBufferCommit(). > However this is not solving problem with catcache, so I'm

Re: [HACKERS] Parallel Append implementation

2017-03-20 Thread Robert Haas
On Fri, Mar 17, 2017 at 1:12 PM, Amit Khandekar wrote: >> - The substantive changes in add_paths_to_append_rel don't look right >> either. It's not clear why accumulate_partialappend_subpath is >> getting called even in the non-enable_parallelappend case. I don't >>

Re: [HACKERS] Parallel Append implementation

2017-03-20 Thread Amit Khandekar
>> 2. Next, estimate the cost of the non-partial paths. To do this, make >> an array of Cost of that length and initialize all the elements to >> zero, then add the total cost of each non-partial plan in turn to the >> element of the array with the smallest cost, and then take the maximum >> of

Re: [HACKERS] [POC] A better way to expand hash indexes.

2017-03-20 Thread Amit Kapila
On Sat, Mar 18, 2017 at 10:59 PM, Mithun Cy wrote: > On Thu, Mar 16, 2017 at 10:55 PM, David Steele wrote: >> It does apply with fuzz on 2b32ac2, so it looks like c11453c and >> subsequent commits are the cause. They represent a fairly

Re: [HACKERS] Create replication slot in pg_basebackup if requested and not yet present

2017-03-20 Thread Arthur Zakirov
Hello, On 19.03.2017 21:45, Michael Banck wrote: So the patch I sent earlier creates the slot in ReceiveXlogStream() in receivewal.c, as that's where the temp slot gets created as well, but now I wonder whether that is maybe not the best place, as pg_receivewal also calls that function. The

Re: [HACKERS] PinBuffer() no longer makes use of strategy

2017-03-20 Thread Alexander Korotkov
On Sun, Mar 19, 2017 at 3:51 AM, Jim Nasby wrote: > On 3/16/17 12:48 PM, David Steele wrote: > >> This patch looks pretty straight forward and applies cleanly and >> compiles at cccbdde. >> >> It's not a straight revert, though, so still seems to need review. >> >> Jim, do

Re: [HACKERS] logical decoding of two-phase transactions

2017-03-20 Thread Stas Kelvich
> On 20 Mar 2017, at 11:32, Craig Ringer wrote: > > On 19 March 2017 at 21:26, Petr Jelinek wrote: > >> I think only genam would need changes to do two-phase scan for this as >> the catalog scans should ultimately go there. It's going to

Re: [HACKERS] PoC plpgsql - possibility to force custom or generic plan

2017-03-20 Thread Pavel Stehule
2017-03-19 14:30 GMT+01:00 Petr Jelinek : > On 19/03/17 12:32, Pavel Stehule wrote: > > > > > > 2017-03-18 19:30 GMT+01:00 Petr Jelinek > >: > > > > On 16/03/17 17:15, David Steele wrote: > >

[HACKERS] [Proposal] Make the optimiser aware of partitions ordering

2017-03-20 Thread Ronan Dunklau
Hello, With native partitioning landing in Postgres 10, we (Julien Rouhaud and myself) had the idea for the following simple optimisation. This simple optimisation comes from a real use case. = Proposal = With range partitioning, we guarantee that each partition contains non-

[HACKERS] Re: [COMMITTERS] pgsql: Add TAP tests for password-based authentication methods.

2017-03-20 Thread Heikki Linnakangas
On 03/20/2017 02:32 AM, Peter Eisentraut wrote: On 3/17/17 05:37, Heikki Linnakangas wrote: Add TAP tests for password-based authentication methods. Tests all combinations of users with MD5, plaintext and SCRAM verifiers stored in pg_authid, with plain 'password', 'md5' and 'scram'

Re: [HACKERS] Size vs size_t

2017-03-20 Thread Daniel Gustafsson
> On 16 Mar 2017, at 23:20, Tom Lane wrote: > > Thomas Munro writes: >> Naive replacement in new files (present in master but not in 9.6) with >> the attached script, followed by a couple of manual corrections where >> Size was really an

Re: [HACKERS] identity columns

2017-03-20 Thread Vitaly Burovoy
On 2/28/17, Peter Eisentraut wrote: > New patch that fixes everything. ;-) Great work! > On 1/4/17 19:34, Vitaly Burovoy wrote: >> 1. The fact COPY ignores GENERATED ALWAYS constraint (treats as >> GENERATED BY DEFAULT) should be mentioned as well as rules. >

Re: [HACKERS] Logical decoding on standby

2017-03-20 Thread Andres Freund
Hi, Have you checked how high the overhead of XLogReadDetermineTimeline is? A non-local function call, especially into a different translation-unit (no partial inlining), for every single page might end up being noticeable. That's fine in the cases it actually adds functionality, but for a

Re: [HACKERS] logical decoding of two-phase transactions

2017-03-20 Thread Petr Jelinek
On 20/03/17 09:32, Craig Ringer wrote: > On 19 March 2017 at 21:26, Petr Jelinek wrote: > >> I think only genam would need changes to do two-phase scan for this as >> the catalog scans should ultimately go there. It's going to slow down >> things but we could limit

Re: [HACKERS] Logical decoding on standby

2017-03-20 Thread Craig Ringer
On 20 March 2017 at 14:57, Simon Riggs wrote: > 2.1 Why does call to ReplicationSlotAcquire() move earlier in > pg_logical_slot_get_changes_guts()? That appears to be an oversight from an earlier version where it looped over timelines in

Re: [HACKERS] Thanks for the TAP framework

2017-03-20 Thread Yuriy Zhuravlev
Hello. For me Testgres https://github.com/postgrespro/testgres much better because I have the allergy for Perl. Unfortunately, it's not inside Postgres... 2017-03-20 10:21 GMT+03:00 Craig Ringer : > Hi > > It just occurred to me that much of what I've been doing recently

Re: [HACKERS] logical decoding of two-phase transactions

2017-03-20 Thread Craig Ringer
On 19 March 2017 at 21:26, Petr Jelinek wrote: > I think only genam would need changes to do two-phase scan for this as > the catalog scans should ultimately go there. It's going to slow down > things but we could limit the impact by doing the two-phase scan only >

Re: [HACKERS] Patch to improve performance of replay of AccessExclusiveLock

2017-03-20 Thread David Rowley
On 18 March 2017 at 21:59, Simon Riggs wrote: > As Amit says, I don't see the gain from adding that to each xact state. > > I'd suggest refactoring my patch so that the existign > MyXactAccessedTempRel becomes MyXactFlags and we can just set a flag > in the two cases (temp

Re: [HACKERS] logical decoding of two-phase transactions

2017-03-20 Thread Craig Ringer
On 17 March 2017 at 23:59, Robert Haas wrote: > But that lock could need to be held for an unbounded period of time - > as long as decoding takes to complete - which seems pretty > undesirable. Yeah. We could use a recovery-conflict like mechanism to signal the decoding

[HACKERS] Thanks for the TAP framework

2017-03-20 Thread Craig Ringer
Hi It just occurred to me that much of what I've been doing recently would've been exceedingly difficult to write and even harder to debug without the TAP framework. I would've spent a LOT of time writing test scripts and wondering whether the bug was in my scripts or my Pg code. I still spend a

Re: [HACKERS] [PATCH] Incremental sort (was: PoC: Partial sort)

2017-03-20 Thread Mithun Cy
On Mon, Feb 27, 2017 at 8:29 PM, Alexander Korotkov wrote: This patch needs to be rebased. 1. It fails while applying as below patching file src/test/regress/expected/sysviews.out Hunk #1 FAILED at 70. 1 out of 1 hunk FAILED -- saving rejects to file

Re: [HACKERS] Logical decoding on standby

2017-03-20 Thread Simon Riggs
On 19 March 2017 at 21:12, Craig Ringer wrote: > Rebased attached. Patch1 looks good to go. I'll correct a spelling mistake in the tap test when I commit that later today. Patch2 has a couple of points 2.1 Why does call to ReplicationSlotAcquire() move earlier in

[HACKERS] Re: [COMMITTERS] pgsql: Add TAP tests for password-based authentication methods.

2017-03-20 Thread Heikki Linnakangas
On 03/18/2017 02:55 PM, Michael Paquier wrote: On Fri, Mar 17, 2017 at 6:37 PM, Heikki Linnakangas wrote: Add TAP tests for password-based authentication methods. Tests all combinations of users with MD5, plaintext and SCRAM verifiers stored in pg_authid, with plain

<    1   2