[HACKERS] New error code to track unsupported contexts

2014-11-28 Thread Michael Paquier
Hi all, When pg_event_trigger_dropped_objects is run in a context that is not the one of an event trigger, currently the error code ERRCODE_FEATURE_NOT_SUPPORTED is returned. Wouldn't it be better to have an error to define an out-of-context instead? It seems that it would be a good thing to have

Re: [HACKERS] Marginal performance improvement: replace bms_first_member loops

2014-11-28 Thread David Rowley
On Sat, Nov 29, 2014 at 8:18 AM, Tom Lane wrote: > David Rowley writes: > > A while back when I was benchmarking the planner time during my trials > with > > anti/semi join removals, I wrote a patch to change the usage pattern for > > cases such as: > > > if (bms_membership(a) != BMS_SINGLETON)

Re: [HACKERS] Role Attribute Bitmask Catalog Representation

2014-11-28 Thread Adam Brightwell
All, I have attached a patch that addresses the current suggestions and recommendations: * Add 'get_all_role_attributes' SQL function - returns a text array representation of the attributes from a value passed to it. Example: postgres=# SELECT rolname, get_all_role_attributes(rolattr) AS rolatt

Re: [HACKERS] How to use brin indexes?

2014-11-28 Thread Alvaro Herrera
hubert depesz lubaczewski wrote: > On Sat, Nov 22, 2014 at 3:29 AM, Alvaro Herrera > wrote: > > > I won't push this right away because I want to add the cross-type stuff > > to the tests, to ensure I haven't bollixed anything; I ran a few quick > > manual tests and everything seems to work. But

Re: [HACKERS] bug in json_to_record with arrays

2014-11-28 Thread Tom Lane
Josh Berkus writes: > On 11/26/2014 12:48 PM, Tom Lane wrote: >> Wouldn't it be better if it said >> >> ERROR: invalid input syntax for array: "["potter","chef","programmer"]" >> DETAIL: Dimension value is missing. >> >> which is comparable to what you'd get out of most other input functions >>

Re: [HACKERS] no test programs in contrib

2014-11-28 Thread Alvaro Herrera
Peter Eisentraut wrote: > On 11/27/14 3:10 PM, Tom Lane wrote: > > I'm not too happy with that approach, because packagers are going to > > tend to think they should package any files installed by install-world. > > The entire point of this change, IMO, is that the test modules should > > *not* get

Re: [HACKERS] no test programs in contrib

2014-11-28 Thread Josh Berkus
On 11/27/2014 12:51 PM, Tom Lane wrote: >> So test_decoding is fairly useful for users demonstrating that decoding >> > works, especially if they're also testing an external decoding module >> > and are unsure of where their replication problem is located, or what's >> > wrong with their HBA settin

Re: [HACKERS] Marginal performance improvement: replace bms_first_member loops

2014-11-28 Thread Tom Lane
David Rowley writes: > A while back when I was benchmarking the planner time during my trials with > anti/semi join removals, I wrote a patch to change the usage pattern for > cases such as: > if (bms_membership(a) != BMS_SINGLETON) > return; /* nothing to do */ > singleton = bms_singleton_memb

Re: [HACKERS] no test programs in contrib

2014-11-28 Thread Andres Freund
On 2014-11-27 15:51:51 -0500, Tom Lane wrote: > Josh Berkus writes: > > So test_decoding is fairly useful for users demonstrating that decoding > > works, especially if they're also testing an external decoding module > > and are unsure of where their replication problem is located, or what's > >

Re: [HACKERS] Add shutdown_at_recovery_target option to recovery.conf

2014-11-28 Thread Petr Jelinek
On 28/11/14 17:46, Alex Shulgin wrote: Christoph Berg writes: Re: Petr Jelinek 2014-11-25 <5474efea.2040...@2ndquadrant.com> Patch committed. Before I go and rebase that recovery.conf -> GUC patch on top of this... is it final? I think so, perhaps sans the name mentioned below. Than

Re: [HACKERS] Add shutdown_at_recovery_target option to recovery.conf

2014-11-28 Thread Alex Shulgin
Christoph Berg writes: > Re: Petr Jelinek 2014-11-25 <5474efea.2040...@2ndquadrant.com> >> >Patch committed. Before I go and rebase that recovery.conf -> GUC patch on top of this... is it final? >> >> Thanks! > > I'm a bit late to the party, but wouldn't > > recovery_target_action = ... > >

[HACKERS] using Core Foundation locale functions

2014-11-28 Thread Peter Eisentraut
In light of the recent discussions about using ICU on OS X, I looked into the Core Foundation locale functions (Core Foundation = traditional Mac API in OS X, as opposed to the Unix/POSIX APIs). Attached is a proof of concept patch that just about works for the sorting aspects. (The ctype aspects

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2014-11-28 Thread Alex Shulgin
Julien Tachoires writes: > > 2011/12/15 Alvaro Herrera : >> >> Uhm, surely you could compare the original toast tablespace to the heap >> tablespace, and if they differ, handle appropriately when creating the >> new toast table? =A0Just pass down the toast tablespace into >> AlterTableCreateToastT

Re: [HACKERS] no test programs in contrib

2014-11-28 Thread Peter Eisentraut
On 11/27/14 3:10 PM, Tom Lane wrote: > I'm not too happy with that approach, because packagers are going to > tend to think they should package any files installed by install-world. > The entire point of this change, IMO, is that the test modules should > *not* get installed, certainly not by norma

Re: [HACKERS] Marginal performance improvement: replace bms_first_member loops

2014-11-28 Thread Tom Lane
David Rowley writes: > I have to say I don't really like the modifying of the loop iterator that's > going on here: > col = -1; > while ((col = bms_next_member(rte->modifiedCols, col)) >= 0) > { > col += FirstLowInvalidHeapAttributeNumber; > /* do stuff */ > col -= FirstLowInvalidHeapAttrib

Re: [HACKERS] Marginal performance improvement: replace bms_first_member loops

2014-11-28 Thread Tom Lane
Dean Rasheed writes: > On 27 November 2014 at 19:20, Tom Lane wrote: >> The attached proposed patch adds bms_next_member() and replaces >> bms_first_member() calls where it seemed to make sense. > There is another micro-optimisation that you could make in > bms_next_member() -- it isn't necessar

Re: [HACKERS] The problems of PQhost()

2014-11-28 Thread Noah Misch
On Fri, Nov 28, 2014 at 07:55:29PM +0900, Fujii Masao wrote: > On Fri, Nov 28, 2014 at 3:43 AM, Noah Misch wrote: > > On Fri, Nov 28, 2014 at 03:11:06AM +0900, Fujii Masao wrote: > >> On Thu, Nov 27, 2014 at 12:38 PM, Noah Misch wrote: > >> > Sure. I'll first issue "git revert 9f80f48", then app

Re: [HACKERS] [pgsql-packagers] Palle Girgensohn's ICU patch

2014-11-28 Thread Palle Girgensohn
> 27 nov 2014 kl. 16:03 skrev Tom Lane : > > Another issue is that (AFAIK) ICU doesn't support any non-Unicode > encodings, which means that a build supporting *only* ICU collations is a > nonstarter IMO. The patch I originally wrote replaces strwcoll but for keeps the original behaviour for 8-

Re: [HACKERS] Function to know last log write timestamp

2014-11-28 Thread Fujii Masao
On Wed, Nov 26, 2014 at 4:05 PM, Michael Paquier wrote: > On Fri, Aug 15, 2014 at 8:17 PM, Fujii Masao wrote: >> On Fri, Aug 15, 2014 at 3:40 AM, Andres Freund >> wrote: >>> On 2014-08-14 14:37:22 -0400, Robert Haas wrote: On Thu, Aug 14, 2014 at 2:21 PM, Andres Freund wrote: >

Re: [HACKERS] The problems of PQhost()

2014-11-28 Thread Fujii Masao
On Fri, Nov 28, 2014 at 3:43 AM, Noah Misch wrote: > On Fri, Nov 28, 2014 at 03:11:06AM +0900, Fujii Masao wrote: >> On Thu, Nov 27, 2014 at 12:38 PM, Noah Misch wrote: >> > Sure. I'll first issue "git revert 9f80f48", then apply the attached >> > patch. >> > Since libpq ignores a hostaddr para

Re: [HACKERS] Marginal performance improvement: replace bms_first_member loops

2014-11-28 Thread David Rowley
On Fri, Nov 28, 2014 at 8:20 AM, Tom Lane wrote: > > The attached proposed patch adds bms_next_member() and replaces > bms_first_member() calls where it seemed to make sense. I've had a > hard time measuring much speed difference for this patch in isolation, > but in principle it should be less

Re: [HACKERS] KNN-GiST with recheck

2014-11-28 Thread Alexander Korotkov
On Sat, Nov 22, 2014 at 2:20 AM, Peter Geoghegan wrote: > On Mon, Jan 13, 2014 at 9:17 AM, Alexander Korotkov > wrote: > > This patch was split from thread: > > > http://www.postgresql.org/message-id/CAPpHfdscOX5an71nHd8WSUH6GNOCf=V7wgDaTXdDd9=gon-...@mail.gmail.com > > > > I've split it to sepa

Re: [HACKERS] Fillfactor for GIN indexes

2014-11-28 Thread Alexander Korotkov
Hi! On Fri, Nov 21, 2014 at 8:12 AM, Michael Paquier wrote: > Please find attached a simple patch adding fillfactor as storage parameter > for GIN indexes. The default value is the same as the one currently aka 100 > to have the pages completely packed when a GIN index is created. > That's not

Re: [HACKERS] inherit support for foreign tables

2014-11-28 Thread Ashutosh Bapat
On Thu, Nov 27, 2014 at 3:52 PM, Etsuro Fujita wrote: > (2014/11/17 17:55), Ashutosh Bapat wrote: > >> Here are my review comments for patch fdw-inh-3.patch. >> > > Thanks for the review! > > Tests >> --- >> 1. It seems like you have copied from testcase inherit.sql to >> postgres_fdw testca

Re: [HACKERS] Marginal performance improvement: replace bms_first_member loops

2014-11-28 Thread Dean Rasheed
On 27 November 2014 at 19:20, Tom Lane wrote: > The attached proposed patch adds bms_next_member() and replaces > bms_first_member() calls where it seemed to make sense. I've had a > hard time measuring much speed difference for this patch in isolation, > but in principle it should be less code a