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

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

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

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

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

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",

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

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

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.

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

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

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

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

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

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

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

[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

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

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 >

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:

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 > + { > +

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

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

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

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

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

[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

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: >> >>

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

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

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

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

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

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

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

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

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 > wrote: > > Hi, > > new version attached that should fix the issue. It was alignment - honestly don't know what I was thinking using fixed

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

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

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:

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

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

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

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":

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] 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

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

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

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 >

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".

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

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

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

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 > >

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] [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 > > - *

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 > > > > > > > > >

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

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.

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.

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

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

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:

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

[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

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

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

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,

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 >>

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

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

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

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 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 >

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

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

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

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:

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.

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

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:

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

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

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

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 > wrote: Yeah, keeping it but rejecting update of an existing key is my preference too. cheers andrew Yes, it sounds quite reasonable. Here is

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

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

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

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 >>

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

2016-04-05 Thread Abhijit Menon-Sen
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 really > nothing about a table

Re: [HACKERS] Timeline following for logical slots

2016-04-05 Thread Craig Ringer
On 5 April 2016 at 04:00, Robert Haas wrote: > > In general, I think we'd be a lot better off if we got some kind of > logical replication into core first and then worked on lifting these > types of limitations afterwards. First, I'd like to remind everyone that logical

Re: [HACKERS] Odd oid-system-column handling in postgres_fdw

2016-04-05 Thread Etsuro Fujita
On 2016/03/16 16:25, Etsuro Fujita wrote: > PG9.5 allows us to add an oid system column to foreign tables, using > ALTER FOREIGN TABLE SET WITH OIDS, but currently, that column reads as > zeroes in postgres_fdw. That seems to me like a bug. So, I'd like to > propose to fix that, by retrieving

[HACKERS] Typo in src/interfaces/libpq/fe-connect.c

2016-04-05 Thread Etsuro Fujita
Hi, I ran into a typo in src/interfaces/libpq/fe-connect.c: s/PQcancelGet/PQgetCancel/ Attached is a patch to fis that typo. Best regards, Etsuro Fujita diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c index 5ad4755..9b2839b 100644 ---

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

2016-04-05 Thread Fujii Masao
On Mon, Apr 4, 2016 at 5:59 PM, Abhijit Menon-Sen wrote: > At 2016-04-04 17:28:07 +0900, masao.fu...@gmail.com wrote: >> >> Barring any objections, I'll commit this patch. > > No objections, just a minor wording tweak: > > doc/src/sgml/config.sgml: > > "The synchronous

Re: [HACKERS] Combining Aggregates

2016-04-05 Thread David Rowley
On 5 April 2016 at 16:54, Robert Haas wrote: > On Wed, Mar 30, 2016 at 3:34 PM, David Rowley > wrote: >> I wrote 0002 - 0004, these were reviewed by Tomas. >> 0005 is Haribabu's patch: Reviewed by Tomas and I. > > I think it might be a good

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

2016-04-05 Thread Amit Langote
On 2016/04/05 16:35, Simon Riggs wrote: > 6. Meaning of k (n1, n2, n3) with N servers > > It's clearly documented that this means k replies IN SEQUENCE. I believe > the typical meaning of would be “any k out of N”, which would be faster > than what we have, e.g. >3 (n1, n2, n3) would release

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

2016-04-05 Thread Ashutosh Bapat
With this patch, all instances of tableoid, cmin, cmax etc. will get a non-NULL value irrespective of whether they appear on nullable side of the join or not. e.g. select t1.c1, t1.tableoid, t2.c1, t2.tableoid from ft4 t1 left join ft5 t2 on (t1.c1 = t2.c1); run in contrib_regression gives output

Re: [HACKERS] Timeline following for logical slots

2016-04-05 Thread Craig Ringer
On 5 April 2016 at 14:18, Peter Geoghegan wrote: > > I rather agree that an in-core system that solved some of the basic > problems would be a huge step forward, and would motivate people to > work on the harder problems. It's surprising to me that we don't seem > to be much

Re: [HACKERS] Timeline following for logical slots

2016-04-05 Thread Andres Freund
On 2016-04-05 15:51:00 +0800, Craig Ringer wrote: > Review and test responses have been pretty underwhelming for pglogical, and > quite a bit seem to have boiled down to "this should live as an extension, > we don't need it in core". It often feels like we can't win: if we seek to > get it into

Re: [HACKERS] raw output from copy

2016-04-05 Thread Pavel Stehule
Hi here is cleaned/finished previous implementation of RAW_TEXT/RAW_BINARY formats for COPY statements. The RAW with text formats means unescaped data, but with correct encoding - input/output is realised with input/output function. RAW binary means content produced/received by sending/received

  1   2   >