Re: [HACKERS] review: More frame options in window functions

2010-01-16 Thread Hitoshi Harada
2010/1/17 Tom Lane : > Hitoshi Harada writes: >> ... I tried to change not to canonicalize the >> pathkeys in make_pathkeys_window() in such cases and succeeded then >> passed all regression tests. > > That's broken, whether it passes regression tests or not.  Not > canonicalizing will mean that y

Re: [HACKERS] Clearing global statistics

2010-01-16 Thread Robert Haas
On Thu, Jan 14, 2010 at 1:11 PM, Tom Lane wrote: > Greg Smith writes: >> Tom Lane wrote: >>> Actually, that brings up a more general question: what's with the >>> enthusiasm for clearing statistics *at all*? > >> ... Right now, you're still carrying around >> the history of the bad period forever

Re: [HACKERS] Streaming replication status

2010-01-16 Thread Josh Berkus
> I'd happily write a patch to handle all that if I thought it would be > accepted. I fear that the whole approach will be considered a bit too > hackish and get rejected on that basis though. Not really sure of a > "right" way to handle this though. Anything better is going to be more > compli

Re: [HACKERS] Partitioning syntax

2010-01-16 Thread Robert Haas
On Thu, Jan 14, 2010 at 4:13 AM, Takahiro Itagaki wrote: > Here is a revised partitioning syntax patch. It implements only syntax and > on-disk structure mentioned below: >    Table Partitioning#Syntax >      http://wiki.postgresql.org/wiki/Table_partitioning#Syntax >    Table Partitioning#On-disk

Re: [HACKERS] review: More frame options in window functions

2010-01-16 Thread Tom Lane
Hitoshi Harada writes: > ... I tried to change not to canonicalize the > pathkeys in make_pathkeys_window() in such cases and succeeded then > passed all regression tests. That's broken, whether it passes regression tests or not. Not canonicalizing will mean that you fail to recognize equality t

Re: [HACKERS] review: More frame options in window functions

2010-01-16 Thread Hitoshi Harada
2010/1/17 Erik Rijkers : > On Sat, January 16, 2010 09:29, Hitoshi Harada wrote: >> 2010/1/16 Erik Rijkers : >>> Thanks for the review. I've found another crash today and attached is fixed version. The case is: SELECT four, sum(ten) over (PARTITION BY four ORDER BY four RANGE 1

Re: [HACKERS] Review: Patch: Allow substring/replace() to get/set bit values

2010-01-16 Thread Kevin Grittner
> Leonardo F 01/07/10 6:03 AM wrote: > attached a patch Leonardo, This patch no longer applies. Could you rebase it? Thanks, -Kevin -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql

Re: [HACKERS] Hot Standby and handling max_standby_delay

2010-01-16 Thread Joshua D. Drake
On Sat, 2010-01-16 at 18:20 +, Simon Riggs wrote: > On Sat, 2010-01-16 at 11:37 -0500, Tom Lane wrote: > > Simon Riggs writes: > > > I'm wondering if it wouldn't just be easier to put in a plugin for > > > recovery conflict handling, so the user can decide what to do > > > themselves. That see

Re: [HACKERS] review: More frame options in window functions

2010-01-16 Thread Erik Rijkers
On Sat, January 16, 2010 09:29, Hitoshi Harada wrote: > 2010/1/16 Erik Rijkers : >> >>> Thanks for the review. I've found another crash today and attached is >>> fixed version. The case is: >>> >>> SELECT four, sum(ten) over (PARTITION BY four ORDER BY four RANGE 1 >>> PRECEDING) FROM tenk1 WHERE u

Re: [HACKERS] quoting psql varible as identifier

2010-01-16 Thread Robert Haas
On Thu, Jan 14, 2010 at 8:46 PM, Robert Haas wrote: > I have yet to fully review the code but on a quick glance it looks reasonable. On further review, it looks less reasonable. :-( The new PQescapeIdentConn function is basically a cut-up version of PQescapeStringInternal, which seems like a re

Re: [HACKERS] Hot Standby and handling max_standby_delay

2010-01-16 Thread Simon Riggs
On Sat, 2010-01-16 at 11:37 -0500, Tom Lane wrote: > Simon Riggs writes: > > I'm wondering if it wouldn't just be easier to put in a plugin for > > recovery conflict handling, so the user can decide what to do > > themselves. That seems like a better plan than chewing through these > > issues now.

Re: [HACKERS] Hot Standby and handling max_standby_delay

2010-01-16 Thread Simon Riggs
On Fri, 2010-01-15 at 20:50 +0200, Heikki Linnakangas wrote: > That would change the meaning of max_standby_delay. Currently, it's the > delay between *generating* and applying a WAL record, your proposal > would change it to mean delay between receiving and applying it. That > seems a lot less us

Re: [HACKERS] Streaming replication status

2010-01-16 Thread Stefan Kaltenbrunner
Kevin Grittner wrote: Stefan Kaltenbrunner wrote: Kevin Grittner wrote: Right, we don't want to give the monitoring software an OS login for the database servers, for security reasons. depending on what you exactly mean by that I do have to wonder how you monitor more complex stuff (or stuf

Re: [HACKERS] Archive recovery crashes on win32 in HEAD - hot standby related?

2010-01-16 Thread Tom Lane
Magnus Hagander writes: > I was going to test the walreceiver stuff, but it turns out that basic > archive recovery appears to be broken in HEAD. From what I can tell, > it's related to Hot Standby code. I've committed a fix that makes it work in EXEC_BACKEND case on Unix. Can't tell if there are

Re: [HACKERS] Streaming replication status

2010-01-16 Thread Stefan Kaltenbrunner
Greg Smith wrote: Stefan Kaltenbrunner wrote: Another popular question is "how far behind real-time is the archiver process?" You can do this right now by duplicating the same xlog file name scanning and sorting that the archiver does in your own code, looking for .ready files. It would be

[HACKERS] buildfarm compiler warnings

2010-01-16 Thread Stefan Kaltenbrunner
while cleaning up my $HOME I cam across an old hack I once used to find compiler warnings in the buildfarm logs. The following contains the output of running that script across the current buildfarm members reporting on -HEAD: http://www.kaltenbrunner.cc/files/output_buildfarm_16_01_2010.html

Re: [HACKERS] Hot Standby and handling max_standby_delay

2010-01-16 Thread Tom Lane
Simon Riggs writes: > I'm wondering if it wouldn't just be easier to put in a plugin for > recovery conflict handling, so the user can decide what to do > themselves. That seems like a better plan than chewing through these > issues now. Making it a plugin doesn't solve anything. This is not th

Re: [HACKERS] Hot Standby and handling max_standby_delay

2010-01-16 Thread Simon Riggs
On Sat, 2010-01-16 at 14:08 +0100, Dimitri Fontaine wrote: > Simon Riggs writes: > > On Fri, 2010-01-15 at 20:50 +0200, Heikki Linnakangas wrote: > > Yes, it does. And I know you're thinking along those lines because we > > are concurrently discussing how to handle re-connection after updates. >

Re: [HACKERS] Archive recovery crashes on win32 in HEAD - hot standby related?

2010-01-16 Thread Tom Lane
Robert Haas writes: > On Sat, Jan 16, 2010 at 8:19 AM, Magnus Hagander wrote: >> Not knowing that code very well at this time, but is this perhaps a >> structure not being properly initialized in EXEC_BACKEND case? > It looks like KnownAssignedXidsHash is not initialized. That's > supposed to h

Re: [HACKERS] [COMMITTERS] pgsql: Fix one more cast for _open_osfhandle().

2010-01-16 Thread Tom Lane
Magnus Hagander writes: > 2010/1/2 Tom Lane : >> If those are a problem then presumably syslogger_parseArgs needs work >> too ... and I rather wonder where the value it's reading comes from. > Well, it doesn't generate a warning.. It only did that when the cast > was incorrect. Should we add it

Re: [HACKERS] Testing with concurrent sessions

2010-01-16 Thread Kevin Grittner
Markus Wanner wrote: Kevin Grittner wrote: >> args=['psql', '-A', '--pset=pager=off', > That looks like a correct fix for psql, yes. > Other processes might be confused by (or at least act differently > with) a PAGER env variable, so that still needs to be cleared in > general.

Re: [HACKERS] Testing with concurrent sessions

2010-01-16 Thread Kevin Grittner
Markus Wanner wrote: Kevin Grittner wrote: > I differentiate tests and test suites. Tests mainly have a run > method, while test suites have setUp and tearDown ones. I hadn't caught on to that distinction yet. That should help. >> "uses" means that the referenced task has complimentary setU

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

2010-01-16 Thread Euler Taveira de Oliveira
Dimitri Fontaine escreveu: > It should be possible to be in contrib and installed by default, even > And it could be uninstall too. Let's not do it for core functionalities. -- Euler Taveira de Oliveira http://www.timbira.com/ -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgres

Re: [HACKERS] Archive recovery crashes on win32 in HEAD - hot standby related?

2010-01-16 Thread Robert Haas
On Sat, Jan 16, 2010 at 8:19 AM, Magnus Hagander wrote: > Not knowing that code very well at this time, but is this perhaps a > structure not being properly initialized in EXEC_BACKEND case? It looks like KnownAssignedXidsHash is not initialized. That's supposed to happen when CreateSharedProcAr

Re: [HACKERS] mailing list archiver chewing patches

2010-01-16 Thread Matteo Beccati
Il 16/01/2010 11:48, Dimitri Fontaine ha scritto: Matteo Beccati writes: Anyway, I've made further changes and I would say that at this point the PoC is feature complete. There surely are still some rough edges and a few things to clean up, but I'd like to get your feedback once again: http://

[HACKERS] Archive recovery crashes on win32 in HEAD - hot standby related?

2010-01-16 Thread Magnus Hagander
I was going to test the walreceiver stuff, but it turns out that basic archive recovery appears to be broken in HEAD. From what I can tell, it's related to Hot Standby code. I get this (this is all on win32 - I got the same on win64, but moved back to win32 to make sure it's not an issue with the w

Re: [HACKERS] Hot Standby and handling max_standby_delay

2010-01-16 Thread Dimitri Fontaine
Simon Riggs writes: > On Fri, 2010-01-15 at 20:50 +0200, Heikki Linnakangas wrote: > Yes, it does. And I know you're thinking along those lines because we > are concurrently discussing how to handle re-connection after updates. With my State Machine proposal, we could only apply max_standby_delay

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

2010-01-16 Thread Dimitri Fontaine
Heikki Linnakangas writes: > The module doesn't need to touch backend internals much at all, no > tinkering with shared memory for example, so I would feel much better > about moving that out of src/backend. Not sure where, though; it's not > an executable, so src/bin is hardly the right place, bu

Re: [HACKERS] attoptions

2010-01-16 Thread Robert Haas
First, thanks for the review. Detailed comments/questions below. On Fri, Jan 15, 2010 at 12:52 AM, Alex Hunsaker wrote: > On Sun, Jan 10, 2010 at 12:27, Robert Haas wrote: >> I am not very happy with ATPrepSetOptions().  I basically just >> retained the logic from ATPrepSetDistinct(), but it do

Re: [HACKERS] review: More frame options in window functions

2010-01-16 Thread Pavel Stehule
2010/1/16 Hitoshi Harada : > 2010/1/16 Erik Rijkers : >> >>> Thanks for the review. I've found another crash today and attached is >>> fixed version. The case is: >>> >>> SELECT four, sum(ten) over (PARTITION BY four ORDER BY four RANGE 1 >>> PRECEDING) FROM tenk1 WHERE unique1 < 10; >>> >> >> Hi,

Re: [HACKERS] Small locking bugs in hs

2010-01-16 Thread Simon Riggs
On Thu, 2010-01-07 at 13:16 -0500, Robert Haas wrote: > On Sun, Dec 27, 2009 at 2:12 PM, Andres Freund wrote: > > While unlikely to cause issues two new LWLockAcquire calls use the wrong > > locking mode. > > Patch attached. > > Does it make sense to add this to the 2010-01 CommitFest so we don't

Re: [HACKERS] PG_MODULE_MAGIC checks and pg_migrator

2010-01-16 Thread Dimitri Fontaine
Bruce Momjian writes: > Another option would be to distribute both 8.4 and 8.5 shared objects, > but that would require access to two source trees to perform the > compile, which seems very error-prone. That's what any extension author and/or packager is faced with. Using debian, it's easy enough

Re: [HACKERS] Testing with concurrent sessions

2010-01-16 Thread Jan Urbański
Markus Wanner wrote: >> I do want to expand the tests quite a bit -- do I work them all into >> this same file, or how would I proceed? I think I'll need about 20 >> more tests, but I don't want to get in the way of your work on the >> framework which runs them. > > Well, first of all, another pi

Re: [HACKERS] mailing list archiver chewing patches

2010-01-16 Thread Dimitri Fontaine
Matteo Beccati writes: > Anyway, I've made further changes and I would say that at this point the PoC > is feature complete. There surely are still some rough edges and a few > things to clean up, but I'd like to get your feedback once again: > > http://archives.beccati.org I've been clicking aro

Re: [HACKERS] Streaming replication, retrying from archive

2010-01-16 Thread Dimitri Fontaine
Thanks for stating it this way, it really helps figuring out what is it we're talking about! Heikki Linnakangas writes: > The states with my suggested ReadRecord/FetchRecord refactoring, the > code I have in the replication-xlogrefactor branch in my git repo, > are: They look like you're trying

Re: [HACKERS] missing data in information_schema grant_* tables?

2010-01-16 Thread Fabien COELHO
This is not my understanding of ISO/IEC 9075-11:2003(E), page 57 : You're right, it's a bug, but it's already fixed in 8.5. :-) Great! :-) Thanks, -- Fabien. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.o

Re: [HACKERS] review: More frame options in window functions

2010-01-16 Thread Hitoshi Harada
2010/1/16 Erik Rijkers : > >> Thanks for the review. I've found another crash today and attached is >> fixed version. The case is: >> >> SELECT four, sum(ten) over (PARTITION BY four ORDER BY four RANGE 1 >> PRECEDING) FROM tenk1 WHERE unique1 < 10; >> > > Hi, > > The patch (more_frame_options.2010