Re: [HACKERS] [PERFORM] A Better External Sort?

2005-10-05 Thread Martijn van Oosterhout
On Wed, Oct 05, 2005 at 05:41:25AM -0400, Michael Stone wrote: On Sat, Oct 01, 2005 at 06:19:41PM +0200, Martijn van Oosterhout wrote: COPY TO /dev/null WITH binary 13MB/s55% user 45% system (ergo, CPU bound) [snip] the most expensive. But it does point out that the whole process

Re: [HACKERS] prefix btree implementation

2005-10-06 Thread Martijn van Oosterhout
van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting for someone else to do the other 95% so you can sue them. pgprEEjIB47Y3.pgp Description: PGP

Re: [HACKERS] execution of nested loop joins

2005-10-06 Thread Martijn van Oosterhout
, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting for someone else to do the other 95% so you can sue them. pgpWYkvOdKFp4.pgp

Re: [HACKERS] PG function call

2005-10-06 Thread Martijn van Oosterhout
FUNCTION so the backend knows about them... -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting for someone else to do the other 95% so you can

Re: [HACKERS] [PERFORM] A Better External Sort?

2005-10-06 Thread Martijn van Oosterhout
of pread. Halving the number of kernel calls has got to be worth something right? Portability is an issue ofcourse... But it's been a productive thread, absolutly. Progress has been made... Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius

Re: [HACKERS] [PERFORM] A Better External Sort?

2005-10-06 Thread Martijn van Oosterhout
On Thu, Oct 06, 2005 at 03:57:38PM -0400, Tom Lane wrote: Martijn van Oosterhout kleptog@svana.org writes: Indeed, one of the things on my list is to remove all the lseeks in favour of pread. Halving the number of kernel calls has got to be worth something right? Portability is an issue

Re: [HACKERS] [PERFORM] A Better External Sort?

2005-10-06 Thread Martijn van Oosterhout
On Thu, Oct 06, 2005 at 04:25:11PM -0400, Tom Lane wrote: Martijn van Oosterhout kleptog@svana.org writes: Are we awfully worried about people still using 2.0 kernels? And it would replace two calls with three in the worst case, we currently lseek before every read. That's utterly false

Re: [HACKERS] [GENERAL] Shell script to extract a table from a plain text dump

2005-10-07 Thread Martijn van Oosterhout
the output, maybe we can have a pg_restore for text dumps :) Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting for someone

Re: [HACKERS] Issue is changing _bt_compare function and

2005-10-08 Thread Martijn van Oosterhout
has several dozen indexes already so your code has to deal with that. Remember, _bt_compare compares strings, integers, floats, dates, etc and your code needs to work for all of them too... What does it mean to compare dates case-insensetivly? Hope this helps, -- Martijn van Oosterhout kleptog

[HACKERS] Scan Direction not part of ScanState?

2005-10-11 Thread Martijn van Oosterhout
, but can anyone clarify? Thanks in advance, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting for someone else to do the other 95% so you can

Re: [HACKERS] Spinlocks and CPU Architectures

2005-10-11 Thread Martijn van Oosterhout
. If you start getting to the point where there is no single piece of code that works across all the expected systems, then you have an issue. I don't think we're there yet, but I don't think using a function pointer would be all that expensive? Performence measuring I guess... -- Martijn van

Re: [HACKERS] Spinlocks and CPU Architectures

2005-10-11 Thread Martijn van Oosterhout
__tune_athlon__ 1 +#define __3dNOW__ 1 -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting for someone else to do the other 95% so you can sue them

Re: [HACKERS] database vacuum from cron hanging

2005-10-12 Thread Martijn van Oosterhout
, I do notice none of the spinlock code has any memory barriers to stop gcc moving code across them. I suppose volatile is one way of solving that... Maybe explicit don't optimise here markers would be worthwhile. -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n

Re: [HACKERS] [COMMITTERS] pgsql: Do all accesses to shared buffer headers through

2005-10-13 Thread Martijn van Oosterhout
of whether gcc by itself could offer a nicer solution. Yes, we need to look for solutions for other compilers. We just need to be careful and have people check the spinlock code carefully when they use other compilers. Maybe in the porting guide? -- Martijn van Oosterhout kleptog@svana.org http

Re: [HACKERS] pg_config --pgxs on Win32

2005-10-13 Thread Martijn van Oosterhout
when commands read /path as an option rather than a path. Hopefully they're smart enough to realize c:/path does not actually contain an option but is just a path. Presumably that's fixable some other way? -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius

Re: [HACKERS] A costing analysis tool

2005-10-13 Thread Martijn van Oosterhout
. Hope this helps, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting for someone else to do the other 95% so you can sue them

Re: [HACKERS] pg_config --pgxs on Win32

2005-10-13 Thread Martijn van Oosterhout
in filenames issue in UNIX. Unfortunatly, Windows never had a getopt and so there is no standard way of dealing with options. Every program does it differently. For example, there is no end of options marker, which is how you would deal with this issue in UNIX. Have a nice day, -- Martijn van

Re: [HACKERS] A costing analysis tool

2005-10-14 Thread Martijn van Oosterhout
is determining where the current system is wrong. Comparing actual times with eachother might tell you what the model should be. As has been pointed out, the raw data is what's needed. From there you can draw conclusions. Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org

Re: [HACKERS] A costing analysis tool

2005-10-15 Thread Martijn van Oosterhout
gettimeday() was called, you may be able to correct the error. I havn't tried that though. Hope this helps, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting

Re: [HACKERS] drop if exists

2005-10-15 Thread Martijn van Oosterhout
, it seems to me that it would be cool to make a CREATE OR REPLACE TABLE that simply does nothing if the table already exists with the right format. ISTM that most of the sitautions people are talking about here ivolving recreating the table exactly as is directly afterwards. -- Martijn van Oosterhout

Re: [HACKERS] Plan structure

2005-10-15 Thread Martijn van Oosterhout
works. Also, there are various README files in the directories which also provide additional info. Hopefully this answers your questions. -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool

Re: [HACKERS] A costing analysis tool

2005-10-15 Thread Martijn van Oosterhout
On Sat, Oct 15, 2005 at 05:53:45PM -0400, Greg Stark wrote: Martijn van Oosterhout kleptog@svana.org writes: This is unfortunate because EXPLAIN ANALYZE is an immensly useful tool, as far as it goes. I've pondered if some kind of userspace timing mechanism could be introduced (possibly

Re: [HACKERS] A costing analysis tool

2005-10-16 Thread Martijn van Oosterhout
/timerfunctions/queryperformancecounter.asp [2] http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/timers/timerreference/timerfunctions/queryperformancefrequency.asp [3] http://svana.org/kleptog/pgsql/rdtsc.c -- Martijn van Oosterhout kleptog

Re: [HACKERS] PostgreSQL roadmap for 8.2 and beyond.

2005-10-16 Thread Martijn van Oosterhout
(a) default values returning a) instead of an extension to the insert statement itself. How do other databases deal with this? Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool

Re: [HACKERS] slow IN() clause for many cases

2005-10-16 Thread Martijn van Oosterhout
you provide is the perfect candidate for a partial index. Attributes that only apply to a small fraction of the table are better off as predicates if you're going to be searching for them a lot. Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n

Re: [HACKERS] Question about Ctrl-C and less

2005-10-16 Thread Martijn van Oosterhout
On Sun, Oct 16, 2005 at 02:44:41PM -0400, Tom Lane wrote: Martijn van Oosterhout kleptog@svana.org writes: This problem has been around for ever yet obviously not everybody runs into it all the time like I do. Would patch to fix this be accepted or is there a reason why not? I guess

Re: [HACKERS] Question about Ctrl-C and less

2005-10-16 Thread Martijn van Oosterhout
going to make 8.1 anyway I'd probably go for a patch that got rid of the longjmp altogether (if people will accept that), fixing the memory leaks at the same time. At the moment I'm just looking for a concensus that it's a problem to be solved. Have a nice day, -- Martijn van Oosterhout kleptog

Re: [HACKERS] slow IN() clause for many cases

2005-10-16 Thread Martijn van Oosterhout
*/ hints.) It's called LIMIT and has been supported for a long time. Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting

Re: [HACKERS] PostgreSQL roadmap for 8.2 and beyond.

2005-10-17 Thread Martijn van Oosterhout
with a table so I think this would be quite straightforward actually, assuming you know the table being operated on. Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5

Re: [HACKERS] libpq's pollution of application namespace

2005-10-17 Thread Martijn van Oosterhout
efficient library). And not portable to other compilers either... Hope this helps, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting

Re: [HACKERS] libpq's pollution of application namespace

2005-10-17 Thread Martijn van Oosterhout
On Mon, Oct 17, 2005 at 12:20:06PM -0400, Tom Lane wrote: Martijn van Oosterhout kleptog@svana.org writes: What other linkers do we need to support? All the non-GNU ones. (I'm already desperately unhappy about the thin representation of non-GNU toolchains in the build farm...) Ok, so

Re: [HACKERS] PostgreSQL roadmap for 8.2 and beyond.

2005-10-17 Thread Martijn van Oosterhout
as given solves your problem nicely. You don't even have to know the name of the sequence, just the name of the primary key column. When you see an INSERT append RETURNING colname and you have your answer. Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog

Re: [HACKERS] libpq's pollution of application namespace

2005-10-17 Thread Martijn van Oosterhout
missed: promote_v4_to_v6_addr promote_v4_to_v6_mask -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting for someone else to do the other

Re: [HACKERS] A few questions

2005-10-18 Thread Martijn van Oosterhout
is working on that in the general sense, though specific fixes are applied now and then. Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting

Re: [HACKERS] Problem in ExecEvalExpr function

2005-10-18 Thread Martijn van Oosterhout
the function for operator =. Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting for someone else to do the other 95% so you can

Re: [HACKERS] 2nd try @NetBSD/2.0 Alpha

2005-10-18 Thread Martijn van Oosterhout
though: http://archive.netbsd.se/?ml=netbsd-usersa=2004-01m=18027 No-one answered that one either... -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting

Re: [HACKERS] Character Conversions Handling

2005-10-18 Thread Martijn van Oosterhout
. The current planning is to use a cross-platform library (ICU) to handle all the locale and encoding related issues. This is a large task and I wouldn't be surprised if it takes a release or two. Hopefully it will clean all these issues up... Have a nice day, -- Martijn van Oosterhout kleptog@svana.org

Re: [HACKERS] Question about Ctrl-C and less

2005-10-18 Thread Martijn van Oosterhout
I'll add a more comprehensive patch to my list hopefully for 8.2... Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting

Re: [HACKERS] 2nd try @NetBSD/2.0 Alpha

2005-10-19 Thread Martijn van Oosterhout
that query by hand. Then you should get the backtrace at SIGFPE. Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting for someone

Re: [HACKERS] 'a' == 'a ' (Was: RE: [pgsql-advocacy] [GENERAL] Oracle buysInnobase)

2005-10-19 Thread Martijn van Oosterhout
understood it: char(N) is blank padding varchar(N) is not If you make varchar(n) do blank padding, then what's the difference between the two types? You may as well get rid of one... Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius

Re: [HACKERS] multi-relation indices

2005-10-20 Thread Martijn van Oosterhout
for each table when the table is created. Then define a way to query all those indexes at once. But YMMV. Hope this helps, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5

Re: [HACKERS] libpq's pollution of application namespace

2005-10-20 Thread Martijn van Oosterhout
no consensus on whether we should do it if it can't be done for everyone in a simple way. Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting

Re: [HACKERS] Question about Ctrl-C and less

2005-10-21 Thread Martijn van Oosterhout
readline? Doing it with a flag is a lot more susceptable to subtle behaviour changes, but I'll see if I can make it work. Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5

Re: [HACKERS] Question about Ctrl-C and less

2005-10-21 Thread Martijn van Oosterhout
leakage and breakage from the longjmp(). But I'm getting there... Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting

[HACKERS] Which platforms don't HAVE_POSIX_SIGNALS?

2005-10-21 Thread Martijn van Oosterhout
Other than Windows I guess. Sometimes the system call restart behaviour is annoying, but you can work around that using sigaction. But can that be relied apon? Thanks in advance, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95

Re: [HACKERS] [COMMITTERS] pgsql: Do all accesses to shared buffer

2005-10-22 Thread Martijn van Oosterhout
you want... Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting for someone else to do the other 95% so you can sue them

Re: [HACKERS] Question about Ctrl-C and less

2005-10-22 Thread Martijn van Oosterhout
no processing happening anyway and we can check the flag after write returns success (pager accepted more data) or failure (pager died). Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool

Re: [HACKERS] Nested/recursive query execution

2005-10-22 Thread Martijn van Oosterhout
recursively. Consider, foreign keys, SQL functions, etc are all recursive invokations of a sort Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work

Re: [HACKERS] Lifecycle management

2005-10-22 Thread Martijn van Oosterhout
van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting for someone else to do the other 95% so you can sue them. pgptAL0hfP1dH.pgp Description: PGP

Re: [HACKERS] Question about Ctrl-C and less

2005-10-22 Thread Martijn van Oosterhout
On Sun, Oct 16, 2005 at 03:25:49PM +0200, Martijn van Oosterhout wrote: This behaviour has been around so long that I've gotten used to it but I've always considered it a bug. Yet it has never been fixed so I'm going to ask if anybody else has issues with this behaviour. I've posted a patch

Re: [HACKERS] Question about Ctrl-C and less

2005-10-22 Thread Martijn van Oosterhout
On Sat, Oct 22, 2005 at 09:46:32PM +0200, Martijn van Oosterhout wrote: I've posted a patch to -patches which fixes all the memory leak and file descriptor leak issues and well as making psql handle ^C more gracefully in general. It doesn't address this particular issue though, thats

Re: [HACKERS] Lifecycle management

2005-10-22 Thread Martijn van Oosterhout
contexts are allocated and destroyed, what objects that can be trusted to originate from memory contexts etc. Pointers to doc's or code that makes this clearer will help a great deal. Read the READMEs in utils/mmgr and executor, they explain a lot. Hope this helps, -- Martijn van Oosterhout

Re: [HACKERS] Query Progress Estimator

2005-10-22 Thread Martijn van Oosterhout
recommend that to anyone... Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting for someone else to do the other 95% so you

Re: [HACKERS] Question about Ctrl-C and less

2005-10-23 Thread Martijn van Oosterhout
, by not reading stdin. Ergo, we should also not respond to ^C either. Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting

Re: [HACKERS] Semantic optimization is posible?

2005-10-24 Thread Martijn van Oosterhout
generally know that down at the lower levels. Hope this helps, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting for someone else to do

Re: [HACKERS] Question about Ctrl-C and less

2005-10-24 Thread Martijn van Oosterhout
will be revisited again later? If the former, I'll rework it into my psql fixing patch on -patches, since this one as posted is not 100% correct (as someone pointed out) although the chance that someone will notice is about nil. Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http

Re: [HACKERS] New timezone data

2005-10-25 Thread Martijn van Oosterhout
not exactly a real issue currently... Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting for someone else to do the other 95

Re: [HACKERS] expanded \df+ display broken in beta4

2005-10-25 Thread Martijn van Oosterhout
that has been fixed we should revisit this. Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting for someone else to do

[HACKERS] The use of (mb)print.c from psql in the scripts directory

2005-10-25 Thread Martijn van Oosterhout
the same code. Thanks in advance, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting for someone else to do the other 95% so you can sue

Re: [HACKERS] TRAP: FailedAssertion(!((itemid)-lp_flags 0x01), File: nbtsearch.c, Line: 89)

2005-10-26 Thread Martijn van Oosterhout
the query that generates it? EXPLAIN should tell you the indexes it's using, so you could just REINDEX those... Or REINDEX them all... :) Hope this helps, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent

Re: [HACKERS] Having trouble startin off with the code..

2005-10-27 Thread Martijn van Oosterhout
understand them the first time round, but give it time... Hope this helps, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting for someone else

Re: [HACKERS] ERROR: invalid memory alloc request size a_big_number_here

2005-10-27 Thread Martijn van Oosterhout
this helps, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting for someone else to do the other 95% so you can sue them. pgpjeliVszvq1

Re: [HACKERS] ERROR: invalid memory alloc request size a_big_number_here

2005-10-27 Thread Martijn van Oosterhout
. try with: break mcxt.c:504 if size 10 Hope this helps, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting for someone else

Re: [HACKERS] ERROR: invalid memory alloc request size a_big_number_here

2005-10-27 Thread Martijn van Oosterhout
Belay that, you should be able to put a breakpoint on errstart or elog or perhaps errmsg. Much easier... (I expected the find the answer in the developer FAQ, but it's not there). Hope this helps, On Thu, Oct 27, 2005 at 12:04:45PM +0200, Martijn van Oosterhout wrote: On Thu, Oct 27, 2005

[HACKERS] Ideas for easier debugging of backend problems

2005-10-27 Thread Martijn van Oosterhout
*/ exec(gdb, /proc/$ppid/exec, $ppid) _exit(); /* Oops */ } Might be useful for getting bug reports out of people who can't work out how to get corefiles... Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration

Re: [HACKERS] ERROR: invalid memory alloc request size a_big_number_here

2005-10-27 Thread Martijn van Oosterhout
On Thu, Oct 27, 2005 at 08:54:57AM -0400, Bruce Momjian wrote: Martijn van Oosterhout wrote: -- Start of PGP signed section. Belay that, you should be able to put a breakpoint on errstart or elog or perhaps errmsg. Much easier... (I expected the find the answer in the developer FAQ

Re: [HACKERS] ERROR: invalid memory alloc request size a_big_number_here

2005-10-27 Thread Martijn van Oosterhout
the results in gdb much more reliable. It's clear at least that length is negative, but what about the other variables... Do you use a lot of subtransactions, function, savepoints, anything like that? Hope this helps, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n

Re: [HACKERS] ERROR: invalid memory alloc request size a_big_number_here

2005-10-27 Thread Martijn van Oosterhout
the new mxact's starting offset has been written to disk. Any better ideas? I don't see immediatly if it's feasible or not. But another approach is to detect when it happened, and retry. Parts of the buffer code do this for example... Hope this helps, -- Martijn van Oosterhout kleptog@svana.org

Re: [HACKERS] Ideas for easier debugging of backend problems

2005-10-27 Thread Martijn van Oosterhout
On Thu, Oct 27, 2005 at 10:41:08AM -0400, Tom Lane wrote: Martijn van Oosterhout kleptog@svana.org writes: 1. Move the test for strange memory alloc sizes to the palloc macros so that on error, it points at the palloc call rather than mcxt.c. What would that accomplish other than bloating

Re: [HACKERS] Ideas for easier debugging of backend problems

2005-10-27 Thread Martijn van Oosterhout
directly... Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting for someone else to do the other 95% so you can sue them

Re: [HACKERS] Ideas for easier debugging of backend problems

2005-10-28 Thread Martijn van Oosterhout
think the gain outweighs the costs, but I'll leave it to TPTB to decide that. Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around

Re: [HACKERS] [PATCHES] TODO Item - Add system view to show free space map

2005-10-28 Thread Martijn van Oosterhout
with this pattern hasn't been done since FAT. That isn't to say that preextending isn't a good idea. With my pread() patch it was the one use of lseek() I couldn't remove. Other than that, good thought... Have a nice dat, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent

Re: [HACKERS] FKs on temp tables: hard, or just omitted?

2005-10-29 Thread Martijn van Oosterhout
other backends to lock and examine your temporary tables. But AIUI temporary tables are not stored in shared memory so how do you get a consistant view of it? Not unsolvable, but very tricky. Hope this helps, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n

[HACKERS] The argument for reinstating --as-needed

2005-10-29 Thread Martijn van Oosterhout
the reference. Have a nice day, [1] http://archives.postgresql.org/pgsql-committers/2005-05/msg00042.php [2] http://archives.postgresql.org/pgsql-hackers/2005-05/msg00488.php [3] https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=157126 -- Martijn van Oosterhout kleptog@svana.org http://svana.org

Re: [HACKERS] The argument for reinstating --as-needed

2005-10-29 Thread Martijn van Oosterhout
, but like you said, way too late for 8.1. Still maybe a distributor might pick it up since reducing dependancies is fairly important to them. Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent

Re: [HACKERS] Reducing the overhead of NUMERIC data

2005-11-01 Thread Martijn van Oosterhout
there has to be 4 decimal places. As it turns out, the decimal places are mostly zero so the optimisation works for me. Interesting ideas, but there's a lot of hurdles to jump I think... -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration

Re: [HACKERS] Reducing the overhead of NUMERIC data

2005-11-02 Thread Martijn van Oosterhout
is to store them explicitly. Fact is, things that cost fractions of cents are not that common, in this database anyway. As for the argument in general, this table is so wide that any gain will vanish into the slack at the end of a block so it won't actually matter... Have a nice day, -- Martijn van

Re: [HACKERS] Reducing the overhead of NUMERIC data

2005-11-03 Thread Martijn van Oosterhout
on the fact that CHAR(12) can take a fixed amount of space, which simply isn't true in a multibyte encoding. Having a different header for things shorter than 255 bytes has been discussed before, that's another argument though. Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http

Re: [HACKERS] Reducing the overhead of NUMERIC data

2005-11-03 Thread Martijn van Oosterhout
the varlena header... Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting for someone else to do the other 95% so you can

Re: [HACKERS] somebody could explain this?

2005-11-04 Thread Martijn van Oosterhout
van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting for someone else to do the other 95% so you can sue them. pgpkJMD5sNVGk.pgp Description: PGP

Re: [HACKERS] Reducing the overhead of NUMERIC data

2005-11-04 Thread Martijn van Oosterhout
unnecessary copying string data around (and other data, I would assume). Well, there is a bit of copying around while creating tuples and such, but it's not to add null terminators. Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5

Re: [HACKERS] Reducing the overhead of NUMERIC data

2005-11-04 Thread Martijn van Oosterhout
to be able to collate in a locale dependant way. Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting for someone else to do

Re: [HACKERS] Reducing the overhead of NUMERIC data

2005-11-04 Thread Martijn van Oosterhout
to peruse the website yourself... Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting for someone else to do the other 95% so

Re: [HACKERS] Reducing the overhead of NUMERIC data

2005-11-05 Thread Martijn van Oosterhout
, that's being worked on though. Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting for someone else to do the other 95% so

Re: [HACKERS] Exclusive lock for database rename

2005-11-05 Thread Martijn van Oosterhout
exponentially rising delay, otherwise you'll never guarentee completion. With notice to client what is happening, hopefully... Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool

Re: [HACKERS] Problems with index-scan on regexp in 8.1

2005-11-07 Thread Martijn van Oosterhout
text_pattern_ops); Hope this helps, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting for someone else to do the other 95% so you can sue them

Re: [HACKERS] Exclusive lock for database rename

2005-11-09 Thread Martijn van Oosterhout
you out forever. The only way to eventually win is to eventually have a timeout longer than the longest currently running query. Anyway, this is theoretical as the code for this doesn't exist. It was just an idea. Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org

Re: [HACKERS] SIGSEGV taken on 8.1 during dump/reload

2005-11-09 Thread Martijn van Oosterhout
://archives.postgresql.org/pgsql-hackers/2005-09/msg00476.php -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting for someone else to do the other 95

Re: [HACKERS] win32 8.1 pgadmin dll issues

2005-11-10 Thread Martijn van Oosterhout
to resolve this, but how would that work for a windows platform? Can you examine a binary to see what it depends on? Hope this helps, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5

Re: [HACKERS] generic builtin functions

2005-11-10 Thread Martijn van Oosterhout
types to tie them to anyway. But I want them to have reserved oids and appear in the list of builtins. Why? What's wrong with creating the functions when people use the module, like every other module in contrib? Is there a reason you need fixed oids? Have a nice day, -- Martijn van Oosterhout

Re: [HACKERS] generic builtin functions

2005-11-10 Thread Martijn van Oosterhout
. For arrays it's worth it because people assume you can make an array of most things. But enums needs to be explicitly defined and how many enums are you expecting anyway. Is pg_proc bloat an actual concern? Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog

Re: [HACKERS] generic builtin functions

2005-11-10 Thread Martijn van Oosterhout
arguments. returnoid = procLookupRettype( fcinfo-flinfo-fn_oid ); returns your return type. These work even if you are in a type input/output function. Here is some code that uses these: http://svana.org/kleptog/pgsql/taggedtypes.html Have a nice day, -- Martijn van Oosterhout kleptog@svana.org

Re: [HACKERS] Module incompatibility detection between 8.0 and 8.1

2005-11-11 Thread Martijn van Oosterhout
release. I'm actually not sure about the policy for minor releases. Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting

Re: [HACKERS] Does EXPLAIN ANALYZE show a wrong plan for MIN/MAX?

2005-11-11 Thread Martijn van Oosterhout
(available since 8.1) that is really used when running the plain query. It may also be that the overhead of calling gettimeofday() several times per tuple is blowing the time out. What platform is this? Hope this helps, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog

Re: [HACKERS] Getting table name/tuple from OID

2005-11-11 Thread Martijn van Oosterhout
, RelationGetRelationName() does what you want. Otherwise maybe RelationIdGetRelation(Oid relationId). Check out utils/cache/relcache.c for a variety of functions to extract basic data like this. Hope this helps, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n

Re: [HACKERS] 8.1 substring bug?

2005-11-11 Thread Martijn van Oosterhout
whereas substring expects an INT. Shouldn't there be a warning? ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius

Re: [HACKERS] server closed connection on a select query

2005-11-11 Thread Martijn van Oosterhout
a backtrace (bt in gdb) would be more helpful. Have a nice day? -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a tool for doing 5% of the work and then sitting around waiting for someone else to do

Re: [HACKERS] SIGSEGV taken on 8.1 during dump/reload

2005-11-12 Thread Martijn van Oosterhout
, not just for the pretty error messages but for stability of the system. I would be in favour if storing the CATALOG_VERSION in the pg_finfo struct and rejecting anything that doesn't match. Have a nice day, -- Martijn van Oosterhout kleptog@svana.org http://svana.org/kleptog/ Patent. n

Re: [HACKERS] SIGSEGV taken on 8.1 during dump/reload

2005-11-12 Thread Martijn van Oosterhout
On Sat, Nov 12, 2005 at 10:47:35AM -0500, Tom Lane wrote: Martijn van Oosterhout kleptog@svana.org writes: I would be in favour if storing the CATALOG_VERSION in the pg_finfo struct and rejecting anything that doesn't match. Not sure that CATALOG_VERSION is an amazingly useful thing to use

Re: [HACKERS] SIGSEGV taken on 8.1 during dump/reload

2005-11-12 Thread Martijn van Oosterhout
On Sat, Nov 12, 2005 at 11:18:51AM -0500, Tom Lane wrote: Martijn van Oosterhout kleptog@svana.org writes: Sure, CATALOG_VERSION isn't that useful, but it's the only thing in the header files that gives any kind of indication what version you're compiling against. PG_VERSION is a string

<    1   2   3   4   5   6   7   8   9   10   >