Re: [HACKERS] possible optimization: push down aggregates

2014-08-27 Thread Tomas Vondra
On 27 Srpen 2014, 21:41, Merlin Moncure wrote: On Wed, Aug 27, 2014 at 2:07 PM, Pavel Stehule pavel.steh...@gmail.com Are there some plans to use partitioning for aggregation? Besides min/max, what other aggregates (mean/stddev come to mind) would you optimize and how would you determine

Re: [HACKERS] possible optimization: push down aggregates

2014-08-27 Thread Merlin Moncure
On Wed, Aug 27, 2014 at 3:27 PM, Tom Lane t...@sss.pgh.pa.us wrote: Merlin Moncure mmonc...@gmail.com writes: associative bit just makes it easier (which is important of course!). mean for example can be pushed down if the 'pushed down' aggregates return to the count to the reaggregator so

Re: [HACKERS] possible optimization: push down aggregates

2014-08-27 Thread Claudio Freire
On Wed, Aug 27, 2014 at 6:46 PM, Merlin Moncure mmonc...@gmail.com wrote: Yeah: I was overthinking it. My mind was on parallel processing of the aggregate (which is not what Pavel was proposing) because that just happens to be what I'm working on currently -- using dblink to decompose

Re: [HACKERS] [TODO] Track number of files ready to be archived in pg_stat_archiver

2014-08-27 Thread Julien Rouhaud
Le 25/08/2014 19:00, Gilles Darold a écrit : Le 21/08/2014 10:17, Julien Rouhaud a écrit : Hello, Attached patch implements the following TODO item : Track number of WAL files ready to be archived in pg_stat_archiver However, it will track the total number of any file ready to be

Re: [HACKERS] Missing plpgsql.o Symbols on OS X

2014-08-27 Thread Tom Lane
David E. Wheeler da...@justatheory.com writes: Hackers, I’m trying to build Pavel’s plpgsql_check against the 9.4 beta on OS X 10.9, but get these errors: make gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute

Re: [HACKERS] FOR [SHARE|UPDATE] NOWAIT may still block in EvalPlanQualFetch

2014-08-27 Thread Alvaro Herrera
Craig Ringer wrote: FOR SHARE|UPDATE NOWAIT will still block if they have to follow a ctid chain because the call to EvalPlanQualFetch doesn't take a param for noWait, so it doesn't know not to block if the updated row can't be locked. Applied with some further editorialization. In another

Re: [HACKERS] SKIP LOCKED DATA (work in progress)

2014-08-27 Thread Alvaro Herrera
Thomas Munro wrote: Thanks, I hadn't seen this, I should have checked the archives better. I have actually already updated my patch to handle EvalPlanQualFetch with NOWAIT and SKIP LOCKED with isolation specs, see attached. I will compare with Craig's and see if I screwed anything up... of

Re: [HACKERS] re-reading SSL certificates during server reload

2014-08-27 Thread Robert Haas
On Wed, Aug 27, 2014 at 6:40 AM, Magnus Hagander mag...@hagander.net wrote: On Wed, Aug 27, 2014 at 11:56 AM, Alexey Klyukin al...@hintbits.com wrote: Greetings, Is there a strong reason to disallow reloading server key and cert files during the PostgreSQL reload? Key and cert files are

[HACKERS] Re: [BUGS] Re: BUG #9555: pg_dump for tables with inheritance recreates the table with the wrong order of columns

2014-08-27 Thread Noah Misch
On Wed, Aug 27, 2014 at 11:24:53AM -0400, Tom Lane wrote: On Wed, Aug 27, 2014 at 10:40:53AM -0400, Bruce Momjian wrote: I looked at this issue from March and I think we need to do something. In summary, the problem is that tables using inheritance can be dumped and reloaded with columns

[HACKERS] Btree internal node data?

2014-08-27 Thread Tatsuo Ishii
While looking into a btree internal page using pg_filedump against an int4 index generated pgbench, I noticed that only item 2 has length 8, which indicates that the index tuple has only tuple header and has no index data. In my understanding this indicates that the item is used to represent a

Re: [HACKERS] Btree internal node data?

2014-08-27 Thread Peter Geoghegan
On Wed, Aug 27, 2014 at 7:08 PM, Tatsuo Ishii is...@postgresql.org wrote: While looking into a btree internal page using pg_filedump against an int4 index generated pgbench, I noticed that only item 2 has length 8, which indicates that the index tuple has only tuple header and has no index

Re: [HACKERS] Specifying the unit in storage parameter

2014-08-27 Thread Michael Paquier
On Wed, Aug 27, 2014 at 10:59 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Not necessarily, because it's harmless. It's there for purely aesthetical reasons, so it's your choice whether to add it or not. Having it there is slightly easier on somebody reading the code, perhaps. On my

Re: [HACKERS] [TODO] Track number of files ready to be archived in pg_stat_archiver

2014-08-27 Thread Michael Paquier
On Thu, Aug 28, 2014 at 7:37 AM, Julien Rouhaud julien.rouh...@dalibo.com wrote: Attached v2 patch implements this approach. All the work is still done in pg_stat_get_archiver, as I don't think that having a specific function for that information would be really interesting. Please be sure

Re: [HACKERS] Missing plpgsql.o Symbols on OS X

2014-08-27 Thread Ashesh Vashi
Please add -arch x86_64 to your LD_FLAGS and CFLAGS in your make file. -- Thanks Regards, Ashesh Vashi EnterpriseDB INDIA: Enterprise PostgreSQL Company http://www.enterprisedb.com *http://www.linkedin.com/in/asheshvashi* http://www.linkedin.com/in/asheshvashi On Wed, Aug 27, 2014 at 9:29

[HACKERS] Dense index?

2014-08-27 Thread Tatsuo Ishii
While looking into pg_filedump output of int4 btree index, It strikes me that in leaf pages about 25% of page is wasted because of 8 byte alignment (MAXALIGN on 64bit architecture): an index tuple consists of 8 byte tuple header + 4 byte key + 4 byte alignment, thus 4/(8+4+4) = 25% is waste. I

Re: [HACKERS] Dense index?

2014-08-27 Thread Tom Lane
Tatsuo Ishii is...@postgresql.org writes: I know that the alignment is required for faster memory access, but sometimes we may want to save disk space for index to save I/O because these days customers want to handle huge number of rows. To make index more dense, can we add an option something

Re: [HACKERS] Dense index?

2014-08-27 Thread Tatsuo Ishii
Only if you want it to crash hard on most non-Intel architectures. Of course some CPU architecture prohibits none word boundary access and we need to do either: 1) do not allow to use the option on such an architecture 2) work hard to use temporary buffer which is properly aligned Best

Re: [HACKERS] Dense index?

2014-08-27 Thread Peter Geoghegan
On Wed, Aug 27, 2014 at 10:16 PM, Tatsuo Ishii is...@postgresql.org wrote: I know that the alignment is required for faster memory access, but sometimes we may want to save disk space for index to save I/O because these days customers want to handle huge number of rows. To make index more

[HACKERS] Is this code safe?

2014-08-27 Thread Pavan Deolasee
Someone reported an issue on XL mailing list about the following code in fe-connect.c failing on Power PC platform: 1844 if (getsockopt(conn-sock, SOL_SOCKET, SO_ERROR, 1845(char *) optval, optlen) == -1) 1846 { 1847

Re: [HACKERS] Is this code safe?

2014-08-27 Thread Tom Lane
Pavan Deolasee pavan.deola...@gmail.com writes: Can some kind of compiler optimisation reorder things such that the else if expression is evaluated using the old, uninitialised value of optval? Any such behavior is patently illegal per the C standard. Not that that's always stopped compiler

<    1   2