Re: [HACKERS] delta relations in AFTER triggers

2016-12-17 Thread Craig Ringer
On 22 Nov. 2016 03:01, "Thomas Munro" wrote: How about a QueryEnvironment (as shown in the patch I posted) that contains a list of NamedTuplestore pointers (the SpiRelation struct in the patch I posted, renamed) and in future perhaps lists of other

Re: [HACKERS] delta relations in AFTER triggers

2016-12-17 Thread Craig Ringer
On 22 Nov. 2016 01:05, "Kevin Grittner" wrote: Right, I think we should assume that there will be other ways people want to use parts of what is done here, including building tuplestores through other means and referencing them in queries. Yes. PL/pgsql table-valued

Re: [HACKERS] Trouble building uuid-ossp extension in new versions of Postgres

2016-12-17 Thread Tom Lane
Ryan Murphy writes: > I have been trying to build Postgres and migrate my data to the newest > version. Postgres builds just fine, but I also need the uuid-ossp module, > which used to build fine for me and now does not... I think the key question is what version of the

Re: [HACKERS] delta relations in AFTER triggers

2016-12-17 Thread Kevin Grittner
On Sun, Dec 4, 2016 at 11:35 PM, Haribabu Kommi wrote: > Moved to next CF with "waiting on author" status. Patch v8 attempts to address the issues explicitly raised in Thomas Munro's review. An opaque query environment is created that, for now, only passes through

[HACKERS] Trouble building uuid-ossp extension in new versions of Postgres

2016-12-17 Thread Ryan Murphy
Hello, I have been trying to build Postgres and migrate my data to the newest version. Postgres builds just fine, but I also need the uuid-ossp module, which used to build fine for me and now does not... I am currently "git pull"ed to commit b645a05fc6112a4857ceac574d4aa2 4174a70417. I cd into

Re: [HACKERS] Speedup twophase transactions

2016-12-17 Thread Bruce Momjian
On Sat, Dec 17, 2016 at 07:38:46PM -0500, Bruce Momjian wrote: > As Andres already stated, the problem is that there is a text/plain and > text/html of the same email, and the diff is _inside_ the multipa/mixed > HTML block. I think it needs to be outside on its own. Mutt shows text/plain by

Re: [HACKERS] Speedup twophase transactions

2016-12-17 Thread Bruce Momjian
On Sat, Dec 17, 2016 at 03:47:34PM -0800, Andres Freund wrote: > On 2016-12-17 15:30:08 -0800, David Fetter wrote: > > On Sat, Dec 17, 2016 at 05:54:04PM -0500, Bruce Momjian wrote: > > > On Sun, Dec 18, 2016 at 07:41:50AM +0900, Michael Paquier wrote: > > > > On Sun, Dec 18, 2016 at 6:42 AM,

Re: [HACKERS] Speedup twophase transactions

2016-12-17 Thread Andres Freund
On 2016-12-17 15:30:08 -0800, David Fetter wrote: > On Sat, Dec 17, 2016 at 05:54:04PM -0500, Bruce Momjian wrote: > > On Sun, Dec 18, 2016 at 07:41:50AM +0900, Michael Paquier wrote: > > > On Sun, Dec 18, 2016 at 6:42 AM, Bruce Momjian wrote: > > > > Uh, did you mean to

Re: [HACKERS] Speedup twophase transactions

2016-12-17 Thread David Fetter
On Sat, Dec 17, 2016 at 05:54:04PM -0500, Bruce Momjian wrote: > On Sun, Dec 18, 2016 at 07:41:50AM +0900, Michael Paquier wrote: > > On Sun, Dec 18, 2016 at 6:42 AM, Bruce Momjian wrote: > > > Uh, did you mean to attached patch here? > > > > Strange. I can confirm that I have

Re: [HACKERS] Speedup twophase transactions

2016-12-17 Thread Stas Kelvich
> On 18 Dec 2016, at 01:54, Bruce Momjian wrote: > > On Sun, Dec 18, 2016 at 07:41:50AM +0900, Michael Paquier wrote: >> >> >> Strange. I can confirm that I have received the patch as attached, but >> it is not on the archives. > > It must have been stripped by our email

Re: [HACKERS] Speedup twophase transactions

2016-12-17 Thread Bruce Momjian
On Sun, Dec 18, 2016 at 07:41:50AM +0900, Michael Paquier wrote: > On Sun, Dec 18, 2016 at 6:42 AM, Bruce Momjian wrote: > > Uh, did you mean to attached patch here? > > Strange. I can confirm that I have received the patch as attached, but > it is not on the archives. It must

Re: pg_authid.rolpassword format (was Re: [HACKERS] Password identifiers, protocol aging and SCRAM protocol)

2016-12-17 Thread Michael Paquier
On Sun, Dec 18, 2016 at 3:59 AM, Robert Haas wrote: > On Fri, Dec 16, 2016 at 5:30 PM, Michael Paquier > wrote: >> From the discussions of last year on -hackers, it was decided to *not* >> have an additional column per complains from a couple of

Re: [HACKERS] Speedup twophase transactions

2016-12-17 Thread Michael Paquier
On Sun, Dec 18, 2016 at 6:42 AM, Bruce Momjian wrote: > Uh, did you mean to attached patch here? Strange. I can confirm that I have received the patch as attached, but it is not on the archives. -- Michael diff --git a/src/backend/access/transam/twophase.c

Re: [HACKERS] Proposal for changes to recovery.conf API

2016-12-17 Thread Bruce Momjian
On Sat, Dec 17, 2016 at 02:52:41PM +0100, Magnus Hagander wrote: > The point is that the documentation about the recovery.conf changes in > Postgres are only interesting to people migrating to Postgres 10, i.e. > this is not quality documentation for someone going from Postgres 10 to >

Re: [HACKERS] Speedup twophase transactions

2016-12-17 Thread Bruce Momjian
On Fri, Dec 16, 2016 at 02:00:46PM +0300, Stas Kelvich wrote: > > > On 27 Sep 2016, at 03:30, Michael Paquier wrote: > > > > OK. I am marking this patch as returned with feedback then. Looking > > forward to seeing the next investigations.. At least this review has >

Re: [HACKERS] CREATE OR REPLACE VIEW bug

2016-12-17 Thread Tom Lane
Dean Rasheed writes: > Attached is a patch enforcing this order and adding some comments to > make it clear why the order matters here. > Barring objections I'll back-patch this to 9.4 where WCO was added. Looks reasonable in a quick once-over. I didn't test it.

Re: [HACKERS] Rethinking our fulltext phrase-search implementation

2016-12-17 Thread Tom Lane
I wrote: > It's worth noting that with these rules, phrase searches will act as > though "!x" always matches somewhere; for instance "!a <-> !b" will match > any tsvector. I argue that this is not wrong, not even if the tsvector is > empty: there could have been adjacent stopwords matching !a and

Re: [HACKERS] PSQL commands: \quit_if, \quit_unless

2016-12-17 Thread Corey Huinker
> > > (Or in other words, let's see \while ... \endloop in the minimal proposal > > as well, or at least a sketch of how to get there.) > > It seems to me that we could implement \if ... \else ...\endif by > having some kind of stack that indicates which constructs we're inside > of and whether

Re: [HACKERS] CREATE OR REPLACE VIEW bug

2016-12-17 Thread Dean Rasheed
On 17 December 2016 at 15:42, Dean Rasheed wrote: > It seems that there is a bug in CREATE OR REPLACE VIEW... > > DefineView()/DefineVirtualRelation() will need a little re-jigging to > do things in the required order. ...and the required order for existing views is 1.

Re: pg_authid.rolpassword format (was Re: [HACKERS] Password identifiers, protocol aging and SCRAM protocol)

2016-12-17 Thread Robert Haas
On Fri, Dec 16, 2016 at 5:30 PM, Michael Paquier wrote: > On Sat, Dec 17, 2016 at 5:42 AM, Stephen Frost wrote: >> * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: >>> On 12/15/16 8:40 AM, Stephen Frost wrote: >>> > I don't follow why we

Re: [HACKERS] Proposal for changes to recovery.conf API

2016-12-17 Thread Robert Haas
On Sat, Dec 17, 2016 at 8:52 AM, Magnus Hagander wrote: > On Sat, Dec 17, 2016 at 5:42 AM, Bruce Momjian wrote: >> On Fri, Dec 16, 2016 at 08:52:25PM -0500, Robert Haas wrote: >> > On Fri, Dec 16, 2016 at 8:07 PM, Tom Lane wrote: >> > >

Re: [HACKERS] PSQL commands: \quit_if, \quit_unless

2016-12-17 Thread Robert Haas
On Fri, Dec 16, 2016 at 12:40 PM, Tom Lane wrote: > Robert Haas writes: >> So I think it would be reasonable for somebody to implement \if, >> \elseif, \endif first, with the argument having to be, precisely, a >> single variable and nothing else (not

[HACKERS] Rethinking our fulltext phrase-search implementation

2016-12-17 Thread Tom Lane
I've been thinking about how to fix the problem Andreas Seltenreich reported at https://postgr.es/m/87eg1y2s3x@credativ.de The core of that problem is that the phrase-search patch attempts to restructure tsquery trees so that there are no operators underneath a PHRASE operator, except

Re: [HACKERS] Logical Replication WIP

2016-12-17 Thread Steve Singer
On 12/16/2016 07:49 AM, Petr Jelinek wrote: Hi, attached is version 13 of the patch. I merged in changes from PeterE. And did following changes: - fixed the ownership error messages for both provider and subscriber - added ability to send invalidation message to invalidate whole relcache and

Re: [HACKERS] jsonb_delete with arrays

2016-12-17 Thread Dmitry Dolgov
> Attached is an implantation of jsonb_delete that instead of taking a single key to remove accepts an array of keys Since I already saw this patch, here is my small review. Speaking about implementation of `jsonb_delete_array` - it's fine, but I would like to suggest two modifications: *

[HACKERS] CREATE OR REPLACE VIEW bug

2016-12-17 Thread Dean Rasheed
It seems that there is a bug in CREATE OR REPLACE VIEW's handling of WITH CHECK OPTION (noticed while thinking about the recent change to pg_dump's handling of circular dependencies in views -- d8c05af). If you use CREATE OR REPLACE VIEW on a view that isn't auto-updatable and turn it into one

Re: [HACKERS] PSQL commands: \quit_if, \quit_unless

2016-12-17 Thread Pavel Stehule
2016-12-17 16:26 GMT+01:00 Fabien COELHO : > > Hello Tom, > > So I think it would be reasonable for somebody to implement \if, >>> \elseif, \endif first, with the argument having to be, precisely, a >>> single variable and nothing else (not even a negator). [...] >>> >> >

Re: [HACKERS] PSQL commands: \quit_if, \quit_unless

2016-12-17 Thread Fabien COELHO
Hello Tom, So I think it would be reasonable for somebody to implement \if, \elseif, \endif first, with the argument having to be, precisely, a single variable and nothing else (not even a negator). [...] This seems like a reasonable implementation plan to me, not least because it tackles

Re: [HACKERS] pg_basebackups and slots

2016-12-17 Thread Magnus Hagander
On Sat, Dec 17, 2016 at 3:54 PM, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 12/15/16 4:04 AM, Magnus Hagander wrote: > > This obviously requires the server to be configured with enough slots (I > > still think we should change the default here, but that's a different > >

Re: [HACKERS] pg_basebackups and slots

2016-12-17 Thread Peter Eisentraut
On 12/15/16 4:04 AM, Magnus Hagander wrote: > This obviously requires the server to be configured with enough slots (I > still think we should change the default here, but that's a different > topic), but I think that's acceptable. We could implicitly reserve one replication slot per walsender.

Re: [HACKERS] pg_basebackups and slots

2016-12-17 Thread Magnus Hagander
On Fri, Dec 16, 2016 at 7:40 AM, Michael Paquier wrote: > On Fri, Dec 16, 2016 at 3:32 PM, Magnus Hagander > wrote: > > I don't really know how to write a good test for it. I mean, we could > run it > > with the parameter, but how to we make it

Re: [HACKERS] pg_basebackups and slots

2016-12-17 Thread Magnus Hagander
On Fri, Dec 16, 2016 at 12:41 PM, Petr Jelinek wrote: > On 16/12/16 07:32, Magnus Hagander wrote: > > > > On Dec 16, 2016 07:27, "Michael Paquier" > > wrote: > > > > > > > > On Thu, Dec 15, 2016 at

Re: [HACKERS] [PATCH] Remove trailing whitespaces from documentation

2016-12-17 Thread Peter Eisentraut
On 12/14/16 6:10 PM, Vladimir Rusinov wrote: > Either way, I've attached another version of my patch - this time it > avoids touching example psql output. Baby steps. > I'll let you decide on the way forward. I'm just happy to send some patches. committed -- Peter Eisentraut

Re: [HACKERS] Make pg_basebackup -x stream the default

2016-12-17 Thread Magnus Hagander
On Fri, Dec 16, 2016 at 6:35 PM, Fujii Masao wrote: > On Fri, Dec 16, 2016 at 11:36 PM, Magnus Hagander > wrote: > > On Thu, Dec 15, 2016 at 12:37 AM, Vladimir Rusinov > > wrote: > >> > >> Usability review > >> > >>

Re: [HACKERS] Proposal for changes to recovery.conf API

2016-12-17 Thread Magnus Hagander
On Sat, Dec 17, 2016 at 5:42 AM, Bruce Momjian wrote: > On Fri, Dec 16, 2016 at 08:52:25PM -0500, Robert Haas wrote: > > On Fri, Dec 16, 2016 at 8:07 PM, Tom Lane wrote: > > > I'm still not seeing any value in putting this sort of info into > > > a

Re: [HACKERS] Typos in waldender.c and slot.c

2016-12-17 Thread Magnus Hagander
On Sat, Dec 17, 2016 at 2:08 PM, Michael Paquier wrote: > Hi all, > > While going through the temporary replication slot commits, I have > noticed two typos as attached. > Applied, thanks. -- Magnus Hagander Me: http://www.hagander.net/ Work:

[HACKERS] Typos in waldender.c and slot.c

2016-12-17 Thread Michael Paquier
Hi all, While going through the temporary replication slot commits, I have noticed two typos as attached. Thanks, -- Michael slot-typos.patch Description: application/download -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] Logical Replication WIP

2016-12-17 Thread Erik Rijkers
On 2016-12-16 13:49, Petr Jelinek wrote: version 13 of the patch. 0001-Add-PUBLICATION-catalogs-and-DDL-v13.patch.gz (~32 KB) 0002-Add-SUBSCRIPTION-catalog-and-DDL-v13.patch.gz (~28 KB) 0003-Define-logical-rep...utput-plugi-v13.patch.gz (~13 KB)

Re: [HACKERS] Crash on promotion when recovery.conf is renamed

2016-12-17 Thread Magnus Hagander
On Fri, Dec 16, 2016 at 7:08 AM, Michael Paquier wrote: > On Thu, Dec 15, 2016 at 11:25:10AM +0200, Heikki Linnakangas wrote: > > On 12/15/2016 10:44 AM, Magnus Hagander wrote: > > > I wonder if there might be more corner cases like this, but in this > > > particular

Re: [HACKERS] Hang in pldebugger after git commit : 98a64d0

2016-12-17 Thread Ashutosh Sharma
> It is fine as per current usage of WaitEventSet API's, however, > Robert's point is valid that user is not obliged to call > ModifyWaitEvent before WaitEventSetWait. Imagine a case where some > new user of this API is calling WaitEventSetWait repeatedly without > calling ModifyWaitEvent. Oops!

Re: [HACKERS] Hang in pldebugger after git commit : 98a64d0

2016-12-17 Thread Amit Kapila
On Sat, Dec 17, 2016 at 3:53 PM, Ashutosh Sharma wrote: > Hi, > >>> I think it should be the responsibility of >>> WaitEventSetWaitBlock() to reset the event, if needed, before calling >>> WaitForMultipleObjects(). >>> >> >> If we want to change WaitEventSetWaitBlock then

Re: [HACKERS] Hang in pldebugger after git commit : 98a64d0

2016-12-17 Thread Amit Kapila
On Sat, Dec 17, 2016 at 9:34 AM, Robert Haas wrote: > On Fri, Dec 16, 2016 at 10:34 PM, Amit Kapila wrote: >>> I think it should be the responsibility of >>> WaitEventSetWaitBlock() to reset the event, if needed, before calling >>>

Re: [HACKERS] Hang in pldebugger after git commit : 98a64d0

2016-12-17 Thread Ashutosh Sharma
Hi, >> I think it should be the responsibility of >> WaitEventSetWaitBlock() to reset the event, if needed, before calling >> WaitForMultipleObjects(). >> > > If we want to change WaitEventSetWaitBlock then ideally we need to > change all other wait API's (WAIT_USE_SELECT, WAIT_USE_POLL, etc.)

[HACKERS] too low cost of Bitmap index scan

2016-12-17 Thread Pavel Stehule
Hi I am trying to fix slow query on PostgreSQL 9.5.4. The data are almost in RAM I have a problem with too low cost slow Bitmap index scan on date column, that returns 300K rows. Slow part -> Bitmap Heap Scan on "Zasilka" (cost=5097.39..5670.64 rows=1 width=12) (actual time=62.253..62.400