Re: [HACKERS] Timeline following for logical slots

2016-04-05 Thread Craig Ringer
Draft patch for comment fix.​ From 304453f67b26219dc94e6aef9dfdc1c1debf12bb Mon Sep 17 00:00:00 2001 From: Craig Ringer Date: Wed, 6 Apr 2016 14:57:26 +0800 Subject: [PATCH] Fix incorrect comments introduced in logical decoding timeline following --- src/backend/replication/logical/logicalfuncs

Re: [HACKERS] large regression for parallel COPY

2016-04-05 Thread Fabien COELHO
Hello Robert, I tried the same test mentioned in the original post on cthulhu (EDB machine, CentOS 7.2, 8 sockets, 8 cores per socket, 2 threads per core, Xeon E7-8830 @ 2.13 GHz). I attempted to test both the effects of multi_extend_v21 and the *_flush_after settings. I'm not sure of {bac

Re: [HACKERS] Timeline following for logical slots

2016-04-05 Thread Craig Ringer
I tried to address Andres's entirely valid complaints about that comment I added in this patch. I was going to add a description to restart_lsn in slot.h instead, but it's proving harder to accurately describe restart_lsn than I'd like. It's a point at which no transactions that commit after conf

Re: [HACKERS] Support for N synchronous standby servers - take 2

2016-04-05 Thread Fujii Masao
On Wed, Apr 6, 2016 at 2:51 PM, Masahiko Sawada wrote: > On Wed, Apr 6, 2016 at 2:21 PM, Fujii Masao wrote: >> On Tue, Apr 5, 2016 at 8:51 PM, Simon Riggs wrote: >>> On 5 April 2016 at 12:26, Fujii Masao wrote: >>> Multiple standbys with the same name may connect to the master. I

Re: [HACKERS] Correction for replication slot creation error message in 9.6

2016-04-05 Thread Ian Barwick
On 05/04/16 10:24, Peter Eisentraut wrote: > On 03/30/2016 09:15 PM, Ian Barwick wrote: >> Currently pg_create_physical_replication_slot() may refer to >> the deprecated wal_level setting "archive": > > I have fixed this in the most direct way, since there was some disagreement > about rewording.

Re: [HACKERS] Support for N synchronous standby servers - take 2

2016-04-05 Thread Fujii Masao
On Wed, Apr 6, 2016 at 2:18 PM, Kyotaro HORIGUCHI wrote: > At Tue, 5 Apr 2016 20:17:21 +0900, Fujii Masao wrote > in >> >> list_member_int() performs the loop internally. So I'm not sure how much >> >> adding extra list_member_int() here can optimize this processing. >> >> Another idea is to ma

Re: [HACKERS] WAL logging problem in 9.4.3?

2016-04-05 Thread Michael Paquier
On Wed, Mar 23, 2016 at 12:45 PM, Michael Paquier wrote: > On Wed, Mar 23, 2016 at 11:11 AM, David Steele wrote: >> I would prefer not to bump it to the next CF unless we decide this will >> not get fixed for 9.6. > > It may make sense to add that to the list of open items for 9.6 > instead. That

Re: [HACKERS] OOM in libpq and infinite loop with getCopyStart()

2016-04-05 Thread Michael Paquier
On Sat, Apr 2, 2016 at 12:30 AM, Tom Lane wrote: > I wrote: >> So the core of my complaint is that we need to fix things so that, whether >> or not we are able to create the PGRES_FATAL_ERROR PGresult (and we'd >> better consider the behavior when we cannot), ... > > BTW, the real Achilles' heel o

Re: [HACKERS] Support for N synchronous standby servers - take 2

2016-04-05 Thread Michael Paquier
On Wed, Apr 6, 2016 at 2:51 PM, Masahiko Sawada wrote: > On Wed, Apr 6, 2016 at 2:21 PM, Fujii Masao wrote: >> On Tue, Apr 5, 2016 at 8:51 PM, Simon Riggs wrote: >>> On 5 April 2016 at 12:26, Fujii Masao wrote: >>> Multiple standbys with the same name may connect to the master. I

Re: [HACKERS] pg_xlogdump fails to handle WAL file with multi-page XLP_FIRST_IS_CONTRECORD data

2016-04-05 Thread Craig Ringer
On 1 April 2016 at 21:30, Craig Ringer wrote: > I'll attach the new testcase once I either get it to reproduce this bug or > give up and leave the basic xlogdump testcase alone. > I had another bash at this and I still can't reproduce it on master using the giant commit record approach Andres s

Re: [HACKERS] Support for N synchronous standby servers - take 2

2016-04-05 Thread Masahiko Sawada
On Wed, Apr 6, 2016 at 2:21 PM, Fujii Masao wrote: > On Tue, Apr 5, 2016 at 8:51 PM, Simon Riggs wrote: >> On 5 April 2016 at 12:26, Fujii Masao wrote: >> >>> >>> Multiple standbys with the same name may connect to the master. >>> In this case, users might want to specifiy k<=N. So k<=N seems no

Re: [HACKERS] Support for N synchronous standby servers - take 2

2016-04-05 Thread Fujii Masao
On Tue, Apr 5, 2016 at 11:47 PM, Robert Haas wrote: > On Mon, Apr 4, 2016 at 4:28 AM, Fujii Masao wrote: + ereport(LOG, + (errmsg("standby \"%s\" is now the synchronous standby with priority %u", + application_name, MyWalSnd->sync_standby_priority))); s/ the / a / >> >> I

Re: [HACKERS] Support for N synchronous standby servers - take 2

2016-04-05 Thread Fujii Masao
On Tue, Apr 5, 2016 at 11:40 PM, Amit Kapila wrote: > On Tue, Apr 5, 2016 at 3:15 PM, Fujii Masao wrote: >> >> On Tue, Apr 5, 2016 at 4:31 PM, Amit Kapila >> wrote: >> > On Mon, Apr 4, 2016 at 1:58 PM, Fujii Masao >> > wrote: >> >> >> >> >> >> Thanks for updating the patch! >> >> >> >> I applie

Re: [HACKERS] Updated backup APIs for non-exclusive backups

2016-04-05 Thread Craig Ringer
On 6 April 2016 at 12:42, Noah Misch wrote: > > The chapter already does describe pg_basebackup before describing > pg_start_backup; what else did the plan entail? > http://www.postgresql.org/docs/current/static/backup.html 24.1. SQL Dump 24.1.1. Restoring the Dump 24.1.2. Using pg_dumpall 24

Re: [HACKERS] Choosing parallel_degree

2016-04-05 Thread Amit Kapila
On Tue, Apr 5, 2016 at 11:55 PM, Julien Rouhaud wrote: > > On 05/04/2016 06:19, Amit Kapila wrote: > > > > Few more comments: > > > > 1. > > @@ -909,6 +909,17 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | > > UNLOGGED ] TABLE [ IF NOT EXI > > > > > > > > > > +parallel_degree (int

Re: [HACKERS] Support for N synchronous standby servers - take 2

2016-04-05 Thread Fujii Masao
On Tue, Apr 5, 2016 at 8:51 PM, Simon Riggs wrote: > On 5 April 2016 at 12:26, Fujii Masao wrote: > >> >> Multiple standbys with the same name may connect to the master. >> In this case, users might want to specifiy k<=N. So k<=N seems not invalid >> setting. > > > Confusing as that is, it is alr

Re: [HACKERS] Support for N synchronous standby servers - take 2

2016-04-05 Thread Kyotaro HORIGUCHI
At Tue, 5 Apr 2016 20:17:21 +0900, Fujii Masao wrote in > >> list_member_int() performs the loop internally. So I'm not sure how much > >> adding extra list_member_int() here can optimize this processing. > >> Another idea is to make SyncRepGetSyncStandby() check whether I'm sync > >> standby or

Re: [HACKERS] Odd system-column handling in postgres_fdw join pushdown patch

2016-04-05 Thread Noah Misch
On Tue, Apr 05, 2016 at 03:41:00PM +0900, Etsuro Fujita wrote: > On 2016/03/29 15:37, Etsuro Fujita wrote: > >I added two helper functions: GetFdwScanTupleExtraData and > >FillFdwScanTupleSysAttrs. The FDW author could use the former to get > >info about system attributes other than ctids and oids

Re: [HACKERS] [PATH] Jsonb, insert a new value into an array at arbitrary position

2016-04-05 Thread Petr Jelinek
On 06/04/16 06:13, Dmitry Dolgov wrote: On 6 April 2016 at 03:29, Andrew Dunstan mailto:and...@dunslane.net>> wrote: Yeah, keeping it but rejecting update of an existing key is my preference too. cheers andrew Yes, it sounds quite reasonable. Here is a new version of patch

Re: [HACKERS] Updated backup APIs for non-exclusive backups

2016-04-05 Thread Noah Misch
On Tue, Apr 05, 2016 at 08:15:16PM +0200, Magnus Hagander wrote: > I've pushed this version, and also added the item from the Brussels > developer meeting to actually rewrite the main backup docs to the open > items so they are definitely not forgotten for 9.6. Here's that PostgreSQL 9.6 open item

Re: [HACKERS] [PATH] Jsonb, insert a new value into an array at arbitrary position

2016-04-05 Thread Dmitry Dolgov
On 6 April 2016 at 03:29, Andrew Dunstan wrote: > > Yeah, keeping it but rejecting update of an existing key is my preference > too. > > cheers > > andrew > Yes, it sounds quite reasonable. Here is a new version of patch (it will throw an error for an existing key). Is it better now? diff --git

Re: [HACKERS] dealing with extension dependencies that aren't quite 'e'

2016-04-05 Thread Abhijit Menon-Sen
At 2016-04-05 18:45:58 -0300, alvhe...@2ndquadrant.com wrote: > > I changed the regression test a bit more, so please recheck. Looks good, thank you. -- Abhijit -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org

Re: [HACKERS] WIP: Failover Slots

2016-04-05 Thread Craig Ringer
On 5 April 2016 at 04:19, Oleksii Kliukin wrote: > Thank you for the update. I’ve got some rejects when applying the > 0001-Allow-replication-slots-to-follow-failover.patch after the "Dirty > replication slots when confirm_lsn is changed” changes. I think it should > be rebased against the maste

Re: [HACKERS] Timeline following for logical slots

2016-04-05 Thread Petr Jelinek
On 06/04/16 03:29, Robert Haas wrote: I don't understand why it seems to be considered OK for logical slots to just vanish on failover. The only other things I can think of where that's considered OK are unlogged tables (because that's the point and we have failover-safe ones too) and the old h

Re: [HACKERS] Timeline following for logical slots

2016-04-05 Thread Craig Ringer
On 6 April 2016 at 09:29, Robert Haas wrote: > > Right now if you're doing any kind of logical deocoding from a master > server > > that fails over to a standby the client just dies. The slot vanishes. > You're > > stuffed. Gee, I hope you didn't need all that nice consistent ordering, > > becau

Re: [HACKERS] Default Roles (was: Additional role attributes)

2016-04-05 Thread Stephen Frost
Noah, * Noah Misch (n...@leadboat.com) wrote: > On Sun, Apr 03, 2016 at 10:27:02PM -0400, Stephen Frost wrote: > > * Fujii Masao (masao.fu...@gmail.com) wrote: > > > Currently only superusers can call pgstattuple(). > > > > I started looking into this. > > > > If we were starting from a green fi

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2016-04-05 Thread Robert Haas
On Mon, Mar 21, 2016 at 3:31 AM, Haribabu Kommi wrote: > On Mon, Mar 21, 2016 at 2:00 PM, Alvaro Herrera > wrote: >> Haribabu Kommi wrote: >> >>> > Check. >>> > >>> > +} lookup_hba_line_context; >>> > ^ but why TAB here? >>> >>> corrected. I am not sure why pg_indent is adding a tab here. >>

Re: [HACKERS] standalone backend PANICs during recovery

2016-04-05 Thread Robert Haas
On Sat, Apr 2, 2016 at 5:57 PM, Alvaro Herrera wrote: > Bernd Helmle wrote: >> While investigating a problem on a streaming hot standby instance at a >> customer site, i got the following when using a standalone backend: >> >> PANIC: btree_xlog_delete_get_latestRemovedXid: cannot operate with >>

Re: [HACKERS] Refactoring speculative insertion with unique indexes a little

2016-04-05 Thread Robert Haas
On Wed, Mar 16, 2016 at 7:43 PM, Peter Geoghegan wrote: > On Wed, Mar 16, 2016 at 11:25 AM, Robert Haas wrote: >> Sure, and if everybody does that, then there will be 40 patches that >> get updated in the last 2 days if the CommitFest, and that will be >> impossible. Come on. You're demanding a

Re: [HACKERS] insufficient qualification of some objects in dump files

2016-04-05 Thread Robert Haas
On Fri, Mar 18, 2016 at 11:22 AM, Robert Haas wrote: > On Fri, Mar 18, 2016 at 2:13 AM, Michael Paquier > wrote: >> On Fri, Mar 18, 2016 at 5:38 AM, Tom Lane wrote: >>> Given the lack of any other complaints about this, I'm okay with the >>> approach as presented. (I haven't read the patch in d

Re: [HACKERS] Proposal: "Causal reads" mode for load balancing reads without stale data

2016-04-05 Thread Robert Haas
On Tue, Apr 5, 2016 at 7:21 PM, Thomas Munro wrote: > Thanks. I see a way to move that loop and change the overflow > behaviour along those lines but due to other commitments I won't be > able to post a well tested patch and still leave time for reviewers > and committer before the looming deadli

Re: [HACKERS] Materialized views vs. primary keys

2016-04-05 Thread Amit Langote
On 2016/04/06 8:48, David Fetter wrote: > On Tue, Apr 05, 2016 at 07:10:56PM -0400, Robert Haas wrote: >> On Tue, Apr 5, 2016 at 6:50 PM, David Fetter wrote: >>> Is there a reason other than lack of tuits for this restriction? >> >> "this" lacks an antecedent. > > Try to put a primary key on a ma

Re: [HACKERS] Timeline following for logical slots

2016-04-05 Thread Robert Haas
On Tue, Apr 5, 2016 at 3:51 AM, Craig Ringer wrote: > First, I'd like to remind everyone that logical decoding is useful for more > than replication. You can consume the change stream for audit > logging/archival, to feed into a different DBMS, etc etc. This is not just > about replicating from on

Re: [HACKERS] [BUGS] Breakage with VACUUM ANALYSE + partitions

2016-04-05 Thread Noah Misch
On Mon, Apr 04, 2016 at 12:45:25PM -0400, Robert Haas wrote: > Backends shouldn't be requesting nonexistent blocks from a relation - > higher-level safeguards, like holding AccessExclusiveLock before > trying to complete a DROP or TRUNCATE - are supposed to prevent that. > If this patch is causing

Re: [HACKERS] Timeline following for logical slots

2016-04-05 Thread Craig Ringer
On 5 April 2016 at 14:09, Andres Freund wrote: > On 2016-04-05 05:53:53 +0200, Petr Jelinek wrote: > > On 04/04/16 17:15, Andres Freund wrote: > > > > > >>* Robust sequence decoding and replication. If you were following the > later > > >>parts of that discussion you will've seen how fun that's g

Re: [HACKERS] WIP: Covering + unique indexes.

2016-04-05 Thread Peter Geoghegan
On Tue, Apr 5, 2016 at 1:31 PM, Peter Geoghegan wrote: > My new understanding: The extra "included" columns are stored in the > index, but do not affect its sort order at all. They are no more part > of the key than, say, the heap TID that the key points to. They are > just "payload". Noticed a f

Re: [HACKERS] Materialized views vs. primary keys

2016-04-05 Thread David Fetter
On Tue, Apr 05, 2016 at 07:10:56PM -0400, Robert Haas wrote: > On Tue, Apr 5, 2016 at 6:50 PM, David Fetter wrote: > > Is there a reason other than lack of tuits for this restriction? > > "this" lacks an antecedent. Try to put a primary key on a materialized view, for example: CREATE TABLE

Re: [HACKERS] Unused macros in src/include/access/transam.h

2016-04-05 Thread Michael Paquier
On Wed, Apr 6, 2016 at 4:55 AM, Fabrízio de Royes Mello wrote: > Hi all, > > When dealing with some patch review I've noticed there are two macro is not > used anywhere: > > #define TransactionIdStore(xid, dest) (*(dest) = (xid)) > #define StoreInvalidTransactionId(dest) (*(dest) = InvalidTransa

Re: [HACKERS] Proposal: "Causal reads" mode for load balancing reads without stale data

2016-04-05 Thread Thomas Munro
On Tue, Apr 5, 2016 at 4:17 AM, Robert Haas wrote: > On Wed, Mar 30, 2016 at 2:22 AM, Thomas Munro > wrote: >> On Wed, Mar 30, 2016 at 2:36 PM, Robert Haas wrote: >>> OK, I committed this, with a few tweaks. In particular, I added a >>> flag variable instead of relying on "latch set" == "need t

Re: [HACKERS] [PATCH v12] GSSAPI encryption support

2016-04-05 Thread Michael Paquier
On Wed, Apr 6, 2016 at 5:58 AM, Alvaro Herrera wrote: > Robbie Harwood wrote: >> Alvaro Herrera writes: >> > It seems to me that the right solution for this is to create a new >> > memory context which is a direct child of TopMemoryContext, so that >> > palloc can be used, and so that it can be r

Re: [HACKERS] Materialized views vs. primary keys

2016-04-05 Thread Robert Haas
On Tue, Apr 5, 2016 at 6:50 PM, David Fetter wrote: > Is there a reason other than lack of tuits for this restriction? "this" lacks an antecedent. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@

Re: [HACKERS] [PATCH v12] GSSAPI encryption support

2016-04-05 Thread Michael Paquier
On Wed, Apr 6, 2016 at 6:15 AM, Magnus Hagander wrote: > On Tue, Apr 5, 2016 at 7:58 PM, Robbie Harwood wrote: >> >> > -#if defined(WIN32) && !defined(WIN32_ONLY_COMPILER) >> > -/* >> > - * MIT Kerberos GSSAPI DLL doesn't properly export the symbols for >> > MingW >> > - * that contain the OIDs r

[HACKERS] Materialized views vs. primary keys

2016-04-05 Thread David Fetter
Folks, Is there a reason other than lack of tuits for this restriction? Cheers, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fet...@gmail.com Remember to vote! Consider donating to Postgres: http://www.po

Re: [HACKERS] dealing with extension dependencies that aren't quite 'e'

2016-04-05 Thread Alvaro Herrera
Alvaro Herrera wrote: > Abhijit Menon-Sen wrote: > > OK, thanks for the clarification. Here's the earlier patch, but with > > the relevant added docs and tests retained. > > I'd like to add indexes and materialized views to the set of objects > covered (functions and triggers). I'm already doing

Re: [HACKERS] [PATH] Jsonb, insert a new value into an array at arbitrary position

2016-04-05 Thread Andrew Dunstan
On 04/05/2016 03:08 PM, Tom Lane wrote: I think there is potentially some use-case for insert-only semantics for an object target, if you want to be sure you're not overwriting data. So I think "throw an error on duplicate key" is marginally better than "reject object target altogether". But

Re: [HACKERS] large regression for parallel COPY

2016-04-05 Thread Robert Haas
On Wed, Mar 30, 2016 at 4:10 PM, Andres Freund wrote: > Indeed. On SSDs I see about a 25-35% gain, on HDDs about 5%. If I > increase the size of backend_flush_after to 64 (like it's for bgwriter) > I however do get about 15% for HDDs as well. I tried the same test mentioned in the original post o

Re: [HACKERS] [PATCH v12] GSSAPI encryption support

2016-04-05 Thread Magnus Hagander
On Tue, Apr 5, 2016 at 7:58 PM, Robbie Harwood wrote: > > -#if defined(WIN32) && !defined(WIN32_ONLY_COMPILER) > > -/* > > - * MIT Kerberos GSSAPI DLL doesn't properly export the symbols for MingW > > - * that contain the OIDs required. Redefine here, values copied > > - * from src/athena/auth/kr

Re: [HACKERS] [PATCH v12] GSSAPI encryption support

2016-04-05 Thread Alvaro Herrera
Robbie Harwood wrote: > Alvaro Herrera writes: > > It seems to me that the right solution for this is to create a new > > memory context which is a direct child of TopMemoryContext, so that > > palloc can be used, and so that it can be reset separately, and that it > > doesn't suffer from resets

Re: [HACKERS] [PATCH v12] GSSAPI encryption support

2016-04-05 Thread David Steele
On 4/5/16 1:25 AM, Michael Paquier wrote: > Btw, those seem like small things to me, and my comments have been > addressed, so I have switched the patch as ready for committer. I > guess that Stephen would be the one to look at it. I have also run this patch through my tests and didn't find any p

Re: [HACKERS] Yet another small patch - reorderbuffer.c:1099

2016-04-05 Thread Robert Haas
On Tue, Apr 5, 2016 at 10:38 AM, Alvaro Herrera wrote: > IMO the code is wrong. There should be a single block comment saying > something like "Remove the node from its containing list. In the FOO > case, the list corresponds to BAR and therefore we delete it because > BAZ. In the QUUX case the

Re: [HACKERS] WIP: Covering + unique indexes.

2016-04-05 Thread Peter Geoghegan
On Tue, Apr 5, 2016 at 7:56 AM, Anastasia Lubennikova wrote: > I would say, this is changed, but it doesn't matter. Actually, I would now say that it hasn't really changed (see below), based on my new understanding. The *choice* to go on one page or the other still exists. > Performing any searc

Re: [HACKERS] [PATCH v12] GSSAPI encryption support

2016-04-05 Thread Robbie Harwood
Alvaro Herrera writes: > Robbie Harwood wrote: >> Michael Paquier writes: >> >> > On Tue, Apr 5, 2016 at 9:06 AM, Robbie Harwood wrote: >> >> Here's v12, both here and on my github: >> >> https://github.com/frozencemetery/postgres/tree/feature/gssencrypt12 > >> > So you are saving everything i

Re: [HACKERS] oversight in parallel aggregate

2016-04-05 Thread Robert Haas
On Mon, Apr 4, 2016 at 9:09 PM, David Rowley wrote: > On 5 April 2016 at 11:59, Robert Haas wrote: >> One of my EDB colleagues, while in the process of refactoring some >> unrelated Advanced Server code, discovered that (1) there's no way to >> mark an aggregate as anything other than parallel-un

[HACKERS] Unused macros in src/include/access/transam.h

2016-04-05 Thread Fabrízio de Royes Mello
Hi all, When dealing with some patch review I've noticed there are two macro is not used anywhere: #define TransactionIdStore(xid, dest) (*(dest) = (xid)) #define StoreInvalidTransactionId(dest) (*(dest) = InvalidTransactionId) Regards, -- Fabrízio de Royes Mello Consultoria/Coaching Postgre

Re: [HACKERS] [COMMITTERS] pgsql: Move each SLRU's lwlocks to a separate tranche.

2016-04-05 Thread Robert Haas
On Fri, Mar 25, 2016 at 12:47 PM, Tom Lane wrote: > Robert Haas writes: >> On Fri, Mar 25, 2016 at 9:48 AM, Tom Lane wrote: >>> Robert Haas writes: It's stupid that we keep spending time and energy figuring out which shared memory data structures require alignment and which ones don't

Re: [HACKERS] pgbench more operators & functions

2016-04-05 Thread Fabien COELHO
Please note that the checkpointer patch has two open items that perhaps you can help with --- see https://wiki.postgresql.org/wiki/Open_Items Indeed, I just looked at the commitfest, and I did not notice the other threads. I do not have an OSX available, but I'll have a look at the other on

Re: [HACKERS] Combining Aggregates

2016-04-05 Thread Robert Haas
On Tue, Apr 5, 2016 at 2:52 PM, Alvaro Herrera wrote: > Robert Haas wrote: >> Now, let's suppose that the user sets up a sharded table and then >> says: SELECT a, SUM(b), AVG(c) FROM sometab. At this point, what we'd >> like to have happen is that for each child foreign table, we go and >> fetch

Re: [HACKERS] dealing with extension dependencies that aren't quite 'e'

2016-04-05 Thread Alvaro Herrera
Abhijit Menon-Sen wrote: > OK, thanks for the clarification. Here's the earlier patch, but with > the relevant added docs and tests retained. I'd like to add indexes and materialized views to the set of objects covered (functions and triggers). I'm already doing that, so no need to resubmit; it s

Re: [HACKERS] [PATH] Jsonb, insert a new value into an array at arbitrary position

2016-04-05 Thread Tom Lane
Andrew Dunstan writes: > On 04/05/2016 12:42 PM, Teodor Sigaev wrote: >> I'm agree about covering this case by tests, but I think it should be >> allowed. >> In this case it will work exactly as jsbonb_set > It seems to me a violation of POLA to allow something called "insert" to > do a "replac

Re: [HACKERS] Endless loop calling PL/Python set returning functions

2016-04-05 Thread Tom Lane
Alexey Grishchenko writes: > Any comments on this patch? I felt that this was more nearly a bug fix than a new feature, so I picked it up even though it's nominally in the next commitfest not the current one. I did not like the code too much as it stood: you were not being paranoid enough about

Re: [HACKERS] Combining Aggregates

2016-04-05 Thread Alvaro Herrera
Robert Haas wrote: > Now, let's suppose that the user sets up a sharded table and then > says: SELECT a, SUM(b), AVG(c) FROM sometab. At this point, what we'd > like to have happen is that for each child foreign table, we go and > fetch partially aggregated results. Those children might be runni

Re: [HACKERS] [PATCH v12] GSSAPI encryption support

2016-04-05 Thread Alvaro Herrera
Robbie Harwood wrote: > Michael Paquier writes: > > > On Tue, Apr 5, 2016 at 9:06 AM, Robbie Harwood wrote: > >> Here's v12, both here and on my github: > >> https://github.com/frozencemetery/postgres/tree/feature/gssencrypt12 > > So you are saving everything in the top memory context. I am fin

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2016-04-05 Thread Robert Haas
On Tue, Apr 5, 2016 at 1:04 PM, Andres Freund wrote: > On 2016-04-05 12:14:35 -0400, Robert Haas wrote: >> On Tue, Apr 5, 2016 at 11:30 AM, Andres Freund wrote: >> > On 2016-04-05 20:56:31 +0530, Amit Kapila wrote: >> >> This fluctuation started appearing after commit 6150a1b0 which we have >> >>

Re: [HACKERS] Combining Aggregates

2016-04-05 Thread Robert Haas
On Tue, Apr 5, 2016 at 10:19 AM, Robert Haas wrote: > I'm going to concede the point that this shouldn't really be a > priority for 9.6, but I might want to come back to it later. It seems to me that if two aggregates are using the same transition function, they ought to also be using the same co

Re: [HACKERS] Choosing parallel_degree

2016-04-05 Thread Julien Rouhaud
On 05/04/2016 06:19, Amit Kapila wrote: > > Few more comments: > > 1. > @@ -909,6 +909,17 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | > UNLOGGED ] TABLE [ IF NOT EXI > > > > > +parallel_degree (integer) > + > + > > + Sets the degree of parallelism for an in

Re: [HACKERS] Updated backup APIs for non-exclusive backups

2016-04-05 Thread Magnus Hagander
On Tue, Apr 5, 2016 at 5:57 PM, Amit Kapila wrote: > On Tue, Apr 5, 2016 at 5:35 PM, Magnus Hagander > wrote: > >> >> >> On Mon, Apr 4, 2016 at 3:15 PM, Amit Kapila >> wrote: >> >>> On Mon, Apr 4, 2016 at 4:31 PM, Magnus Hagander >>> wrote: >>> On Fri, Apr 1, 2016 at 6:47 AM, Amit Kapila

Re: [HACKERS] [PATCH v12] GSSAPI encryption support

2016-04-05 Thread Robbie Harwood
Michael Paquier writes: > On Tue, Apr 5, 2016 at 9:06 AM, Robbie Harwood wrote: >> Here's v12, both here and on my github: >> https://github.com/frozencemetery/postgres/tree/feature/gssencrypt12 >> > +#ifdef ENABLE_GSS > + { > + MemoryContext save = CurrentMemoryContext; > + Curren

Re: [HACKERS] dealing with extension dependencies that aren't quite 'e'

2016-04-05 Thread Abhijit Menon-Sen
OK, thanks for the clarification. Here's the earlier patch, but with the relevant added docs and tests retained. -- Abhijit >From dfb6ded15246ec65cc911864bfcff285eef1c4d4 Mon Sep 17 00:00:00 2001 From: Abhijit Menon-Sen Date: Tue, 5 Apr 2016 11:55:09 +0530 Subject: =?UTF-8?q?Implement=20"ALTER=20

Re: [HACKERS] LOCK TABLE .. DEFERRABLE

2016-04-05 Thread Rod Taylor
On Tue, Apr 5, 2016 at 1:10 PM, Simon Riggs wrote: > If a lock is successfully obtained on one table, but not on all tables, it >> releases that lock and will retry to get them as a group in the future. >> Since inheritance acts as a group of tables (top + recursive cascade to >> children), this

Re: [HACKERS] LOCK TABLE .. DEFERRABLE

2016-04-05 Thread Andres Freund
On 2016-04-05 18:10:11 +0100, Simon Riggs wrote: > I'd prefer to see this as a lock wait mode where it sits in the normal lock > queue BUT other lock requestors are allowed to queue jump past it. That > should be just a few lines changed in the lock conflict checker and some > sleight of hand in th

Re: [HACKERS] LOCK TABLE .. DEFERRABLE

2016-04-05 Thread Simon Riggs
On 5 April 2016 at 17:43, Rod Taylor wrote: > The intention of this feature is to give the ability to slip into a normal > workload for non-urgent maintenance work. In essence, instead of lock > waiters being in a Queue, DEFERRABLE causes the current lock statement to > always be last. > Good id

Re: [HACKERS] [PATH] Jsonb, insert a new value into an array at arbitrary position

2016-04-05 Thread Andrew Dunstan
On 04/05/2016 12:42 PM, Teodor Sigaev wrote: I've been asked to look at and comment on the SQL API of the feature. I think it's basically sound, although there is one thing that's not clear from the regression tests: what happens if we're inserting into an object and the key already exists?

Re: [HACKERS] Relation extension scalability

2016-04-05 Thread Peter Geoghegan
On Tue, Apr 5, 2016 at 10:02 AM, Robert Haas wrote: > So the first thing here is that the patch seems to be a clear win in > this test. For a single copy, it seems to be pretty much a wash. > When running 4 copies in parallel, it is about 20-25% faster with both > logged and unlogged tables. The

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2016-04-05 Thread Andres Freund
On 2016-04-05 12:14:35 -0400, Robert Haas wrote: > On Tue, Apr 5, 2016 at 11:30 AM, Andres Freund wrote: > > On 2016-04-05 20:56:31 +0530, Amit Kapila wrote: > >> This fluctuation started appearing after commit 6150a1b0 which we have > >> discussed in another thread [1] and a colleague of mine is

Re: [HACKERS] Relation extension scalability

2016-04-05 Thread Robert Haas
On Thu, Mar 31, 2016 at 9:03 AM, Dilip Kumar wrote: > If you need some more information please let me know ? I repeated the testing described in http://www.postgresql.org/message-id/ca+tgmoyouqf9cgcpgygngzqhcy-gcckryaqqtdu8kfe4n6h...@mail.gmail.com on a MacBook Pro (OS X 10.8.5, 2.4 GHz Intel Cor

Re: [HACKERS] [PATH] Jsonb, insert a new value into an array at arbitrary position

2016-04-05 Thread Alvaro Herrera
Andrew Dunstan wrote: > I haven't been following this thread due to pressure of time, so my > apologies in advance if these comments have already been covered. > > I've been asked to look at and comment on the SQL API of the feature. I > think it's basically sound, although there is one thing tha

[HACKERS] LOCK TABLE .. DEFERRABLE

2016-04-05 Thread Rod Taylor
The intention of this feature is to give the ability to slip into a normal workload for non-urgent maintenance work. In essence, instead of lock waiters being in a Queue, DEFERRABLE causes the current lock statement to always be last. It was discussed at last years pgCon as useful for replication t

Re: [HACKERS] [PATH] Jsonb, insert a new value into an array at arbitrary position

2016-04-05 Thread Teodor Sigaev
I've been asked to look at and comment on the SQL API of the feature. I think it's basically sound, although there is one thing that's not clear from the regression tests: what happens if we're inserting into an object and the key already exists? e.g.: select jsonb_insert('{"a": {"b": "value"}}',

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2016-04-05 Thread Robert Haas
On Tue, Apr 5, 2016 at 11:30 AM, Andres Freund wrote: > On 2016-04-05 20:56:31 +0530, Amit Kapila wrote: >> This fluctuation started appearing after commit 6150a1b0 which we have >> discussed in another thread [1] and a colleague of mine is working on to >> write a patch to try to revert it on cur

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-04-05 Thread Dmitry Ivanov
> It seems that everything is settled now, so here's the patch introducing the > '<->' and '' operators. I've made the necessary changes to docs & > regression tests. I noticed that I had accidently trimmed whitespaces in docs, this is a better one. -- Dmitry Ivanov Postgres Professional: http:

Re: [HACKERS] Updated backup APIs for non-exclusive backups

2016-04-05 Thread Amit Kapila
On Tue, Apr 5, 2016 at 5:35 PM, Magnus Hagander wrote: > > > On Mon, Apr 4, 2016 at 3:15 PM, Amit Kapila > wrote: > >> On Mon, Apr 4, 2016 at 4:31 PM, Magnus Hagander >> wrote: >> >>> On Fri, Apr 1, 2016 at 6:47 AM, Amit Kapila >>> wrote: >>> >>> Also, I think below part of documentation

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2016-04-05 Thread Amit Kapila
On Tue, Apr 5, 2016 at 9:00 PM, Andres Freund wrote: > > On 2016-04-05 20:56:31 +0530, Amit Kapila wrote: > > This fluctuation started appearing after commit 6150a1b0 which we have > > discussed in another thread [1] and a colleague of mine is working on to > > write a patch to try to revert it on

Re: [HACKERS] Sequence Access Method WIP

2016-04-05 Thread Petr Jelinek
On 04/04/16 15:53, Fabrízio de Royes Mello wrote: On Thu, Mar 31, 2016 at 9:19 AM, Petr Jelinek mailto:p...@2ndquadrant.com>> wrote: > > Hi, > > new version attached that should fix the issue. It was alignment - honestly don't know what I was thinking using fixed alignment when the AMs can

Re: [HACKERS] [PATH] Jsonb, insert a new value into an array at arbitrary position

2016-04-05 Thread Andrew Dunstan
On 03/31/2016 09:00 AM, Dmitry Dolgov wrote: On 31 March 2016 at 17:31, Vitaly Burovoy > wrote: it is logical to insert new value if "before", then current value, then new value if "after". Oh, I see now. There is a slightly different logic: `v` i

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2016-04-05 Thread Andres Freund
On 2016-04-05 20:56:31 +0530, Amit Kapila wrote: > This fluctuation started appearing after commit 6150a1b0 which we have > discussed in another thread [1] and a colleague of mine is working on to > write a patch to try to revert it on current HEAD and then see the results. I don't see what that b

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2016-04-05 Thread Amit Kapila
On Tue, Apr 5, 2016 at 8:15 PM, Andres Freund wrote: > > On 2016-04-05 17:36:49 +0300, Alexander Korotkov wrote: > > Could the reason be that we're increasing concurrency for LWLock state > > atomic variable by placing queue spinlock there? > > Don't think so, it's the same cache-line either way.

Re: [HACKERS] Support for N synchronous standby servers - take 2

2016-04-05 Thread Masahiko Sawada
On Tue, Apr 5, 2016 at 7:23 PM, Kyotaro HORIGUCHI wrote: > At Mon, 4 Apr 2016 22:00:24 +0900, Masahiko Sawada > wrote in >> > For this case, the tree members of SyncRepConfig are '2[Sby1,', >> > 'Sby2', "Sby3]'. This syntax is valid for the current >> > specification but will surely get differe

Re: [HACKERS] WIP: Covering + unique indexes.

2016-04-05 Thread Anastasia Lubennikova
05.04.2016 01:48, Peter Geoghegan : On Mon, Mar 21, 2016 at 9:53 AM, Anastasia Lubennikova wrote: It's a bit more complicated to add it into index creation algorithm. There's a trick with a "high key". /* * We copy the last item on the page into the new page, and then

Re: [HACKERS] Support for N synchronous standby servers - take 2

2016-04-05 Thread Robert Haas
On Mon, Apr 4, 2016 at 4:28 AM, Fujii Masao wrote: >>> + ereport(LOG, >>> + (errmsg("standby \"%s\" is now the synchronous standby with priority %u", >>> + application_name, MyWalSnd->sync_standby_priority))); >>> >>> s/ the / a / > > I have no objection to this change itself. But we have used thi

Re: [HACKERS] Support for N synchronous standby servers - take 2

2016-04-05 Thread Amit Kapila
On Tue, Apr 5, 2016 at 3:15 PM, Fujii Masao wrote: > > On Tue, Apr 5, 2016 at 4:31 PM, Amit Kapila wrote: > > On Mon, Apr 4, 2016 at 1:58 PM, Fujii Masao wrote: > >> > >> > >> Thanks for updating the patch! > >> > >> I applied the following changes to the patch. > >> Attached is the revised vers

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2016-04-05 Thread Andres Freund
On 2016-04-05 17:36:49 +0300, Alexander Korotkov wrote: > Could the reason be that we're increasing concurrency for LWLock state > atomic variable by placing queue spinlock there? Don't think so, it's the same cache-line either way. > But I wonder why this could happen during "pgbench -S", becaus

Re: [HACKERS] oversight in parallel aggregate

2016-04-05 Thread Robert Haas
On Mon, Apr 4, 2016 at 10:26 PM, David Rowley wrote: > Does this need to check the parallel flags on the transfn or serialfn? > these'll be executed on the worker process. Possibly we also need the > combinefn/deserialfn/finalfn to be checked too as I see that we do > generate_gather_paths() from

Re: [HACKERS] Yet another small patch - reorderbuffer.c:1099

2016-04-05 Thread Alvaro Herrera
Simon Riggs wrote: > On 5 April 2016 at 10:12, Andres Freund wrote: > > > On 2016-04-05 12:07:40 +0300, Aleksander Alekseev wrote: > > > > I recall discussing this code with Andres, and I think that he has > > > > mentioned me this is intentional, because should things be changed for > > > > a re

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2016-04-05 Thread Alexander Korotkov
On Tue, Apr 5, 2016 at 10:26 AM, Dilip Kumar wrote: > > On Mon, Apr 4, 2016 at 2:28 PM, Andres Freund wrote: > >> Hm, interesting. I suspect that's because of the missing backoff in my >> experimental patch. If you apply the attached patch ontop of that >> (requires infrastructure from pinunpin)

Re: [HACKERS] Combining Aggregates

2016-04-05 Thread Robert Haas
On Tue, Apr 5, 2016 at 9:30 AM, David Rowley wrote: > On 6 April 2016 at 01:01, Robert Haas wrote: >> On Tue, Apr 5, 2016 at 3:55 AM, David Rowley >>> To be really honest, I'm quite worried that if I go and make this >>> change then my time might be wasted as I really think making that >>> change

Re: [HACKERS] dealing with extension dependencies that aren't quite 'e'

2016-04-05 Thread Alvaro Herrera
Abhijit Menon-Sen wrote: > At 2016-04-05 12:33:56 +0530, a...@2ndquadrant.com wrote: > > > > Álvaro: I did document and test the extra types you added, but now > > that I think about it a bit more, it's hard to argue that it's useful > > to have a table, for example, depend on an extension. There's

Re: [HACKERS] Combining Aggregates

2016-04-05 Thread David Rowley
On 6 April 2016 at 01:01, Robert Haas wrote: > On Tue, Apr 5, 2016 at 3:55 AM, David Rowley >> To be really honest, I'm quite worried that if I go and make this >> change then my time might be wasted as I really think making that >> change this late in the day is just setting this up for failure.

Re: [HACKERS] So, can we stop supporting Windows native now?

2016-04-05 Thread Merlin Moncure
On Wed, Mar 30, 2016 at 6:49 PM, Josh berkus wrote: > http://www.zdnet.com/article/microsoft-and-canonical-partner-to-bring-ubuntu-to-windows-10/ > > ... could be good news for us ... This is nothing new. Windows has had a unix subsystem (Interix AKA Windows Services for Unix) for quite some tim

Re: [HACKERS] Updated backup APIs for non-exclusive backups

2016-04-05 Thread David Steele
On 4/5/16 8:05 AM, Magnus Hagander wrote: PFA a better one (I think), also with the rename and added comments that David was asking for. Barring objections, I will apply this version. This version looks good to me. -- -David da...@pgmasters.net -- Sent via pgsql-hackers mailing list (pgsql

Re: [HACKERS] Combining Aggregates

2016-04-05 Thread Robert Haas
On Tue, Apr 5, 2016 at 3:55 AM, David Rowley wrote: >> I think it might be a good idea if these patches made less use of >> bytea and exposed the numeric transition values as, say, a 2-element >> array of numeric. > > Well, if you have a look at NumericAggState you can see it's not quite > as simp

  1   2   >