Re: [HACKERS] a fast bloat measurement tool (was Re: Measuring relation free space)

2015-04-17 Thread Amit Kapila
On Fri, Apr 3, 2015 at 9:07 PM, Abhijit Menon-Sen wrote: > > At 2015-03-31 22:43:49 +0530, a...@2ndquadrant.com wrote: > > > > I'm just posting this WIP patch where I've renamed fastbloat to > > pgstatbloat as suggested by Tomas, and added in the documentation, and > > so on. > > Here's the revise

Re: [HACKERS] pg_upgrade in 9.5 broken for adminpack

2015-04-17 Thread Bruce Momjian
On Thu, Apr 16, 2015 at 11:29:07PM -0700, Jeff Janes wrote: > Of course after sending that it became obvious.  The C function is not getting > called because the SQL function is marked as being strict, yet is called with > NULL arguments. > > Trivial patch attached to unset strict flag in pg_proc.

Re: [HACKERS] Moving on to close the current CF 2015-02

2015-04-17 Thread Michael Paquier
On Sat, Apr 18, 2015 at 12:03 AM, Simon Riggs wrote: > On 17 April 2015 at 08:22, Michael Paquier wrote: > >> To committers, here are the patches that seem on top of the list: > I'm pretty sure Committers are the people to decide which patches can be > committed, but thanks for the opinion. Note t

Re: Custom/Foreign-Join-APIs (Re: [HACKERS] [v9.5] Custom Plan API)

2015-04-17 Thread Kouhei Kaigai
Hanada-san, Thanks for your works. I have nothing to comment on any more (at this moment). I hope committer review / comment on the couple of features. Best regards, -- NEC Business Creation Division / PG-Strom Project KaiGai Kohei > -Original Message- > From: Shigeru HANADA [mailto:sh

Re: [HACKERS] Replication identifiers, take 4

2015-04-17 Thread Petr Jelinek
On 17/04/15 22:36, Simon Riggs wrote: I said that IMO the difference in WAL size is so small that we should just use 4-byte OIDs for the replication identifiers, instead of trying to make do with 2 bytes. Not because I find it too likely that you'll run out of IDs (although it co

Re: [HACKERS] Replication identifiers, take 4

2015-04-17 Thread Simon Riggs
On 17 April 2015 at 19:18, Heikki Linnakangas wrote: > To be honest, I'm not entirely sure what we're arguing over. When arguing over something you consider small, it is customary to allow the author precedence. We can't do things our own way all the time. I didn't much like pg_rewind, but it

Re: [HACKERS] INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0

2015-04-17 Thread Dean Rasheed
On 17 April 2015 at 12:54, Stephen Frost wrote: > Dean, I've been working through your patches over the past couple of > days (apologies for the lack of updates, just been busy) and hope to > push them very shortly (ie: by the end of the weekend). > Cool. Thanks. > One thing that I was hoping to

Re: [HACKERS] INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0

2015-04-17 Thread Peter Geoghegan
On Fri, Apr 17, 2015 at 1:30 AM, Andres Freund wrote: >> However, like my second approach, there would be a "speculative >> affirmation" WAL record. > > I think there should be one, but it's not required for the approach. The > 'pending speculative insertion' can just be completed whenever there's

Re: [HACKERS] INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0

2015-04-17 Thread Peter Geoghegan
On Fri, Apr 17, 2015 at 11:19 AM, Heikki Linnakangas wrote: >> because he wanted to preserve those by doing the MagicOffsetNumber >> thing. > > > Yes, that's the way to go. > > Glad we cleared that up :-). Got it, thanks! -- Peter Geoghegan -- Sent via pgsql-hackers mailing list (pgsql-hack

Re: [HACKERS] INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0

2015-04-17 Thread Heikki Linnakangas
On 04/17/2015 09:02 PM, Peter Geoghegan wrote: I'm slightly surprised that Heikki now wants to use an infomask2 bit (if that is what you mean), No, I don't. because he wanted to preserve those by doing the MagicOffsetNumber thing. Yes, that's the way to go. Glad we cleared that up :-). -

Re: [HACKERS] Relation extension scalability

2015-04-17 Thread Qingqing Zhou
On Sun, Mar 29, 2015 at 11:56 AM, Andres Freund wrote: > I'm not sure whether the above is the best solution however. For one I > think it's not necessarily a good idea to opencode this in hio.c - I've > not observed it, but this probably can happen for btrees and such as > well. For another, this

Re: [HACKERS] Replication identifiers, take 4

2015-04-17 Thread Heikki Linnakangas
On 04/17/2015 08:36 PM, Simon Riggs wrote: On 17 April 2015 at 18:12, Heikki Linnakangas wrote: On 04/17/2015 12:04 PM, Simon Riggs wrote: On 17 April 2015 at 09:54, Andres Freund wrote: Hrmpf. Says the person that used a lot of padding, without much discussion, for the WAL level infras

Re: [HACKERS] INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0

2015-04-17 Thread Peter Geoghegan
On Fri, Apr 17, 2015 at 1:38 AM, Andres Freund wrote: >> Do you just mean that you think that speculative insertions should be >> explicitly affirmed by a second record (making it not a speculative >> tuple, but rather, a fully fledged tuple)? IOW, an MVCC snapshot has >> no chance of seeing a tup

Re: [HACKERS] Replication identifiers, take 4

2015-04-17 Thread Simon Riggs
On 17 April 2015 at 18:12, Heikki Linnakangas wrote: > On 04/17/2015 12:04 PM, Simon Riggs wrote: > >> On 17 April 2015 at 09:54, Andres Freund wrote: >> >> Hrmpf. Says the person that used a lot of padding, without much >>> discussion, for the WAL level infrastructure making pg_rewind more >>>

Re: [HACKERS] TABLESAMPLE patch

2015-04-17 Thread Simon Riggs
On 17 April 2015 at 14:54, Petr Jelinek wrote: > I agree that DDL patch is not that important to get in (and I made it last > patch in the series now), which does not mean somebody can't write the > extension with new tablesample method. > > > In any case attached another version. > > Changes: >

Re: [HACKERS] Moving on to close the current CF 2015-02

2015-04-17 Thread Simon Riggs
On 17 April 2015 at 08:22, Michael Paquier wrote: > To committers, here are the patches that seem on top of the list: > I'm pretty sure Committers are the people to decide which patches can be committed, but thanks for the opinion. -- Simon Riggshttp://www.2ndQuadrant.com/

Re: [HACKERS] Replication identifiers, take 4

2015-04-17 Thread Heikki Linnakangas
On 04/17/2015 12:04 PM, Simon Riggs wrote: On 17 April 2015 at 09:54, Andres Freund wrote: Hrmpf. Says the person that used a lot of padding, without much discussion, for the WAL level infrastructure making pg_rewind more maintainable. Sounds bad. What padding are we talking about? In the

Re: [HACKERS] INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0

2015-04-17 Thread Peter Geoghegan
On Fri, Apr 17, 2015 at 4:54 AM, Stephen Frost wrote: > Dean, I've been working through your patches over the past couple of > days (apologies for the lack of updates, just been busy) and hope to > push them very shortly (ie: by the end of the weekend). > > One thing that I was hoping to discuss a

Re: [HACKERS] Moving on to close the current CF 2015-02

2015-04-17 Thread Magnus Hagander
On Fri, Apr 17, 2015 at 9:23 AM, Michael Paquier wrote: > On Fri, Apr 17, 2015 at 4:22 PM, Michael Paquier wrote: > > @Magnus: having the possibility to mark a patch as "returned with > > feedback" without bumping it to the next CF automatically would be > > cool to being moving on. > Meh. "cool

Re: [HACKERS] ONLY in queries by RI triggers

2015-04-17 Thread Andres Freund
On 2015-04-17 17:35:16 +0300, Vladimir Borodin wrote: > A long time ago in 04b31609b63ce77fb9273193f07cf21b2a7176af ONLY > keyword was added to all queries in > src/backend/utils/adt/ri_triggers.c. Since that time foreign keys do > not work with inheritance trees and it is mentioned in the > docume

[HACKERS] ONLY in queries by RI triggers

2015-04-17 Thread Vladimir Borodin
Hi all. A long time ago in 04b31609b63ce77fb9273193f07cf21b2a7176af ONLY keyword was added to all queries in src/backend/utils/adt/ri_triggers.c. Since that time foreign keys do not work with inheritance trees and it is mentioned in the documentation for all versions since at least 7.3. I won

[HACKERS] Buildfarm client version 4.15 released

2015-04-17 Thread Andrew Dunstan
I have just released version 4.15 of the PostgreSQL Buildfarm Client . It can be downloaded at Here's what's changed: * support the new location for pg_upgr

Re: [HACKERS] patch for xidin

2015-04-17 Thread Tom Lane
"Zhang Zq" writes: >The implements of 'xidin' use only ¡®strtoul¡¯ to cast from string to > xid. So in some cases, may cause confusion, for example, > The sql 'select c1 from test where xmin='abc' can be executed. and sometimes > will make mistakes, I want to query "select c1 from test

Re: [HACKERS] Manipulating complex types as non-contiguous structures in-memory

2015-04-17 Thread Heikki Linnakangas
On 04/17/2015 03:58 PM, Tom Lane wrote: Heikki Linnakangas writes: On 03/28/2015 11:24 PM, Tom Lane wrote: + * Macros for iterating through elements of a flat or expanded array. How about a struct instead? struct ArrayIter { Datum datumptr; bool isnullptr; char d

[HACKERS] patch for xidin

2015-04-17 Thread Zhang Zq
hi, The implements of 'xidin' use only ‘strtoul’ to cast from string to xid. So in some cases, may cause confusion, for example, The sql 'select c1 from test where xmin='abc' can be executed. and sometimes will make mistakes, I want to query "select c1 from test where xmin='0x10'" ,but write

Re: [HACKERS] Replication identifiers, take 4

2015-04-17 Thread Simon Riggs
On 17 April 2015 at 09:54, Andres Freund wrote: > Hrmpf. Says the person that used a lot of padding, without much > discussion, for the WAL level infrastructure making pg_rewind more > maintainable. Sounds bad. What padding are we talking about? -- Simon Riggshttp://www.2ndQua

Re: [HACKERS] pg_upgrade in 9.5 broken for adminpack

2015-04-17 Thread Bruce Momjian
On Fri, Apr 17, 2015 at 04:11:44PM +0900, Michael Paquier wrote: > On Fri, Apr 17, 2015 at 3:29 PM, Jeff Janes wrote: > > Of course after sending that it became obvious. The C function is not > > getting called because the SQL function is marked as being strict, yet is > > called with NULL argumen

Re: [HACKERS] Manipulating complex types as non-contiguous structures in-memory

2015-04-17 Thread Tom Lane
Heikki Linnakangas writes: > On 03/28/2015 11:24 PM, Tom Lane wrote: >> + * Macros for iterating through elements of a flat or expanded array. > How about a struct instead? > struct ArrayIter { > Datum datumptr; > bool isnullptr; > char dataptr; > bits8 bitmapptr; >

Re: [HACKERS] INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0

2015-04-17 Thread Stephen Frost
Dean, * Dean Rasheed (dean.a.rash...@gmail.com) wrote: > In all of this, I think we should try to keep things as simple as > possible, to give the end user a chance to understand it --- although > I'm not sure I've achieved that with my explanation :-) Thanks a lot for this. It goes along with m

Re: [HACKERS] Manipulating complex types as non-contiguous structures in-memory

2015-04-17 Thread Heikki Linnakangas
On 03/28/2015 11:24 PM, Tom Lane wrote: + /* + * Macros for iterating through elements of a flat or expanded array. + * Use "ARRAY_ITER ARRAY_ITER_VARS(name);" to declare the local variables + * needed for an iterator (more than one set can be used in the same function, + * if they have diff

fix xlogdump percentage display (was Re: [HACKERS] Replication identifiers, take 4)

2015-04-17 Thread Abhijit Menon-Sen
At 2015-04-17 10:54:51 +0200, and...@anarazel.de wrote: > > (The FPI percentage display above is arguably borked. Interesting.) Sorry for the trouble. Patch attached. -- Abhijit >From 1e5c5d5948030e8ff6ccdd2309a97fb1e116d8e2 Mon Sep 17 00:00:00 2001 From: Abhijit Menon-Sen Date: Fri, 17 Apr 2015

Re: [HACKERS] KNN-GiST with recheck

2015-04-17 Thread Alexander Korotkov
On Wed, Feb 25, 2015 at 12:15 PM, Alexander Korotkov wrote: > Hi! > > On Tue, Feb 24, 2015 at 5:39 PM, Tomas Vondra < > tomas.von...@2ndquadrant.com> wrote: > >> On 17.2.2015 14:21, Alexander Korotkov wrote: >> > On Sun, Feb 15, 2015 at 2:08 PM, Alexander Korotkov >> > mailto:aekorot...@gmail.com

Re: [HACKERS] Replication identifiers, take 4

2015-04-17 Thread Andres Freund
On 2015-04-12 22:02:38 +0300, Heikki Linnakangas wrote: > This needs to be weighed against removing the padding bytes > altogether. Hrmpf. Says the person that used a lot of padding, without much discussion, for the WAL level infrastructure making pg_rewind more maintainable. And you deemed to be

Re: [HACKERS] INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0

2015-04-17 Thread Andres Freund
On 2015-04-16 09:43:54 -0700, Peter Geoghegan wrote: > On Thu, Apr 16, 2015 at 2:23 AM, Andres Freund wrote: > > I'm, completely independent of logical decoding, of the *VERY* strong > > opinion that 'speculative insertions' should never be visible when > > looking with normal snapshots. For one i

Re: [HACKERS] INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0

2015-04-17 Thread Andres Freund
On 2015-04-16 10:25:29 -0700, Peter Geoghegan wrote: > On Thu, Apr 16, 2015 at 2:18 AM, Andres Freund wrote: > > If we go that way that's the way I think it should be done: Whenever we > > encounter a speculative record we 'unlink' it from the changes that will > > be reused for spooling from disk

Re: [HACKERS] INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0

2015-04-17 Thread Dean Rasheed
On 9 April 2015 at 22:18, Peter Geoghegan wrote: > The big idea (the fine details of which Stephen appeared to be in > tentative agreement with [1]) is that an UPSERT is a hybrid between an > INSERT and an UPDATE, and not simply an INSERT and separate UPDATE > tied together. So at the very least t

Re: [HACKERS] Moving on to close the current CF 2015-02

2015-04-17 Thread Michael Paquier
On Fri, Apr 17, 2015 at 4:22 PM, Michael Paquier wrote: > @Magnus: having the possibility to mark a patch as "returned with > feedback" without bumping it to the next CF automatically would be > cool to being moving on. Meh. "cool to have to help moving on". -- Michael -- Sent via pgsql-hackers

Re: [HACKERS] Moving on to close the current CF 2015-02

2015-04-17 Thread Michael Paquier
On Thu, Mar 26, 2015 at 10:50 AM, Michael Paquier wrote: > On Thu, Mar 26, 2015 at 10:41 AM, Bruce Momjian wrote: >> On Thu, Mar 26, 2015 at 10:22:11AM +0900, Michael Paquier wrote: >>> Hi all, >>> >>> Visibly there is no commit fest manager this time (was I?), and people >>> may think that I sti

Re: [HACKERS] pg_upgrade in 9.5 broken for adminpack

2015-04-17 Thread Michael Paquier
On Fri, Apr 17, 2015 at 3:29 PM, Jeff Janes wrote: > Of course after sending that it became obvious. The C function is not > getting called because the SQL function is marked as being strict, yet is > called with NULL arguments. > > Trivial patch attached to unset strict flag in pg_proc.h. > > But