Re: [HACKERS] Need a mentor, and a project.

2009-12-16 Thread Gurjeet Singh
2009/12/16 decibel deci...@decibel.org On Dec 11, 2009, at 8:44 PM, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Ashish wrote: I am thinking about starting with the following TODO item: -- Have EXPLAIN ANALYZE issue NOTICE messages when the estimated and actual row counts

Re: [HACKERS] Hot Standby and prepared transactions

2009-12-16 Thread Simon Riggs
On Wed, 2009-12-16 at 09:10 +0200, Heikki Linnakangas wrote: Simon Riggs wrote: Investigating how that could come about, it looks like there is some fairly strange stuff going on here. StandbyRecoverPreparedTransactions() is never called at all. I told you so:

Re: [HACKERS] Hot Standby and prepared transactions

2009-12-16 Thread Hiroyuki Yamada
That fixes or explains all known issues, from me. Are there any other things you know about that I haven't responded to? Do you think we have addressed every issue, except deferred items? I will be looking to commit to CVS later today; waiting on any objections. Is following problem reported

Re: [HACKERS] Hot Standby and prepared transactions

2009-12-16 Thread Simon Riggs
On Wed, 2009-12-16 at 18:08 +0900, Hiroyuki Yamada wrote: That fixes or explains all known issues, from me. Are there any other things you know about that I haven't responded to? Do you think we have addressed every issue, except deferred items? I will be looking to commit to CVS later

Re: [HACKERS] Range types

2009-12-16 Thread Dimitri Fontaine
Tom Lane t...@sss.pgh.pa.us writes: foreach p2_member in unnest(p2) loop p1 := array(select period_except(p1_member, p2_member) from unnest(p1) p1_member); end loop; But maybe it can be done in a single SQL command. Yeah, as soon as you have LATERAL,

Re: [HACKERS] Update on true serializable techniques in MVCC

2009-12-16 Thread Albe Laurenz
Kevin Grittner wrote: Just to make those who care aware of it, here is Michael Cahill's Doctoral Thesis based on implementing Serializable Snapshot Isolation in InnoDB using a refined version of the techniques previously used in the Berkley DB (and previously discussed on this list):

Re: [HACKERS] Streaming replication and non-blocking I/O

2009-12-16 Thread Heikki Linnakangas
Fujii Masao wrote: On Tue, Dec 15, 2009 at 3:47 AM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: Tom Lane wrote: The very, very large practical problem with this is that if you decide to change the behavior at any time, the only way to be sure that the WAL receiver is using

Re: [HACKERS] ECPG patch N+1, fix auto-prepare

2009-12-16 Thread Michael Meskes
OK, here's another approach. output_statement()'s interface is kept as the original, and not this function decides which I still think this could be solved more easily. value it uses. I also introduced static char *ecpg_statement_type_name[] for the textual names of the ECPGst_* symbols

Re: [HACKERS] Streaming replication and non-blocking I/O

2009-12-16 Thread Greg Stark
I'm interested in abstracting out features of replication from libpq too. It would be nice if we could implement different communication bus modules. For example if you have dozens of replicas you may want to use something like spread to distribute the records using multicast. Sorry for top

Re: [HACKERS] An example of bugs for Hot Standby

2009-12-16 Thread Simon Riggs
On Tue, 2009-12-15 at 20:25 +0900, Hiroyuki Yamada wrote: Hot Standby node can freeze when startup process calls LockBufferForCleanup(). This bug can be reproduced by the following procedure. Interesting. Looks like this can happen, which is a shame cos I just removed the wait checking code

Re: [HACKERS] Hot Standby and prepared transactions

2009-12-16 Thread Hiroyuki Yamada
On Wed, 2009-12-16 at 18:08 +0900, Hiroyuki Yamada wrote: That fixes or explains all known issues, from me. Are there any other things you know about that I haven't responded to? Do you think we have addressed every issue, except deferred items? I will be looking to commit to CVS later

Re: [HACKERS] Update on true serializable techniques in MVCC

2009-12-16 Thread Nicolas Barbier
2009/12/16 Albe Laurenz laurenz.a...@wien.gv.at: Quote:   The problem [of phantom reads] was identified in (Eswaran et al., 1976),   but the general purpose predicate locking solution suggested there   has not been widely adopted because of the difficulty in testing mutual   satisfiability

Re: [HACKERS] Update on true serializable techniques in MVCC

2009-12-16 Thread Florian Weimer
* Albe Laurenz: That sounds like it should actually work. If you have got an index, yes. It seems to me that it would make locking behavior dependent on your query plan, too. BTW, PostgreSQL could raise a different error when a unique constraint violation is detected which involves a row

Re: [HACKERS] ECPG patch N+1, fix auto-prepare

2009-12-16 Thread Boszormenyi Zoltan
Michael Meskes írta: OK, here's another approach. output_statement()'s interface is kept as the original, and not this function decides which I still think this could be solved more easily. Thanks very much for committing it. But I don't understand your change. My code was:

Re: [HACKERS] Hot Standby and prepared transactions

2009-12-16 Thread Heikki Linnakangas
Hiroyuki Yamada wrote: By the way, reading LogStandbySnapshot() and GetRunningTransactionLocks() raised following questions. * There is a window beween gathering lock information in GetRunningTransactionLocks() and writing WAL in LogAccessExclusiveLocks(). * In current lock redo

Re: [HACKERS] Update on true serializable techniques in MVCC

2009-12-16 Thread Albe Laurenz
Nicolas Barbier wrote: Quote: [...] That sounds like it should actually work. That boils down to 2PL, using a granularity that is somewhere between table locks and single-row locks (note that the latter doesn't correctly enforce serializability, hence something more coarse which also

Re: [HACKERS] ECPG patch N+1, fix auto-prepare

2009-12-16 Thread Michael Meskes
On Wed, Dec 16, 2009 at 11:54:41AM +0100, Boszormenyi Zoltan wrote: Your code in ecpg.addons calls output_statement() unconditionally with ECPGst_prepnormal and output_statement() decides what to do with the auto_prepare global variable. Your code doesn't seem more readable than mine, but

Re: [HACKERS] Hot Standby and prepared transactions

2009-12-16 Thread Simon Riggs
On Wed, 2009-12-16 at 19:35 +0900, Hiroyuki Yamada wrote: Sorry for annoying you. Not at all! Good to get fresh eyes on this. -- Simon Riggs www.2ndQuadrant.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] Hot Standby and prepared transactions

2009-12-16 Thread Simon Riggs
On Wed, 2009-12-16 at 19:35 +0900, Hiroyuki Yamada wrote: * There is a window beween gathering lock information in GetRunningTransactionLocks() and writing WAL in LogAccessExclusiveLocks(). * In current lock redo algorithm, locks are released when the transaction holding the lock

Re: [HACKERS] Range types

2009-12-16 Thread tomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, Dec 15, 2009 at 04:16:28PM +0100, Nicolas Barbier wrote: [...] whatever and same whatever as before + the character with the lowest value in lexicographical ordering. I don't think it is possible to get anything in between those

Re: [HACKERS] Range types

2009-12-16 Thread tomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, Dec 15, 2009 at 11:49:19AM -0800, David Fetter wrote: On Tue, Dec 15, 2009 at 11:31:05AM -0800, Scott Bailey wrote: Jeff Davis wrote: On Tue, 2009-12-15 at 10:19 -0500, Tom Lane wrote: Would it be OK if we handled float timestamp

Re: [HACKERS] An example of bugs for Hot Standby

2009-12-16 Thread Simon Riggs
On Wed, 2009-12-16 at 10:33 +, Simon Riggs wrote: On Tue, 2009-12-15 at 20:25 +0900, Hiroyuki Yamada wrote: Hot Standby node can freeze when startup process calls LockBufferForCleanup(). This bug can be reproduced by the following procedure. Interesting. Looks like this can happen,

Re: [HACKERS] Patch: Remove gcc dependency in definition of inline functions

2009-12-16 Thread Marko Kreen
On 12/16/09, Kurt Harriman harri...@acm.org wrote: [Please ignore the previous incomplete version of this reply, which I sent by mistake. Sorry for the list noise.] On 12/15/2009 2:09 PM, Marko Kreen wrote: Oh. Ok then. Force-inline seems better fix as we may want to use it for

Re: [HACKERS] Patch: Remove gcc dependency in definition of inline functions

2009-12-16 Thread Marko Kreen
On 12/16/09, Robert Haas robertmh...@gmail.com wrote: On Tue, Dec 15, 2009 at 10:34 PM, Kurt Harriman harri...@acm.org wrote: Your worry ii) can be ignored, managing to compile on such compilers is already overachievement. I think so too. With your opinion added to mine, do we

Re: [HACKERS] idea - new aggregates median, listagg

2009-12-16 Thread Robert Haas
On Wed, Dec 16, 2009 at 1:36 AM, Pavel Stehule pavel.steh...@gmail.com wrote: b) function listagg (it is analogy of group_concat from MySQL) - it should simplify report generating and some other This is redundant, as it's equivalent to array_to_string(array_agg()). when I implement it in

Re: [HACKERS] Patch: Remove gcc dependency in definition of inline functions

2009-12-16 Thread Tom Lane
Marko Kreen mark...@gmail.com writes: On 12/16/09, Kurt Harriman harri...@acm.org wrote: For gcc, I think the __attribute__ has to come after the function's parameter list, rather than before the return type. No. [ squint... ] That's nowhere documented that I can find: all the examples in

Re: [HACKERS] Range types

2009-12-16 Thread Tom Lane
Dimitri Fontaine dfonta...@hi-media.com writes: Tom Lane t...@sss.pgh.pa.us writes: foreach p2_member in unnest(p2) loop p1 := array(select period_except(p1_member, p2_member) from unnest(p1) p1_member); end loop; But maybe it can be done in

Re: [HACKERS] Patch: Remove gcc dependency in definition of inline functions

2009-12-16 Thread Robert Haas
On Wed, Dec 16, 2009 at 9:30 AM, Marko Kreen mark...@gmail.com wrote: On 12/16/09, Robert Haas robertmh...@gmail.com wrote: On Tue, Dec 15, 2009 at 10:34 PM, Kurt Harriman harri...@acm.org wrote:   Your worry ii) can be ignored, managing to compile on such   compilers is already

Re: [HACKERS] Fast or immediate shutdown

2009-12-16 Thread Peter Eisentraut
On tis, 2009-12-15 at 17:19 +, Simon Riggs wrote: running with log_checkpoints = on pg_ctl -D foo -m fast stop log says LOG: received fast shutdown request LOG: aborting any active transactions LOG: shutting down LOG: restartpoint starting: shutdown immediate Some of us

Re: [HACKERS] Patch: Remove gcc dependency in definition of inline functions

2009-12-16 Thread Tom Lane
Marko Kreen mark...@gmail.com writes: Hypothetical old, crappy compilers would still work, only AC_C_INLINE would turn static inline into plain static, so hypothetically they would get some warnings about unused functions. As this is all hypothetical, I don't see why that should stop us

Re: [HACKERS] idea - new aggregates median, listagg

2009-12-16 Thread Kevin Grittner
Pavel Stehule pavel.steh...@gmail.com wrote: 2009/12/15 David Fetter da...@fetter.org: http://www.simple-talk.com/sql/t-sql-programming/median-workbench/ In this article the are two medians - statistical and financial. I am for both. But only one can be named median. Well, since the

Re: [HACKERS] Patch: Remove gcc dependency in definition of inline functions

2009-12-16 Thread Marko Kreen
On 12/16/09, Tom Lane t...@sss.pgh.pa.us wrote: Marko Kreen mark...@gmail.com writes: On 12/16/09, Kurt Harriman harri...@acm.org wrote: For gcc, I think the __attribute__ has to come after the function's parameter list, rather than before the return type. No. [ squint... ]

Re: [HACKERS] Update on true serializable techniques in MVCC

2009-12-16 Thread Robert Haas
On Wed, Dec 16, 2009 at 4:52 AM, Albe Laurenz laurenz.a...@wien.gv.at wrote: Kevin Grittner wrote: Just to make those who care aware of it, here is Michael Cahill's Doctoral Thesis based on implementing Serializable Snapshot Isolation in InnoDB using a refined version of the techniques

Re: [HACKERS] idea - new aggregates median, listagg

2009-12-16 Thread Thom Brown
2009/12/15 Pavel Stehule pavel.steh...@gmail.com Hello I am looking on new feature - ORDER clause in aggregate, and I thing, so we are able to effectively implement some non standard, but well known aggregates. a) function median - it is relative frequent request - with usually slow

Re: [HACKERS] Update on true serializable techniques in MVCC

2009-12-16 Thread Andres Freund
Moin, On Wednesday 16 December 2009 16:24:42 Robert Haas wrote: Inserts and deletes follow the same protocol, obtaining an exclusive lock on the row after the one being inserted or deleted. The result of this locking protocol is that a range scan prevents concurrent inserts or

Re: [HACKERS] Update on true serializable techniques in MVCC

2009-12-16 Thread Robert Haas
On Wed, Dec 16, 2009 at 10:29 AM, Andres Freund and...@anarazel.de wrote: On Wednesday 16 December 2009 16:24:42 Robert Haas wrote:   Inserts and deletes follow the same protocol, obtaining an exclusive   lock on the row after the one being inserted or deleted. The result   of this locking

Re: [HACKERS] Patch: Remove gcc dependency in definition of inline functions

2009-12-16 Thread Marko Kreen
On 12/16/09, Tom Lane t...@sss.pgh.pa.us wrote: Marko Kreen mark...@gmail.com writes: Hypothetical old, crappy compilers would still work, only AC_C_INLINE would turn static inline into plain static, so hypothetically they would get some warnings about unused functions. As this is

Re: [HACKERS] Update on true serializable techniques in MVCC

2009-12-16 Thread Kevin Grittner
Albe Laurenz laurenz.a...@wien.gv.at wrote: Although it may have seemed that I was out to shoot the idea down, I am interested in the topic. I guess my way of understanding something is trying to find holes in it... No problem. That's how ideas are explored and improved. The brick wall

Re: [HACKERS] Update on true serializable techniques in MVCC

2009-12-16 Thread Kevin Grittner
Nicolas Barbier nicolas.barb...@gmail.com wrote: I am not sure whether the serialization failures that it may cause are dependent on the plan used. They are. -Kevin -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] idea - new aggregates median, listagg

2009-12-16 Thread Pavel Stehule
2009/12/16 Thom Brown thombr...@gmail.com: 2009/12/15 Pavel Stehule pavel.steh...@gmail.com Hello I am looking on new feature - ORDER clause in aggregate, and I thing, so we are able to effectively implement some non standard, but well known aggregates. a) function median - it is relative

Re: [HACKERS] Fast or immediate shutdown

2009-12-16 Thread Simon Riggs
On Wed, 2009-12-16 at 17:04 +0200, Peter Eisentraut wrote: On tis, 2009-12-15 at 17:19 +, Simon Riggs wrote: running with log_checkpoints = on pg_ctl -D foo -m fast stop log says LOG: received fast shutdown request LOG: aborting any active transactions LOG: shutting

[HACKERS] PostgreSQL project policy compendium

2009-12-16 Thread Kurt Harriman
On 12/16/2009 7:10 AM, Tom Lane wrote: the project policy is to not require any compiler features not found in C89. Is there somewhere a compendium of such policies which fledgling hackers should consult to avoid embarrassment? Regards, ... kurt -- Sent via pgsql-hackers mailing list

Re: [HACKERS] [ADMIN] recovery is stuck when children are not processing SIGQUIT from previous crash

2009-12-16 Thread Peter Eisentraut
Here is a set of patches to address this issue. The first one is a small refactoring of the signal setting portability business. The second one fixes the SIGQUIT handler inadvertently unblocking SIGQUIT within itself. The third one installs an alarm so that if the ereport() call in quickdie()

Re: [HACKERS] Patch: Remove gcc dependency in definition of inline functions

2009-12-16 Thread Tom Lane
Marko Kreen mark...@gmail.com writes: So the plain-C89 compilers would be downgraded to second-class targets, not worth getting max performance out of them. Hm? Failing to inline is already a performance hit, which is why Kurt got interested in this in the first place. I think you're way

Re: [HACKERS] PostgreSQL project policy compendium

2009-12-16 Thread Peter Eisentraut
On ons, 2009-12-16 at 07:44 -0800, Kurt Harriman wrote: On 12/16/2009 7:10 AM, Tom Lane wrote: the project policy is to not require any compiler features not found in C89. Is there somewhere a compendium of such policies which fledgling hackers should consult to avoid embarrassment?

Re: [HACKERS] PostgreSQL project policy compendium

2009-12-16 Thread Robert Haas
On Wed, Dec 16, 2009 at 10:44 AM, Kurt Harriman harri...@acm.org wrote: On 12/16/2009 7:10 AM, Tom Lane wrote: the project policy is to not require any compiler features not found in C89. Is there somewhere a compendium of such policies which fledgling hackers should consult to avoid

Re: [HACKERS] [ADMIN] recovery is stuck when children are not processing SIGQUIT from previous crash

2009-12-16 Thread Alvaro Herrera
Peter Eisentraut escribió: Here is a set of patches to address this issue. The first one is a small refactoring of the signal setting portability business. This one looks like should be applied immediately to get some buildfarm coverage (and alpha3) -- Alvaro Herrera

Re: [HACKERS] PostgreSQL project policy compendium

2009-12-16 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Wed, Dec 16, 2009 at 10:44 AM, Kurt Harriman harri...@acm.org wrote: Is there somewhere a compendium of such policies which fledgling hackers should consult to avoid embarrassment? I do think your basic point is well-taken, though. There are a lot

Re: [HACKERS] Patch: Remove gcc dependency in definition of inline functions

2009-12-16 Thread Alvaro Herrera
Tom Lane escribió: I think you're way overthinking this. Where we started was just a proposal to try to expand the set of inline-ing compilers beyond gcc only. I don't see why we need to do anything but that. The code is fine as-is except for the control #ifdefs. IIRC Kurt was also on

Re: [HACKERS] idea - new aggregates median, listagg

2009-12-16 Thread Scott Bailey
Thom Brown wrote: 2009/12/15 Pavel Stehule pavel.steh...@gmail.com mailto:pavel.steh...@gmail.com Hello I am looking on new feature - ORDER clause in aggregate, and I thing, so we are able to effectively implement some non standard, but well known aggregates. a) function

Re: [HACKERS] Patch: Remove gcc dependency in definition of inline functions

2009-12-16 Thread Tom Lane
Marko Kreen mark...@gmail.com writes: On 12/15/09, Kurt Harriman harri...@acm.org wrote: Attached is a revised patch, offered for the 2010-01 commitfest. It's also available in my git repository in the submitted branch:

Re: [HACKERS] Patch: Remove gcc dependency in definition of inline functions

2009-12-16 Thread Marko Kreen
On 12/16/09, Tom Lane t...@sss.pgh.pa.us wrote: Marko Kreen mark...@gmail.com writes: So the plain-C89 compilers would be downgraded to second-class targets, not worth getting max performance out of them. Hm? Failing to inline is already a performance hit, which is why Kurt got

Re: [HACKERS] [ADMIN] recovery is stuck when children are not processing SIGQUIT from previous crash

2009-12-16 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: Here is a set of patches to address this issue. The first one is a small refactoring of the signal setting portability business. OK The second one fixes the SIGQUIT handler inadvertently unblocking SIGQUIT within itself. OK The third one installs

Re: [HACKERS] Patch: Remove gcc dependency in definition of inline functions

2009-12-16 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: Tom Lane escribió: I think you're way overthinking this. Where we started was just a proposal to try to expand the set of inline-ing compilers beyond gcc only. I don't see why we need to do anything but that. The code is fine as-is except

Re: [HACKERS] PostgreSQL project policy compendium

2009-12-16 Thread Greg Smith
Kurt Harriman wrote: On 12/16/2009 7:10 AM, Tom Lane wrote: the project policy is to not require any compiler features not found in C89. Is there somewhere a compendium of such policies which fledgling hackers should consult to avoid embarrassment? The list of suggestions at

Re: [HACKERS] Range types

2009-12-16 Thread Jeff Davis
On Sun, 2009-12-13 at 23:49 -0800, Scott Bailey wrote: So basically I have an anyrange pseudo type with the functions prev, next, last, etc defined. So instead of hard coding range types, we would allow the user to define their own range types. Basically if we are able to determine the

Re: [HACKERS] Range types

2009-12-16 Thread Robert Haas
On Wed, Dec 16, 2009 at 12:31 PM, Jeff Davis pg...@j-davis.com wrote: There's one problem, and that's for timestamptz ranges with intervals that include days and months. Timezone adjustments are just not well-defined for that kind of granule (nor would it be particularly useful even if it

Re: [HACKERS] Range types

2009-12-16 Thread Tom Lane
Jeff Davis pg...@j-davis.com writes: [ hacky special-case representation for discrete timestamp ranges ] I'm still not exactly clear on what the use-case is for discrete timestamp ranges, and I wonder how many people are going to be happy with a representation that can't handle a range that's

Re: [HACKERS] Range types

2009-12-16 Thread Scott Bailey
Jeff Davis wrote: On Sun, 2009-12-13 at 23:49 -0800, Scott Bailey wrote: So basically I have an anyrange pseudo type with the functions prev, next, last, etc defined. So instead of hard coding range types, we would allow the user to define their own range types. Basically if we are able to

Re: [HACKERS] Update on true serializable techniques in MVCC

2009-12-16 Thread Alvaro Herrera
Robert Haas escribió: On Wed, Dec 16, 2009 at 10:29 AM, Andres Freund and...@anarazel.de wrote: On Wednesday 16 December 2009 16:24:42 Robert Haas wrote:   Inserts and deletes follow the same protocol, obtaining an exclusive   lock on the row after the one being inserted or deleted. The

Re: [HACKERS] Range types

2009-12-16 Thread Scott Bailey
Tom Lane wrote: Jeff Davis pg...@j-davis.com writes: [ hacky special-case representation for discrete timestamp ranges ] I'm still not exactly clear on what the use-case is for discrete timestamp ranges, and I wonder how many people are going to be happy with a representation that can't

Re: [HACKERS] Update on true serializable techniques in MVCC

2009-12-16 Thread Robert Haas
On Wed, Dec 16, 2009 at 1:14 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: Robert Haas escribió: On Wed, Dec 16, 2009 at 10:29 AM, Andres Freund and...@anarazel.de wrote: On Wednesday 16 December 2009 16:24:42 Robert Haas wrote:   Inserts and deletes follow the same protocol,

Re: [HACKERS] Update on true serializable techniques in MVCC

2009-12-16 Thread Robert Haas
On Wed, Dec 16, 2009 at 1:25 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Dec 16, 2009 at 1:14 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: Robert Haas escribió: On Wed, Dec 16, 2009 at 10:29 AM, Andres Freund and...@anarazel.de wrote: On Wednesday 16 December 2009 16:24:42

Re: [HACKERS] Update on true serializable techniques in MVCC

2009-12-16 Thread Boszormenyi Zoltan
Robert Haas írta: On Wed, Dec 16, 2009 at 1:25 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Dec 16, 2009 at 1:14 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: Robert Haas escribió: On Wed, Dec 16, 2009 at 10:29 AM, Andres Freund and...@anarazel.de wrote:

Re: [HACKERS] Update on true serializable techniques in MVCC

2009-12-16 Thread Kevin Grittner
Alvaro Herrera alvhe...@commandprompt.com wrote: So you'd have to disable HOT updates when true serializability was active? I wouldn't think so; but someone familiar with HOT logic could probably determine whether the unmodified algorithm could be used by reviewing the simplifying

Re: [HACKERS] Range types

2009-12-16 Thread Scott Bailey
Ok, silly question here. But how do you determine the length of a continuous range? By definition length of [a, b) and (a, b] = b-a. But what about (a,b) and [a,b]? Are we saying that because they are continuous, the difference between values included in the range and those excluded are so

Re: [HACKERS] Range types

2009-12-16 Thread Tom Lane
Scott Bailey arta...@comcast.net writes: As I pointed out off-list, I think the granularity for timestamp range should be limited to hours and smaller. Anything larger is asking for trouble. And quite honestly if they wanted day granularity, they should use date range. I'm still not real

Re: [HACKERS] XLogInsert

2009-12-16 Thread Gurjeet Singh
2009/12/15 Greg Smith g...@2ndquadrant.com Jaime Casanova wrote: So in this extreme case avg tps is just 6 transactions better Great job trying to find the spot where the code worked better. I'm not so sure I trust pgbench results where the TPS was so low though. Which leads us right

Re: [HACKERS] XLogInsert

2009-12-16 Thread Andres Freund
On Wednesday 16 December 2009 20:07:07 Gurjeet Singh wrote: 2009/12/15 Greg Smith g...@2ndquadrant.com Jaime Casanova wrote: So in this extreme case avg tps is just 6 transactions better Great job trying to find the spot where the code worked better. I'm not so sure I trust pgbench

Re: [HACKERS] Range types

2009-12-16 Thread Jeff Davis
On Wed, 2009-12-16 at 12:42 -0500, Robert Haas wrote: On Wed, Dec 16, 2009 at 12:31 PM, Jeff Davis pg...@j-davis.com wrote: There's one problem, and that's for timestamptz ranges with intervals that include days and months. Timezone adjustments are just not well-defined for that kind of

[HACKERS] PATCH: Add hstore_to_json()

2009-12-16 Thread David E. Wheeler
I just realized that this was easy to do, and despite my complete lack of C skillz was able to throw this together in a couple of hours. It might be handy to some, though the possible downsides are: * No json_to_hstore(). * Leads to requests for hstore_to_yaml(), hstore_to_xml(), etc. * Andrew

[HACKERS] pinging Dano

2009-12-16 Thread Markus Wanner
Hi, who is the main editor named Dano of the wiki page about Parallel Query Execution (http://wiki.postgresql.org/wiki/Parallel_Query_Execution), please speak up. Is there any code or patch available ATM? What discussion with Tom and Simon is that page referring to? Regards Markus Wanner

Re: [HACKERS] Range types

2009-12-16 Thread Jeff Davis
On Wed, 2009-12-16 at 12:50 -0500, Tom Lane wrote: I'm still not exactly clear on what the use-case is for discrete timestamp ranges, and I wonder how many people are going to be happy with a representation that can't handle a range that's open-ended on the left. Huh? We're miscommunicating

[HACKERS] PATCH: Spurious 22 in hstore.sgml

2009-12-16 Thread David E. Wheeler
*** a/doc/src/sgml/hstore.sgml --- b/doc/src/sgml/hstore.sgml *** *** 278,284 entryget typehstore/'s keys as a set/entry entryliteralskeys('a=gt;1,b=gt;2')/literal/entry entry ! 22programlisting a b /programlisting/entry --- 278,284

Re: [HACKERS] Patch: Remove gcc dependency in definition of inline functions

2009-12-16 Thread Peter Eisentraut
On ons, 2009-12-16 at 10:49 -0500, Tom Lane wrote: Marko Kreen mark...@gmail.com writes: So the plain-C89 compilers would be downgraded to second-class targets, not worth getting max performance out of them. Hm? Failing to inline is already a performance hit, which is why Kurt got

Re: [HACKERS] PATCH: Spurious 22 in hstore.sgml

2009-12-16 Thread Magnus Hagander
On Wed, Dec 16, 2009 at 20:34, David E. Wheeler da...@kineticode.com wrote: *** a/doc/src/sgml/hstore.sgml --- b/doc/src/sgml/hstore.sgml Heh, interesting. That clearly shouldn't be there. Applied. -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/ --

Re: [HACKERS] Range types

2009-12-16 Thread Alvaro Herrera
to...@tuxteam.de wrote: (and as Andrew Dunstan pointed out off-list: I was wrong with my bold assertion that one can squeeze infinitely many (arbitrary length) strings between two given. This is not always the case). Of course you can do that if you assume lexicographical order, or any other

[HACKERS] Does verbose Need to be Reserved?

2009-12-16 Thread David E. Wheeler
Hey All, I was just getting a new version of pgTAP ready for release, and while testing it on HEAD, I got this error: + psql:pgtap.sql:5789: ERROR: syntax error at end of input + LINE 28: IF verbose THEN RETURN NEXT diag(tests[i] ||... +^ I

Re: [HACKERS] Range types

2009-12-16 Thread Martijn van Oosterhout
On Tue, Dec 15, 2009 at 04:29:26PM -0800, Jeff Davis wrote: On Tue, 2009-12-15 at 18:06 -0600, decibel wrote: Now that varlena's don't have an enormous fixed overhead, perhaps it's worth looking at using them. Obviously some operations would be slower, but for your stated examples of

Re: [HACKERS] Does verbose Need to be Reserved?

2009-12-16 Thread Andrew Gierth
David == David E Wheeler da...@kineticode.com writes: David Hey All, David I was just getting a new version of pgTAP ready for release, and while testing it on HEAD, I got this error: David + psql:pgtap.sql:5789: ERROR: syntax error at end of input David + LINE 28: IF

Re: [HACKERS] Range types

2009-12-16 Thread Martijn van Oosterhout
On Wed, Dec 16, 2009 at 10:57:19AM -0800, Scott Bailey wrote: Ok, silly question here. But how do you determine the length of a continuous range? By definition length of [a, b) and (a, b] = b-a. But what about (a,b) and [a,b]? Are we saying that because they are continuous, the

Re: [HACKERS] Update on true serializable techniques in MVCC

2009-12-16 Thread Robert Haas
On Wed, Dec 16, 2009 at 1:29 PM, Boszormenyi Zoltan z...@cybertec.at wrote: Robert Haas írta: On Wed, Dec 16, 2009 at 1:25 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Dec 16, 2009 at 1:14 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: Robert Haas escribió: On Wed, Dec 16,

Re: [HACKERS] Range types

2009-12-16 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: In short, I think that while it is possible to define ranges of strings, it is not as useful as one would like. Note it is not the *range* that is the problem, it is the assumption that there's a unique next string. There's no unique next in

Re: [HACKERS] Update on true serializable techniques in MVCC

2009-12-16 Thread Robert Haas
On Wed, Dec 16, 2009 at 1:30 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Alvaro Herrera alvhe...@commandprompt.com wrote: So you'd have to disable HOT updates when true serializability was active? I wouldn't think so; but someone familiar with HOT logic could probably determine

Re: [HACKERS] Does verbose Need to be Reserved?

2009-12-16 Thread Tom Lane
David E. Wheeler da...@kineticode.com writes: I asked on IRC, and Andrew “RhodiumToad” Gierth pointed out that it became a reserved word at some point. Some point would have been around the time VACUUM VERBOSE got invented, ie January 1997 according to the CVS logs. We can't unreserve it until

Re: [HACKERS] Range types

2009-12-16 Thread Jeff Davis
On Wed, 2009-12-16 at 13:59 -0500, Tom Lane wrote: The argument for having granularity wired into the datatype seems to boil down to just space savings. I don't find that compelling enough to justify code contortions and user-visible restrictions on functionality. The argument (at least from

Re: [HACKERS] Range types

2009-12-16 Thread Alvaro Herrera
Tom Lane wrote: Alvaro Herrera alvhe...@commandprompt.com writes: In short, I think that while it is possible to define ranges of strings, it is not as useful as one would like. Note it is not the *range* that is the problem, it is the assumption that there's a unique next string.

Re: [HACKERS] Range types

2009-12-16 Thread Tom Lane
Martijn van Oosterhout klep...@svana.org writes: But a period type will take just one or two more bytes if you don't require alignment. Alignment on a varlena type seems silly anyway, since you'll be aligning the header byte rather than the content. You might still end up paying the alignment

Re: [HACKERS] Range types

2009-12-16 Thread Tom Lane
Jeff Davis pg...@j-davis.com writes: On Wed, 2009-12-16 at 12:50 -0500, Tom Lane wrote: I'm still not exactly clear on what the use-case is for discrete timestamp ranges, and I wonder how many people are going to be happy with a representation that can't handle a range that's open-ended on

Re: [HACKERS] Range types

2009-12-16 Thread Tom Lane
Jeff Davis pg...@j-davis.com writes: On Wed, 2009-12-16 at 13:59 -0500, Tom Lane wrote: The argument for having granularity wired into the datatype seems to boil down to just space savings. I don't find that compelling enough to justify code contortions and user-visible restrictions on

Re: [HACKERS] Range types

2009-12-16 Thread Martijn van Oosterhout
On Wed, Dec 16, 2009 at 03:57:44PM -0500, Tom Lane wrote: Jeff Davis pg...@j-davis.com writes: I still have not seen an answer to the problem of changing the representation of a continuous range. If you have the continuous range [5, 10], you're pretty much stuck with that representation,

Re: [HACKERS] Update on true serializable techniques in MVCC

2009-12-16 Thread Kevin Grittner
Robert, Please forgive a couple editorial inserts to your statement -- I hope it clarifies. If I've distorted your meaning, feel free to straighten me out. :-) Robert Haas robertmh...@gmail.com wrote: This thread veered off into a discussion of the traditional [predicate locking]

Re: [HACKERS] Range types

2009-12-16 Thread Jeff Davis
On Wed, 2009-12-16 at 15:46 -0500, Tom Lane wrote: Huh? We're miscommunicating somewhere. Yeah, apparently. By open-ended I meant -infinity left bound, or null left bound if you prefer. Not sure if there's a better term. But my proposal allowed both of those things with various flag

Re: [HACKERS] Range types

2009-12-16 Thread Tom Lane
Martijn van Oosterhout klep...@svana.org writes: However, it does seem reasonable to allow people to restrict, either by typmod or a check constraint the kinds of values that can be stored in a particular column. Then an application can decide which way they want their intervals to work and

Re: [HACKERS] Range types

2009-12-16 Thread Jeff Davis
On Wed, 2009-12-16 at 15:57 -0500, Tom Lane wrote: Making it explicit doesn't fix the fact that you can't rely on the arithmetic to be exact. Can't rely on what arithmetic to be exact? Int64 timestamps should clearly work for granules of 1 second. If the administrator can choose a timestamp

Re: [HACKERS] Range types

2009-12-16 Thread Scott Bailey
Tom Lane wrote: Martijn van Oosterhout klep...@svana.org writes: However, it does seem reasonable to allow people to restrict, either by typmod or a check constraint the kinds of values that can be stored in a particular column. Then an application can decide which way they want their intervals

[HACKERS] determine snapshot after obtaining locks for first statement

2009-12-16 Thread Kevin Grittner
The Cahill thesis mentions an interesting optimization -- they defer determination of the snapshot until after any locks required for the first statement have been acquired. Where the first statement was, for example, an UPDATE, this reduced re-reads or rollbacks in the face of concurrent

Re: [HACKERS] Largeobject Access Controls and pg_migrator

2009-12-16 Thread Bruce Momjian
Takahiro Itagaki wrote: KaiGai Kohei kai...@kaigai.gr.jp wrote: Can SELECT lo_create(16385); help this situation? SELECT lo_create(loid) FROM (SELECT DISTINCT loid FROM pg_largeobject) AS t would work for pg_migrator. I'm not clear whether we also check pg_largeobejct has chunks

Re: [HACKERS] Range types

2009-12-16 Thread Jeff Davis
On Wed, 2009-12-16 at 13:59 -0500, Tom Lane wrote: For example, if you're trying to do classroom scheduling, it might be useful to constrain the periods to start and end on hour boundaries --- but the next thing you'll want is to have it know that the next slot after 5pm Friday is 8am Monday.

Re: [HACKERS] Largeobject Access Controls (r2460)

2009-12-16 Thread Robert Haas
On Thu, Dec 10, 2009 at 10:41 PM, Takahiro Itagaki itagaki.takah...@oss.ntt.co.jp wrote: KaiGai Kohei kai...@ak.jp.nec.com wrote: What's your opinion about:   long desc: When turned on, privilege checks on large objects perform with              backward compatibility as 8.4.x or earlier

  1   2   >