Re: [HACKERS] StrategyGetBuffer optimization, take 2

2013-08-07 Thread Atri Sharma
On Wed, Aug 7, 2013 at 10:37 PM, Andres Freund and...@2ndquadrant.com wrote: On 2013-08-07 09:40:24 -0500, Merlin Moncure wrote: I don't think the unlocked increment of nextVictimBuffer is a good idea though. nextVictimBuffer jumping over NBuffers under concurrency seems like a recipe for

Re: [HACKERS] median and percentile function implementation

2013-08-26 Thread Atri Sharma
On Mon, Aug 26, 2013 at 10:15 PM, Pavel Stehule pavel.steh...@gmail.com wrote: Hello very nice! I tested it and works very well. And I looking for implementation in core. Two notes: * should to support string_agg and array_agg Regards Pavel 2013/8/26 Vik Fearing

Re: [HACKERS] Valgrind Memcheck support

2013-08-27 Thread Atri Sharma
Sent from my iPad On 27-Aug-2013, at 19:44, Andres Freund and...@2ndquadrant.com wrote: Hi Noah, On 2013-06-09 17:25:59 -0400, Noah Misch wrote: *** a/src/backend/tcop/postgres.c --- b/src/backend/tcop/postgres.c *** *** 69,74 --- 69,75 #include tcop/tcopprot.h

Re: [HACKERS] [rfc] overhauling pgstat.stat

2013-09-03 Thread Atri Sharma
On Wed, Sep 4, 2013 at 6:40 AM, Satoshi Nagayasu sn...@uptime.jp wrote: Hi, I'm considering overhauling pgstat.stat, and would like to know how many people are interested in this topic. As you may know, this file could be handreds of MB in size, because pgstat.stat holds all access

Re: [HACKERS] [rfc] overhauling pgstat.stat

2013-09-04 Thread Atri Sharma
Sent from my iPad On 04-Sep-2013, at 10:54, Satoshi Nagayasu sn...@uptime.jp wrote: Hi, (2013/09/04 12:52), Atri Sharma wrote: On Wed, Sep 4, 2013 at 6:40 AM, Satoshi Nagayasu sn...@uptime.jp wrote: Hi, I'm considering overhauling pgstat.stat, and would like to know how many people

Re: [HACKERS] [rfc] overhauling pgstat.stat

2013-09-04 Thread Atri Sharma
Sent from my iPad On 04-Sep-2013, at 15:39, Satoshi Nagayasu sn...@uptime.jp wrote: (2013/09/04 15:23), Atri Sharma wrote: Sent from my iPad On 04-Sep-2013, at 10:54, Satoshi Nagayasu sn...@uptime.jp wrote: Hi, (2013/09/04 12:52), Atri Sharma wrote: On Wed, Sep 4, 2013 at 6:40

Re: [HACKERS] Re: Proposal/design feedback needed: WITHIN GROUP (sql standard ordered set aggregate functions)

2013-09-04 Thread Atri Sharma
Sent from my iPad On 04-Sep-2013, at 21:38, Peter Eisentraut pete...@gmx.net wrote: On 7/19/13 11:59 AM, Atri Sharma wrote: Hi all, This is our current work-in-progress patch for WITHIN GROUP. This patch needs to be rebased. This version of patch is quite old.We will be sending

Re: [HACKERS] [rfc] overhauling pgstat.stat

2013-09-04 Thread Atri Sharma
Sent from my iPad On 05-Sep-2013, at 8:58, Satoshi Nagayasu sn...@uptime.jp wrote: (2013/09/05 3:59), Alvaro Herrera wrote: Tomas Vondra wrote: My idea was to keep the per-database stats, but allow some sort of random access - updating / deleting the records in place, adding records

Re: [HACKERS] [rfc] overhauling pgstat.stat

2013-09-05 Thread Atri Sharma
On Thu, Sep 5, 2013 at 10:59 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Satoshi Nagayasu wrote: But, for now, I think we should have a real index for the statistics data because we already have several index storages, and it will allow us to minimize read/write operations. BTW, what

Re: [HACKERS] [rfc] overhauling pgstat.stat

2013-09-07 Thread Atri Sharma
Sent from my iPad On 08-Sep-2013, at 4:27, Tomas Vondra t...@fuzzy.cz wrote: On 5.9.2013 09:36, Atri Sharma wrote: On Thu, Sep 5, 2013 at 10:59 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Satoshi Nagayasu wrote: But, for now, I think we should have a real index

Re: [HACKERS] [rfc] overhauling pgstat.stat

2013-09-07 Thread Atri Sharma
Sent from my iPad On 08-Sep-2013, at 4:27, Tomas Vondra t...@fuzzy.cz wrote: On 5.9.2013 09:36, Atri Sharma wrote: On Thu, Sep 5, 2013 at 10:59 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Satoshi Nagayasu wrote: But, for now, I think we should have a real index

Re: [HACKERS] Re: custom hash-based COUNT(DISTINCT) aggregate - unexpectedly high memory consumption

2013-10-07 Thread Atri Sharma
Sent from my iPad On 07-Oct-2013, at 4:11, Tomas Vondra t...@fuzzy.cz wrote: On 6.10.2013 20:37, Tomáš Janoušek wrote: Hi, On Sat, Oct 05, 2013 at 08:22:54PM +0200, Tomas Vondra wrote: I'm on 64-bit architecture and the example works with int32, which means the sizes should be about

Re: [HACKERS] Re: custom hash-based COUNT(DISTINCT) aggregate - unexpectedly high memory consumption

2013-10-07 Thread Atri Sharma
Hi Tomas, Consider the aspects associated with open addressing.Open addressing can quickly lead to growth in the main table.Also, chaining is a much cleaner way of collision resolution,IMHO. What do you mean by growth in the main table? Sorry, I should have been more verbose. AFAIK, Open

Re: [HACKERS] Re: custom hash-based COUNT(DISTINCT) aggregate - unexpectedly high memory consumption

2013-10-08 Thread Atri Sharma
Sent from my iPad On 08-Oct-2013, at 10:41, Claudio Freire klaussfre...@gmail.com wrote: On Tue, Oct 8, 2013 at 1:23 AM, Atri Sharma atri.j...@gmail.com wrote: Consider the aspects associated with open addressing.Open addressing can quickly lead to growth in the main table.Also, chaining

Re: [HACKERS] Re: custom hash-based COUNT(DISTINCT) aggregate - unexpectedly high memory consumption

2013-10-08 Thread Atri Sharma
Sent from my iPad However I'm unable to make it at least comparable to chaining. The trick is that the hash table performs reasonably only until it's ~ 65-70% full, it gets really slow after that. So to maintain performance comparable to chaining, I'd have to keep the table below this

Re: [HACKERS] Re: custom hash-based COUNT(DISTINCT) aggregate - unexpectedly high memory consumption

2013-10-08 Thread Atri Sharma
On Tue, Oct 8, 2013 at 4:15 PM, Tomas Vondra t...@fuzzy.cz wrote: On 8 Říjen 2013, 11:42, Atri Sharma wrote: I've made some significant improvements in the chaining version (in the master branch), now getting about the memory consumption I've estimated. I agree, we can hope to reduce

Re: [HACKERS] stats for network traffic WIP

2013-10-23 Thread Atri Sharma
On Thu, Oct 24, 2013 at 12:23 AM, Mike Blackwell mike.blackw...@rrd.com wrote: Sounds good. I personally don't have any interest in log file i/o counters, but that's just me. I wonder if stats collector counters might be useful... I seem to recall an effort to improve that area. Maybe not

Re: [HACKERS] stats for network traffic WIP

2013-10-23 Thread Atri Sharma
On Thu, Oct 24, 2013 at 12:30 AM, Mike Blackwell mike.blackw...@rrd.com wrote: On Wed, Oct 23, 2013 at 1:58 PM, Atri Sharma atri.j...@gmail.com wrote: IMO, the idea is pretty good. Its just that we need to do some wide spectrum performance testing. Thats only my thought though. I'm

Re: [HACKERS] Save Hash Indexes

2013-11-01 Thread Atri Sharma
On Friday, November 1, 2013, k...@rice.edu wrote: On Fri, Nov 01, 2013 at 01:31:10PM +, Dimitri Fontaine wrote: Hi, Here's an idea: when a user ask for an Hash Index transparently build a BTree index over an hash function instead. Advantages: - it works - it's crash

Re: [HACKERS] Feature request: Optimizer improvement

2013-11-01 Thread Atri Sharma
On Friday, November 1, 2013, Jim Nasby wrote: On Oct 31, 2013, at 2:57 PM, Kevin Grittner kgri...@ymail.comjavascript:_e({}, 'cvml', 'kgri...@ymail.com'); wrote: Joe Love j...@primoweb.com javascript:_e({}, 'cvml', 'j...@primoweb.com'); wrote: In postgres 9.2 I have a function that is

Re: Handle LIMIT/OFFSET before select clause (was: [HACKERS] Feature request: optimizer improvement)

2013-11-02 Thread Atri Sharma
On Sat, Nov 2, 2013 at 2:00 AM, Tom Lane t...@sss.pgh.pa.us wrote: Jim Nasby j...@nasby.net writes: On Oct 31, 2013, at 11:04 AM, Joe Love j...@primoweb.com wrote: In postgres 9.2 I have a function that is relatively expensive. When I write a query such as: select

Re: Handle LIMIT/OFFSET before select clause (was: [HACKERS] Feature request: optimizer improvement)

2013-11-05 Thread Atri Sharma
On Tue, Nov 5, 2013 at 11:55 PM, Tom Lane t...@sss.pgh.pa.us wrote: Joe Love j...@primoweb.com writes: I'm wondering what type of index would work for this as it is a volatile function. Not knowing how PGs optimizer runs, I'm at a loss as to why this wouldn't be possible or worth doing. It

Re: [HACKERS] Fwd: Test of Algorithm || Indexing Scheme

2013-11-11 Thread Atri Sharma
On Tue, Nov 12, 2013 at 11:53 AM, Craig Ringer cr...@2ndquadrant.com wrote: On 11/12/2013 03:26 AM, Rohit Goyal wrote: Hi, Actually, I want to test an algorithm in which I will use store tuple_id in some other data structure and value of the key of index will contain some random created by

Re: [HACKERS] stats for network traffic WIP

2013-11-19 Thread Atri Sharma
On Tue, Nov 19, 2013 at 11:43 PM, Mike Blackwell mike.blackw...@rrd.com wrote: This patch looks good to me. It applies, builds, and runs the regression tests. Documentation is included and it seems to do what it says. I don't consider myself a code expert, but as far as I can see it looks

Re: [HACKERS] Status of FDW pushdowns

2013-11-27 Thread Atri Sharma
I guess the view query would have to be validated by the FDW, which would just receive a text. +1 This is not exactly in context, but I and David Fetter discussed recently how we could do similar thing. This would work,but how can we do it for FDWs which do not parse SQL? Am I missing

Re: [HACKERS] Status of FDW pushdowns

2013-11-27 Thread Atri Sharma
On Wed, Nov 27, 2013 at 11:08 PM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Atri Sharma atri.j...@gmail.com writes: This would work,but how can we do it for FDWs which do not parse SQL? Am I missing something here? Worst case: CREATE FOREIGN VIEW foo AS $$ whatever syntax

Re: [HACKERS] Status of FDW pushdowns

2013-11-27 Thread Atri Sharma
On Thu, Nov 28, 2013 at 12:54 AM, David Fetter da...@fetter.org wrote: On Wed, Nov 27, 2013 at 10:29:34AM -0300, Alvaro Herrera wrote: Shigeru Hanada escribió: SQL/MED standard doesn't say much about PASS THROUGH mode, especially about interaction between client. Besides it, I think it

Re: [HACKERS] Marginal performance improvement for fast-path locking

2013-11-28 Thread Atri Sharma
On Fri, Nov 29, 2013 at 12:16 AM, Tom Lane t...@sss.pgh.pa.us wrote: While debugging the recent fastpath lock unpleasantness, I noticed that the code tends to use only the last few entries in the fpRelId[] arrays, which seemed a bit surprising. The reason of course is the way that

Re: [HACKERS] Status of FDW pushdowns

2013-11-29 Thread Atri Sharma
Sent from my iPad On 28-Nov-2013, at 16:13, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Tom Lane t...@sss.pgh.pa.us writes: I'm not real sure what this'd buy us that wouldn't be done as well or better by creating a view on the remote side. (IOW, there's nothing that says that the

Re: [HACKERS] palloc0

2013-11-30 Thread Atri Sharma
Sent from my iPad On 30-Nov-2013, at 14:30, mohsen soodkhah mohammadi mohsensoodk...@gmail.com wrote: if I don't dalloc parameters that allocated with palloc0 then will free the allocated memory at the end of transaction? Yes, palloc allocates memory in contexts, and the memory

Re: [HACKERS] stats for network traffic WIP

2013-12-07 Thread Atri Sharma
Sent from my iPad On 07-Dec-2013, at 23:47, Fujii Masao masao.fu...@gmail.com wrote: On Wed, Nov 20, 2013 at 3:18 AM, Atri Sharma atri.j...@gmail.com wrote: On Tue, Nov 19, 2013 at 11:43 PM, Mike Blackwell mike.blackw...@rrd.com wrote: This patch looks good to me. It applies, builds

Re: [HACKERS] stats for network traffic WIP

2013-12-09 Thread Atri Sharma
On Tue, Dec 10, 2013 at 10:59 AM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, Dec 10, 2013 at 6:56 AM, Nigel Heron nhe...@querymetrics.com wrote: On Sat, Dec 7, 2013 at 1:17 PM, Fujii Masao masao.fu...@gmail.com wrote: Could you share the performance numbers? I'm really concerned about

Re: [HACKERS] stats for network traffic WIP

2013-12-11 Thread Atri Sharma
On Wed, Dec 11, 2013 at 11:12 PM, Peter Eisentraut pete...@gmx.net wrote: On 12/10/13, 5:08 PM, Tom Lane wrote: Having said that, I can't get very excited about this feature anyway, so I'm fine with rejecting the patch. I'm not sure that enough people care to justify any added overhead at

Re: [HACKERS] WITHIN GROUP patch

2013-12-24 Thread Atri Sharma
Sent from my iPad On 24-Dec-2013, at 2:50, Tom Lane t...@sss.pgh.pa.us wrote: Atri Sharma atri.j...@gmail.com writes: Please find attached the latest patch for WITHIN GROUP. This patch is after fixing the merge conflicts. I've committed this after significant editorialization --- most

Re: [HACKERS] Questionable coding in orderedsetaggs.c

2014-01-25 Thread Atri Sharma
On Sunday, January 26, 2014, Tom Lane t...@sss.pgh.pa.us wrote: Jeremy Harris j...@wizmail.org javascript:; writes: In ordered_set_startup() sorts are initialised in non-randomAccess mode (tuplesort_begin_heap() and ~datum(), last argument). The use of tuplesort_skip_tuples() feels very

Re: [HACKERS] A better way than tweaking NTUP_PER_BUCKET

2014-01-26 Thread Atri Sharma
Sent from my iPad On 26-Jan-2014, at 4:38, Simon Riggs si...@2ndquadrant.com wrote: On 25 January 2014 22:33, Stephen Frost sfr...@snowman.net wrote: * Tom Lane (t...@sss.pgh.pa.us) wrote: AFAICT, there was no consensus in this thread on what to do, which probably has something to do

Re: [HACKERS] inherit support for foreign tables

2014-01-27 Thread Atri Sharma
Sent from my iPad On 27-Jan-2014, at 21:03, David Fetter da...@fetter.org wrote: On Mon, Jan 27, 2014 at 05:06:19PM +0900, Etsuro Fujita wrote: Hi Hanada-san, While still reviwing this patch, I feel this patch has given enough consideration to interactions with other commands, but

Re: [HACKERS] [pgsql-advocacy] GSoC 2014 - mentors, students and admins

2014-01-28 Thread Atri Sharma
On Tue, Jan 28, 2014 at 11:04 PM, Thom Brown t...@linux.com wrote: Hi all, Application to Google Summer of Code 2014 can be made as of next Monday (3rd Feb), and then there will be a 12 day window in which to submit an application. I'd like to gauge interest from both mentors and students

Re: [HACKERS] [pgsql-advocacy] GSoC 2014 - mentors, students and admins

2014-01-28 Thread Atri Sharma
On Tue, Jan 28, 2014 at 11:16 PM, Atri Sharma atri.j...@gmail.com wrote: On Tue, Jan 28, 2014 at 11:04 PM, Thom Brown t...@linux.com wrote: Hi all, Application to Google Summer of Code 2014 can be made as of next Monday (3rd Feb), and then there will be a 12 day window in which

Re: [HACKERS] inherit support for foreign tables

2014-01-29 Thread Atri Sharma
Sent from my iPad On 28-Jan-2014, at 10:04, Kouhei Kaigai kai...@ak.jp.nec.com wrote: I wonder what shall be the cases when foreign table is on a server which does not support *all* SQL features. Does a FDW need to have the possible inherit options mentioned in its documentation for this

Re: [HACKERS] Proposal: IMPORT FOREIGN SCHEMA statement.

2014-02-21 Thread Atri Sharma
On Fri, Feb 21, 2014 at 4:01 PM, Ronan Dunklau ronan.dunk...@dalibo.comwrote: Hello, The SQL-MED specification defines the IMPORT FOREIGN SCHEMA statement. This adds discoverability to foreign servers. The structure of the statement as I understand it is simple enough: IMPORT FOREIGN

Re: [HACKERS] Proposal: IMPORT FOREIGN SCHEMA statement.

2014-02-21 Thread Atri Sharma
On Fri, Feb 21, 2014 at 4:39 PM, Ronan Dunklau ronan.dunk...@dalibo.comwrote: I havent had a look at the patch yet since I dont have a nice editor right now, but how do you handle inter operability between datatypes? Specifically, how do you handle those datatypes which have a different

Re: [HACKERS] Proposal: IMPORT FOREIGN SCHEMA statement.

2014-02-21 Thread Atri Sharma
On Fri, Feb 21, 2014 at 4:56 PM, Ronan Dunklau ronan.dunk...@dalibo.comwrote: Le vendredi 21 février 2014 16:45:20 Atri Sharma a écrit : On Fri, Feb 21, 2014 at 4:39 PM, Ronan Dunklau ronan.dunk...@dalibo.comwrote: I havent had a look at the patch yet since I dont have a nice editor

Re: [HACKERS] [pgsql-advocacy] GSoC 2014 - mentors, students and admins

2014-02-25 Thread Atri Sharma
Awesome. I can be an assistant mentor for this one is possible or I could mentor some other project. On Tuesday, February 25, 2014, Andreas 'ads' Scherbaum adsm...@wars-nicht.de wrote: Hi, On 01/28/2014 06:46 PM, Atri Sharma wrote: On Tue, Jan 28, 2014 at 11:04 PM, Thom Brown t

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe

2014-03-04 Thread Atri Sharma
Good points. In most cases, DDL is applied manually after careful thought, so people seldom dump at the same time they upgrade the database. This is especially true for pg_dump since it captures the logical definition of tables. So most people will be happy with the default locking, but we

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe

2014-03-04 Thread Atri Sharma
If its not the case, the user should be more careful about when he is scheduling backups to so that they dont conflict with DDL changes. That is most certainly the wise choice. I am not too comfortable with exposing the locking type to the user. That may be just me though. Why would

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe

2014-03-04 Thread Atri Sharma
I'd really like to see us find a way to apply some version of this patch. I was in favor of the concept 3 years ago when we did this the first time, and I've subsequently done quite a bit of work (viz., MVCC catalog snapshots) to eliminate the main objection that was raised at that time. But

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe

2014-03-04 Thread Atri Sharma
On Tue, Mar 4, 2014 at 8:19 PM, Stephen Frost sfr...@snowman.net wrote: * Atri Sharma (atri.j...@gmail.com) wrote: If its not the case, the user should be more careful about when he is scheduling backups to so that they dont conflict with DDL changes. I'm not following this as closely

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe

2014-03-04 Thread Atri Sharma
On Tue, Mar 4, 2014 at 10:20 PM, Stephen Frost sfr...@snowman.net wrote: * Tom Lane (t...@sss.pgh.pa.us) wrote: Stephen Frost sfr...@snowman.net writes: I don't have too much of an issue with the above, but I would like to have us figure out a solution to the deadlock problem with

Re: [HACKERS] Selection of join algorithm.

2014-03-08 Thread Atri Sharma
On Saturday, March 8, 2014, Ishaya Bhatt ishayabh...@gmail.com wrote: Hi, I am trying to analyze join performance. But I see that even for a table having 100,000 rows and join attribute as primary key, postgres always performs hash join. Can anyone please tell me under which conditions

Re: [HACKERS] Why is AccessShareLock held until end of transaction?

2014-03-11 Thread Atri Sharma
On Tue, Mar 11, 2014 at 10:56 PM, Simon Riggs si...@2ndquadrant.com wrote: On 11 March 2014 03:41, Tom Lane t...@sss.pgh.pa.us wrote: Joe Conway m...@joeconway.com writes: I am probably missing something obvious, but why does the AccessShareLock remain held on a table after a SELECT

Re: [HACKERS] Why is AccessShareLock held until end of transaction?

2014-03-11 Thread Atri Sharma
On Tue, Mar 11, 2014 at 11:07 PM, Simon Riggs si...@2ndquadrant.com wrote: On 11 March 2014 17:29, Atri Sharma atri.j...@gmail.com wrote: On Tue, Mar 11, 2014 at 10:56 PM, Simon Riggs si...@2ndquadrant.com wrote: On 11 March 2014 03:41, Tom Lane t...@sss.pgh.pa.us wrote: Joe

Re: [HACKERS] GSoC 2014

2014-03-12 Thread Atri Sharma
On Wed, Mar 12, 2014 at 8:05 PM, Ashutosh Dhundhara ashutoshdhundh...@yahoo.com wrote: Hello all, I am Ashutosh Dhundhara from Thapat University, Patiala-India presently pursuing Bachelors degree in Computer Science and Engineering. This year I wish to work for PostgreSQL under the flagship

Re: [HACKERS] About the portal in postgres

2014-03-14 Thread Atri Sharma
On Fri, Mar 14, 2014 at 12:29 PM, Tanmay Deshpande tp.deshpand...@gmail.com wrote: My doubt is when the query enters into a portal, does it stay in the portal till the final execution ? i.e. Do the further function calls such as DefineRelation,create_heap_with_catalog etc. for Create query

Re: [HACKERS] Planner hints in Postgresql

2014-03-17 Thread Atri Sharma
On Mon, Mar 17, 2014 at 9:22 PM, Rajmohan C csrajmo...@gmail.com wrote: I am implementing Planner hints in Postgresql to force the optimizer to select a particular plan for a query on request from sql input. I am having trouble in modifying the planner code. I want to create a path node of

Re: [HACKERS] Planner hints in Postgresql

2014-03-17 Thread Atri Sharma
On Mon, Mar 17, 2014 at 9:45 PM, Tom Lane t...@sss.pgh.pa.us wrote: David Johnston pol...@yahoo.com writes: Need to discuss the general why before any meaningful help on the how is going to be considered by hackers. Possibly worth noting is that in past discussions, we've concluded that

Re: [HACKERS] Planner hints in Postgresql

2014-03-17 Thread Atri Sharma
On Mon, Mar 17, 2014 at 10:58 PM, Stephen Frost sfr...@snowman.net wrote: * Atri Sharma (atri.j...@gmail.com) wrote: Isnt using a user given value for selectivity a pretty risky situation as it can horribly screw up the plan selection? Why not allow the user to specify an alternate plan

Re: [HACKERS] Planner hints in Postgresql

2014-03-17 Thread Atri Sharma
The larger question to answer first is whether we want to implement something that is deterministic... How about just dropping the whole concept of hinting and provide a way for someone to say use this plan, or die trying. Maybe require it be used in conjunction with named PREPAREd

Re: [HACKERS] Planner hints in Postgresql

2014-03-17 Thread Atri Sharma
There's lots of ways to implement planner hints, but I fail to see the point in discussing how to implement something we actively don't want. +1. The original poster wanted a way to implement it as a personal project or something ( I think he only replied to me, not the entire list). Planner

Re: [HACKERS] Planner hints in Postgresql

2014-03-17 Thread Atri Sharma
On Mon, Mar 17, 2014 at 10:54 PM, Tom Lane t...@sss.pgh.pa.us wrote: Atri Sharma atri.j...@gmail.com writes: On Mon, Mar 17, 2014 at 9:45 PM, Tom Lane t...@sss.pgh.pa.us wrote: Possibly worth noting is that in past discussions, we've concluded that the most sensible type of hint would

Re: [HACKERS] Planner hints in Postgresql

2014-03-17 Thread Atri Sharma
There's a big difference between saying to the planner, Use plan X vs Here's some information describing the data supporting choosing plan X intelligently. The latter allows for better plans in the face of varied/changing data, integrates with the planner in natural way, and encourages users

Re: [HACKERS] Planner hints in Postgresql

2014-03-17 Thread Atri Sharma
On Mon, Mar 17, 2014 at 11:50 PM, Merlin Moncure mmonc...@gmail.com wrote: On Mon, Mar 17, 2014 at 12:57 PM, Atri Sharma atri.j...@gmail.com wrote: There's a big difference between saying to the planner, Use plan X vs Here's some information describing the data supporting choosing plan X

Re: [HACKERS] Planner hints in Postgresql

2014-03-17 Thread Atri Sharma
On Tue, Mar 18, 2014 at 12:46 AM, Merlin Moncure mmonc...@gmail.com wrote: On Mon, Mar 17, 2014 at 1:45 PM, Pavel Stehule pavel.steh...@gmail.com wrote: I don't believe so SELECTIVITY can work well too. Slow queries are usually related to some strange points in data. I am thinking so well

Re: [HACKERS] Risk Estimation WAS: Planner hints in Postgresql

2014-03-18 Thread Atri Sharma
On Tue, Mar 18, 2014 at 11:43 PM, Josh Berkus j...@agliodbs.com wrote: On Mon, Mar 17, 2014 at 8:47 PM, Tom Lane t...@sss.pgh.pa.us wrote: Yeah. I would like to see the planner's cost estimates extended to include some sort of uncertainty estimate, whereupon risk-averse people could ask

Re: [HACKERS] Planner hints in Postgresql

2014-03-18 Thread Atri Sharma
That's precisely what risk estimation was about. Yeah. I would like to see the planner's cost estimates extended to include some sort of uncertainty estimate, whereupon risk-averse people could ask it to prefer low-uncertainty plans over high-uncertainty ones (the plans we typically

Re: [HACKERS] Risk Estimation WAS: Planner hints in Postgresql

2014-03-20 Thread Atri Sharma
On Thu, Mar 20, 2014 at 8:10 PM, Robert Haas robertmh...@gmail.com wrote: On Tue, Mar 18, 2014 at 2:41 PM, Tom Lane t...@sss.pgh.pa.us wrote: Atri Sharma atri.j...@gmail.com writes: One of the factors that leads to bad estimates is that the histogram of the values of a column maintained

Re: [HACKERS] Risk Estimation WAS: Planner hints in Postgresql

2014-03-20 Thread Atri Sharma
On Thu, Mar 20, 2014 at 8:51 PM, Tom Lane t...@sss.pgh.pa.us wrote: Atri Sharma atri.j...@gmail.com writes: Now, why cannot we take the estimate of all the buckets behind the bucket in which our value is present? Will that estimate not give us the fraction of tuples that are expected

Re: [HACKERS] Optimized out tags

2014-03-20 Thread Atri Sharma
On Fri, Mar 21, 2014 at 9:49 AM, Rajashree Mandaogane rajashree@gmail.com wrote: What can be done to get rid of the 'optimized out' tags while debugging? Did you use the appropriate debugging flags when running ./configure? Regards, Atri -- Regards, Atri *l'apprenant*

Re: [HACKERS] Autonomous Transaction (WIP)

2014-04-07 Thread Atri Sharma
On Mon, Apr 7, 2014 at 3:41 PM, Pavel Stehule pavel.steh...@gmail.comwrote: 2014-04-07 11:59 GMT+02:00 Rajeev rastogi rajeev.rast...@huawei.com: On 07 April 2014 12:12, Pavel Stehule wrote: +1 for feature Thanks -1 for Oracle syntax - it is hardly inconsistent with Postgres We

Re: [HACKERS] Clock sweep not caching enough B-Tree leaf pages?

2014-04-18 Thread Atri Sharma
On Fri, Apr 18, 2014 at 7:27 AM, Peter Geoghegan p...@heroku.com wrote: A way I have in mind about eviction policy is to introduce a way to have an ageing factor in each buffer and take the ageing factor into consideration when evicting a buffer. Consider a case where a table is pretty huge and

Re: [HACKERS] Clock sweep not caching enough B-Tree leaf pages?

2014-04-18 Thread Atri Sharma
On Sat, Apr 19, 2014 at 1:07 AM, Bruce Momjian br...@momjian.us wrote: On Fri, Apr 18, 2014 at 04:46:31PM +0530, Atri Sharma wrote: This can be changed by introducing an ageing factor that sees how much time the current buffer has spend in shared buffers. If the time that the buffer has

Re: [HACKERS] Clock sweep not caching enough B-Tree leaf pages?

2014-04-18 Thread Atri Sharma
Yes, we obviously want a virtual clock. Focusing on the use of gettimeofday seems silly to me: it was something quick for the prototype. The problem with the clocksweeps is they don’t actually track the progression of “time” within the PostgreSQL system. What’s wrong with using a transaction

Re: [HACKERS] Clock sweep not caching enough B-Tree leaf pages?

2014-04-19 Thread Atri Sharma
On Sat, Apr 19, 2014 at 3:37 AM, Bruce Momjian br...@momjian.us wrote: One thing that I discussed with Merlin offline and am now concerned about is how will the actual eviction work. We cannot traverse the entire list and then find all the buffers with refcount 0 and then do another

Re: [HACKERS] Clock sweep not caching enough B-Tree leaf pages?

2014-04-22 Thread Atri Sharma
On Tue, Apr 22, 2014 at 12:59 PM, Albe Laurenz laurenz.a...@wien.gv.atwrote: Jason Petersen wrote: Yes, we obviously want a virtual clock. Focusing on the use of gettimeofday seems silly to me: it was something quick for the prototype. The problem with the clocksweeps is they don’t

Re: [HACKERS] Hashable custom types

2014-04-26 Thread Atri Sharma
The plain UNION code supports either sorting or hashing, but we've not gotten around to supporting a sort-based approach to recursive UNION. I'm not convinced that it's worth doing ... regards, tom lane Without sorting, isnt the scope of a recursive UNION with

Re: [HACKERS] is there a hook by which we can modify input query before postgresql builds raw parse tree

2014-05-01 Thread Atri Sharma
On Fri, May 2, 2014 at 10:07 AM, Rajmohan C csrajmo...@gmail.com wrote: Hi, I want to know is there a way to use a hook to modify the input query before Postgresql parses and builds the parse tree for the query. Uh...the rewriter? -- Regards, Atri *l'apprenant*

Re: [HACKERS] Congrats Andres Freund, the newest PostgreSQL Commiter!

2014-05-22 Thread Atri Sharma
Congrats Andres! On Fri, May 23, 2014 at 7:54 AM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: Hi All, At the Developer Meeting that occurred 21th May 2014 was announced a new PostgreSQL commiter [1], Mr. Andres Freund. I had the opportunity to work and be mentored by him. He

Re: [HACKERS] IMPORT FOREIGN SCHEMA statement

2014-06-16 Thread Atri Sharma
On Mon, Jun 16, 2014 at 11:28 AM, Michael Paquier michael.paqu...@gmail.com wrote: On Mon, May 26, 2014 at 6:23 AM, Ronan Dunklau ronan.dunk...@dalibo.com wrote: Le dimanche 25 mai 2014 12:41:18 David Fetter a écrit : On Fri, May 23, 2014 at 10:08:06PM +0200, Ronan Dunklau wrote: Hello,

Re: [HACKERS] bad estimation together with large work_mem generates terrible slow hash joins

2014-07-03 Thread Atri Sharma
On Tue, Jul 1, 2014 at 4:54 AM, Tomas Vondra t...@fuzzy.cz wrote: On 30.6.2014 23:12, Tomas Vondra wrote: Hi, attached is v5 of the patch. The main change is that scaling the number of buckets is done only once, after the initial hash table is build. The main advantage of this is lower

Re: [HACKERS] tweaking NTUP_PER_BUCKET

2014-07-03 Thread Atri Sharma
On Thu, Jul 3, 2014 at 11:40 PM, Stephen Frost sfr...@snowman.net wrote: Tomas, * Tomas Vondra (t...@fuzzy.cz) wrote: However it's likely there are queries where this may not be the case, i.e. where rebuilding the hash table is not worth it. Let me know if you can construct such query (I

Re: [HACKERS] how to skip building certain paths in path tree

2014-07-21 Thread Atri Sharma
On Tue, Jul 22, 2014 at 10:53 AM, Rajmohan C csrajmo...@gmail.com wrote: How do I modify PostgreSQL 9.3 source to skip certain join combinations (skip building certain paths in path tree) by checking some condition have a look at joinpaths.c

Re: [HACKERS] Shared Data Structure b/w clients

2014-07-22 Thread Atri Sharma
On Tuesday, July 22, 2014, Rohit Goyal rhtgyl...@gmail.com wrote: Hi All, I am working on postgresql code and having some problem. :) I need to create shared data structure, so that different client and connection can update and share the state of those data structures in memory. I planned

Re: [HACKERS] 9.5: Memory-bounded HashAgg

2014-08-14 Thread Atri Sharma
On Thursday, August 14, 2014, Jeff Davis pg...@j-davis.com wrote: On Thu, 2014-08-14 at 10:06 -0400, Tom Lane wrote: If you're following the HashJoin model, then what you do is the same thing it does: you write the input tuple back out to the pending batch file for the hash partition that

Re: [HACKERS] 9.5: Memory-bounded HashAgg

2014-08-14 Thread Atri Sharma
On Thu, Aug 14, 2014 at 10:21 PM, Tomas Vondra t...@fuzzy.cz wrote: On 14 Srpen 2014, 18:02, Atri Sharma wrote: On Thursday, August 14, 2014, Jeff Davis pg...@j-davis.com wrote: On Thu, 2014-08-14 at 10:06 -0400, Tom Lane wrote: If you're following the HashJoin model, then what you do

Re: [HACKERS] COPY and heap_sync

2014-08-30 Thread Atri Sharma
On Saturday, August 30, 2014, Amit Kapila amit.kapil...@gmail.com wrote: On Sat, Aug 30, 2014 at 11:56 AM, Jeff Janes jeff.ja...@gmail.com javascript:_e(%7B%7D,'cvml','jeff.ja...@gmail.com'); wrote: If you insert tuples with COPY into a table created or truncated in the same transaction,

Re: [HACKERS] Final Patch for GROUPING SETS - unrecognized node type: 347

2014-08-31 Thread Atri Sharma
On Sun, Aug 31, 2014 at 9:07 PM, Erik Rijkers e...@xs4all.nl wrote: On Tue, August 26, 2014 14:24, Andrew Gierth wrote: Erik == Erik Rijkers e...@xs4all.nl writes: They apply cleanly for me at 2bde297 whether with git apply or patch, except for the contrib one (which you don't need

Re: [HACKERS] Final Patch for GROUPING SETS - unrecognized node type: 347

2014-08-31 Thread Atri Sharma
On Sunday, August 31, 2014, Andres Freund and...@2ndquadrant.com wrote: On 2014-08-31 21:09:59 +0530, Atri Sharma wrote: On Sun, Aug 31, 2014 at 9:07 PM, Erik Rijkers e...@xs4all.nl javascript:; wrote: I have found that the unrecognized node type error is caused by: It's a warning

Re: [HACKERS] Join push-down support for foreign tables

2014-09-04 Thread Atri Sharma
On Thursday, September 4, 2014, Bruce Momjian br...@momjian.us wrote: On Thu, Sep 4, 2014 at 08:37:08AM -0400, Robert Haas wrote: The main problem I see here is that accurate costing may require a round-trip to the remote server. If there is only one path that is probably OK; the cost of

Re: [HACKERS] Join push-down support for foreign tables

2014-09-04 Thread Atri Sharma
On Thu, Sep 4, 2014 at 9:26 PM, Bruce Momjian br...@momjian.us wrote: On Thu, Sep 4, 2014 at 08:41:43PM +0530, Atri Sharma wrote: On Thursday, September 4, 2014, Bruce Momjian br...@momjian.us wrote: On Thu, Sep 4, 2014 at 08:37:08AM -0400, Robert Haas wrote: The main

Re: [HACKERS] Join push-down support for foreign tables

2014-09-04 Thread Atri Sharma
On Thu, Sep 4, 2014 at 9:33 PM, Bruce Momjian br...@momjian.us wrote: On Thu, Sep 4, 2014 at 09:31:20PM +0530, Atri Sharma wrote: I am thinking we would eventually have to cache the statistics, then get some kind of invalidation message from the foreign server. I am also

Re: [HACKERS] Join push-down support for foreign tables

2014-09-05 Thread Atri Sharma
On Fri, Sep 5, 2014 at 2:20 AM, Robert Haas robertmh...@gmail.com wrote: On Thu, Sep 4, 2014 at 11:56 AM, Bruce Momjian br...@momjian.us wrote: I am thinking eventually we will need to cache the foreign server statistics on the local server. Wouldn't that lead to issues where the

Re: [HACKERS] Postgres code for a query intermediate dataset

2014-09-13 Thread Atri Sharma
On Sat, Sep 13, 2014 at 11:06 PM, Rohit Goyal rhtgyl...@gmail.com wrote: Hi All, I want to work on the code of intermediate dataset of select and update query. For example. Rohit's salary has been updated 4 times, so it has 4 different version of salary. I want to select salary of

Re: [HACKERS] Postgres code for a query intermediate dataset

2014-09-13 Thread Atri Sharma
On Sat, Sep 13, 2014 at 11:52 PM, David G Johnston david.g.johns...@gmail.com wrote: Atri Sharma wrote On Sat, Sep 13, 2014 at 11:06 PM, Rohit Goyal lt; Or rather even if you want to be able to reference the older versions of that record there is nothing in PostgreSQL to facilitate

Re: [HACKERS] Postgres code for a query intermediate dataset

2014-09-14 Thread Atri Sharma
On Sunday, September 14, 2014, Mark Kirkwood mark.kirkw...@catalyst.net.nz wrote: On 14/09/14 05:36, Rohit Goyal wrote: Hi All, I want to work on the code of intermediate dataset of select and update query. For example. Rohit's salary has been updated 4 times, so it has 4 different

Re: [HACKERS] Postgres code for a query intermediate dataset

2014-09-14 Thread Atri Sharma
On Sun, Sep 14, 2014 at 1:30 PM, Mark Kirkwood mark.kirkw...@catalyst.net.nz wrote: On 14/09/14 19:25, Atri Sharma wrote: On Sunday, September 14, 2014, Mark Kirkwood mark.kirkw...@catalyst.net.nz mailto:mark.kirkw...@catalyst.net.nz wrote: On 14/09/14 05:36, Rohit Goyal wrote

Re: [HACKERS] Postgres code for a query intermediate dataset

2014-09-14 Thread Atri Sharma
On Sun, Sep 14, 2014 at 1:30 PM, Mark Kirkwood mark.kirkw...@catalyst.net.nz wrote: On 14/09/14 19:25, Atri Sharma wrote: On Sunday, September 14, 2014, Mark Kirkwood mark.kirkw...@catalyst.net.nz mailto:mark.kirkw...@catalyst.net.nz wrote: On 14/09/14 05:36, Rohit Goyal wrote

[HACKERS] Support UPDATE table SET(*)=...

2014-10-15 Thread Atri Sharma
Hi All, Please find attached a patch which implements support for UPDATE table1 SET(*)=... The patch supports both UPDATE table SET(*)=(a,b,c) and UPDATE table1 SET(*)=(SELECT a,b,c FROM...). It solves the problem of doing UPDATE from a record variable of the same type as the table e.g. update

Re: [HACKERS] Support UPDATE table SET(*)=...

2014-10-15 Thread Atri Sharma
On Wednesday, October 15, 2014, Marti Raudsepp ma...@juffo.org wrote: Hi On Wed, Oct 15, 2014 at 11:02 AM, Atri Sharma atri.j...@gmail.com javascript:; wrote: Please find attached a patch which implements support for UPDATE table1 SET(*)=... I presume you haven't read Tom Lane's

Re: [HACKERS] Support UPDATE table SET(*)=...

2014-10-15 Thread Atri Sharma
On Wed, Oct 15, 2014 at 2:18 PM, Atri Sharma atri.j...@gmail.com wrote: On Wednesday, October 15, 2014, Marti Raudsepp ma...@juffo.org wrote: Hi On Wed, Oct 15, 2014 at 11:02 AM, Atri Sharma atri.j...@gmail.com wrote: Please find attached a patch which implements support for UPDATE

Re: [HACKERS] Support UPDATE table SET(*)=...

2014-10-17 Thread Atri Sharma
On Fri, Oct 17, 2014 at 7:45 PM, Merlin Moncure mmonc...@gmail.com wrote: On Wed, Oct 15, 2014 at 3:48 AM, Atri Sharma atri.j...@gmail.com wrote: On Wednesday, October 15, 2014, Marti Raudsepp ma...@juffo.org wrote: Hi On Wed, Oct 15, 2014 at 11:02 AM, Atri Sharma atri.j

<    1   2   3   4   >