Re: [HACKERS] Restore deleted rows

2009-05-01 Thread Robert Treat
On Wednesday 29 April 2009 14:03:14 Dimitri Fontaine wrote: Hi, On Tuesday 28 April 2009 20:43:38 Robert Treat wrote: We had started down the path of making a function to read deleted tuples from a table for a DR scenario we were involved with once. The idea was that you could do

Re: [HACKERS] Creating a tablespace directory in recovery

2009-05-01 Thread Robert Haas
On Thu, Apr 30, 2009 at 3:58 AM, Fujii Masao masao.fu...@gmail.com wrote: Does anyone know why a tablespace directory isn't automatically created in recovery? I think that it's troublesome to create all the directories before recovery. Well, there's some chance that if the directories don't

[HACKERS] windows shared memory error

2009-05-01 Thread Andrew Dunstan
I am seeing Postgres 8.3.7 running as a service on Windows Server 2003 repeatedly fail to restart after a backend crash because of the following code in port/win32_shmem.c: /* * If the segment already existed, CreateFileMapping() will return a * handle to the existing one. */

Re: [HACKERS] Keyword list sanity check

2009-05-01 Thread Andrew Dunstan
Peter Eisentraut wrote: On Thursday 30 April 2009 10:27:45 David Fetter wrote: I'd also like to propose that strict clean be a minimum code quality metric for any Perl code in our code base. A lot of what's in there is just about impossible to maintain. use strict and use warnings,

Re: [HACKERS] Creating a tablespace directory in recovery

2009-05-01 Thread Itagaki Takahiro
Fujii Masao masao.fu...@gmail.com wrote: Does anyone know why a tablespace directory isn't automatically created in recovery? I think that it's troublesome to create all the directories before recovery. I guess that's because postgres (OS user) needs a write privilege of *upper* directory of

Re: [HACKERS] Keyword list sanity check

2009-05-01 Thread Heikki Linnakangas
David Fetter wrote: Please clean up this code at least to the point where it's strict-clean, which means putting use strict; right after the shebang line and not checking it in until it runs that way. I tried, but couldn't make heads or tails of the thing, given all the unused- and

Re: [HACKERS] idea: global temp tables

2009-05-01 Thread Tom Lane
Greg Stark st...@enterprisedb.com writes: Well I claim it's not just a nice bonus but is the difference between implementing something which falls technically within the standard's rules but fails to actually be useful for the standard's intended purpose. I agree with Kevin's objection that

[HACKERS] Table data exclusion patch for pg_dump

2009-05-01 Thread Vadim Trochinsky
Hello! This is a patch that allows choosing not to dump the data for the selected tables. The intended usage is to make backups smaller and faster, by allowing skipping unneeded data, while still generating a backup that can be restored and obtain a fully working application. I use it to

Re: [HACKERS] idea: global temp tables

2009-05-01 Thread Kevin Grittner
Tom Lane t...@sss.pgh.pa.us wrote: Kevin Grittner kevin.gritt...@wicourts.gov writes: Any chance that some of these improvements could be applied to temp tables created with the PostgreSQL-specific syntax while we're at it? You mean the Postgres-specific behavior, no? Trying to support

Re: [HACKERS] idea: global temp tables

2009-05-01 Thread Greg Stark
On Wed, Apr 29, 2009 at 6:42 PM, Tom Lane t...@sss.pgh.pa.us wrote: Greg Stark st...@enterprisedb.com writes: Well I claim it's not just a nice bonus but is the difference between implementing something which falls technically within the standard's rules but fails to actually be useful for the

Re: [HACKERS] idea: global temp tables

2009-05-01 Thread Tom Lane
Kevin Grittner kevin.gritt...@wicourts.gov writes: Any chance that some of these improvements could be applied to temp tables created with the PostgreSQL-specific syntax while we're at it? You mean the Postgres-specific behavior, no? Trying to support a table without *any* pre-existing

Re: [HACKERS] idea: global temp tables

2009-05-01 Thread Kevin Grittner
Peter Eisentraut pete...@gmx.net wrote: There are actually two orthogonal properties at work here: How the table is visible with respect to modules (LOCAL/GLOBAL) and whether the table disappears at the end of the session (currently yes, proposed new behavior optionally no). Pavel's

Re: [HACKERS] Creating a tablespace directory in recovery

2009-05-01 Thread Jaime Casanova
On Thu, Apr 30, 2009 at 3:50 PM, Jaime Casanova jcasa...@systemguards.com.ec wrote: On Thu, Apr 30, 2009 at 2:58 AM, Fujii Masao masao.fu...@gmail.com wrote: Hi, Does anyone know why a tablespace directory isn't automatically created in recovery? I think that it's troublesome to create all

[HACKERS] plpgsql's EXIT versus block and loop nesting

2009-05-01 Thread Tom Lane
Whilst fooling with some plpgsql code translated from Oracle, I found out that we interpret this construct differently than they do: while true loop begin -- some code that might throw unique_violation exit; exception when

[HACKERS] Throw some low-level C scutwork at me

2009-05-01 Thread Andy Lester
I've got my git clone set up, a copy of GCC 4.4 (and other compilers) at the ready, and am glad to help out on low-level scut work. Anybody need anything done? splint? valgrind? Let me know. xoxo, Andy -- Andy Lester = a...@petdance.com = www.theworkinggeek.com = AIM:petdance --

Re: [HACKERS] GCC 4.4 compiler warnings

2009-05-01 Thread Tom Lane
I wrote: Since there isn't any obvious better way to do this, I consider this warning to be a gcc bug, and have filed it accordingly: https://bugzilla.redhat.com/show_bug.cgi?id=497545 As of CVS HEAD and gcc 4.4.0-3, we seem to be warning-free in a standard build. I did not try many optional

Re: [HACKERS] idea: global temp tables

2009-05-01 Thread Greg Stark
On Wed, Apr 29, 2009 at 4:24 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: I understand not everyone has a need for such a thing, but isn't that true of most features in PostgreSQL? Well I think implementing a feature which only works if it's used at low transaction rates as a

Re: [HACKERS] idea: global temp tables

2009-05-01 Thread Peter Eisentraut
On Tuesday 28 April 2009 19:38:25 Tom Lane wrote: One thing I just noticed is that the spec does not consider GLOBAL/LOCAL to be optional --- per spec you *must* write one or the other in front of TEMPORARY. So we could adopt the view that omitting this keyword implies our current non-spec

Re: [HACKERS] idea: global temp tables

2009-05-01 Thread Zdenek Kotala
Dne 28.04.09 16:59, Alvaro Herrera napsal(a): Pavel Stehule escribió: Maybe we could make this work by fiddling with a different smgr -- on it, smgr_sync would be a noop, as would smgr_immedsync, and we could kludge something up to truncate relations during recovery. Maybe set path like

Re: [HACKERS] idea: global temp tables

2009-05-01 Thread Kevin Grittner
Peter Eisentraut pete...@gmx.net wrote: On the matter of LOCAL/GLOBAL, I think the correct thing to do is to reject LOCAL and accept GLOBAL as equivalent to the default. Oops. Read that too quickly before my first reply. I think that we should, as Tom said, warn on *both* for 8.4, and

Re: [HACKERS] idea: global temp tables

2009-05-01 Thread Peter Eisentraut
The archives for this thread http://archives.postgresql.org//pgsql-hackers/2009-04/threads.php#01329 show a bunch of missing messages. Were they being stored in a temporary table? Anywhere, here is what I had meant to say but only got through to a few ... On Tuesday 28 April 2009 19:38:25

Re: [HACKERS] idea: global temp tables

2009-05-01 Thread Kevin Grittner
James Mansion ja...@mansionfamily.plus.com wrote: Wouldn't it be cleaner just to defer creation of real files to support the structures associated with a temp table until it i snecessary to spill the data from the backend's RAM? This data doesn't need to be in shared memory and the tables

[HACKERS] Perl coding style in postgresql

2009-05-01 Thread Laurent Laborde
Friendly greetings (again) ! I'm planning to patch all perl file in the postgresql source tree. But i can't find any rules other than : set tabstop=4 shiftwidth=4 noexpandtab It could be nice to define the perl coding style of postgresql somewhere on a wiki. Here is a few questions : - What is

Re: [HACKERS] UHC as a server encoding?

2009-05-01 Thread Heikki Linnakangas
Chuck McDevitt wrote: Why are certain character encodings not legal for the server_encoding? For example, we allow EUC_KR, but disallow UHC, which is a superset of EUC_KR. What are the rules for what is or is not allowed as server_encoding? A server-encoding must have the property that all

Re: [HACKERS] windows shared memory error

2009-05-01 Thread Dave Page
On Fri, May 1, 2009 at 12:59 AM, Andrew Dunstan and...@dunslane.net wrote: It strikes me that we really need to try reconnecting to the shared memory here several times, and maybe the backoff need to increase each time. On a loaded server this cause postgres to fail to restart fairly reliably.

Re: [HACKERS] Creating a tablespace directory in recovery

2009-05-01 Thread Fujii Masao
Hi, On Fri, May 1, 2009 at 10:14 AM, Robert Haas robertmh...@gmail.com wrote: Well, there's some chance that if the directories don't exist, it's because you haven't troubled to mount the correct partitions.  And in that case just blindly creating the directories will possibly lead to a

Re: [HACKERS] windows shared memory error

2009-05-01 Thread Greg Stark
On Fri, May 1, 2009 at 8:42 AM, Dave Page dp...@pgadmin.org wrote: On Fri, May 1, 2009 at 12:59 AM, Andrew Dunstan and...@dunslane.net wrote: It strikes me that we really need to try reconnecting to the shared memory here several times, and maybe the backoff need to increase each time. On a

Re: [HACKERS] plpgsql's EXIT versus block and loop nesting

2009-05-01 Thread Pavel Stehule
2009/4/30 Tom Lane t...@sss.pgh.pa.us: Whilst fooling with some plpgsql code translated from Oracle, I found out that we interpret this construct differently than they do:        while true loop            begin                -- some code that might throw unique_violation                

Re: [HACKERS] windows shared memory error

2009-05-01 Thread Dave Page
On Fri, May 1, 2009 at 11:05 AM, Greg Stark st...@enterprisedb.com wrote: Do we have any idea why it may take a short while before it gets dropped from the global namespace? Is there some demon running which only wakes up periodically? Or any specific reason it takes so long? That might give

Re: [HACKERS] Restore deleted rows

2009-05-01 Thread Greg Stark
On Wed, Apr 29, 2009 at 7:03 PM, Dimitri Fontaine dfonta...@hi-media.com wrote: The idea is to have VACUUM not discard the no more visible tuples but store them on a specific fork (which you'll want to have on a WORM (cheap) tablespace, separate issue). Then you want to be able to associate

[HACKERS] ECPG, two varchars with same name on same line

2009-05-01 Thread Heikki Linnakangas
ECPG constructs internal struct names for VARCHAR fields using the field name and line number it's defined on. In a contrived example, though, that's not unique. Consider the following example: ... EXEC SQL BEGIN DECLARE SECTION; struct teststruct1 { VARCHAR a[20]; VARCHAR

Re: [HACKERS] plpgsql's EXIT versus block and loop nesting

2009-05-01 Thread Andrew Dunstan
Tom Lane wrote: Whilst fooling with some plpgsql code translated from Oracle, I found out that we interpret this construct differently than they do: while true loop begin -- some code that might throw unique_violation exit;

Re: [HACKERS] Perl coding style in postgresql

2009-05-01 Thread Andrew Dunstan
Laurent Laborde wrote: Friendly greetings (again) ! I'm planning to patch all perl file in the postgresql source tree. But i can't find any rules other than : set tabstop=4 shiftwidth=4 noexpandtab As I posted elsewhere, use perltidy http://perltidy.sourceforge.net/ to format the code

Re: [HACKERS] User documentation on signal handling

2009-05-01 Thread Tom Lane
Gurjeet Singh singh.gurj...@gmail.com writes: I just came across this page from 6.4 docs: http://www.postgresql.org/docs/6.4/static/signals.htm Do we have any such doc in our current release? I don't think there's any table like that, but the Notes for the postgres reference page

Re: [HACKERS] idea: global temp tables

2009-05-01 Thread Robert Haas
On Thu, Apr 30, 2009 at 8:36 AM, Peter Eisentraut pete...@gmx.net wrote: The archives for this thread http://archives.postgresql.org//pgsql-hackers/2009-04/threads.php#01329 show a bunch of missing messages.  Were they being stored in a temporary table? Anywhere, here is what I had meant

Re: [HACKERS] GCC 4.4 compiler warnings

2009-05-01 Thread Andy Lester
On Apr 29, 2009, at 11:32 AM, Tom Lane wrote: As of CVS HEAD and gcc 4.4.0-3, we seem to be warning-free in a standard build. I did not try many optional build flags though. I'm also working on a set of extra-stringent build flags for GCC 4.4. The more we can get the compiler to watch

Re: [HACKERS] plpgsql's EXIT versus block and loop nesting

2009-05-01 Thread Heikki Linnakangas
Tom Lane wrote: Whilst fooling with some plpgsql code translated from Oracle, I found out that we interpret this construct differently than they do: while true loop begin -- some code that might throw unique_violation exit;

Re: [HACKERS] windows shared memory error

2009-05-01 Thread Heikki Linnakangas
Dave Page wrote: On Fri, May 1, 2009 at 12:59 AM, Andrew Dunstan and...@dunslane.net wrote: It strikes me that we really need to try reconnecting to the shared memory here several times, and maybe the backoff need to increase each time. On a loaded server this cause postgres to fail to restart

Re: [HACKERS] windows shared memory error

2009-05-01 Thread Dave Page
On Fri, May 1, 2009 at 4:10 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: Dave Page wrote: On Fri, May 1, 2009 at 12:59 AM, Andrew Dunstan and...@dunslane.net wrote: It strikes me that we really need to try reconnecting to the shared memory here several times, and maybe

Re: [HACKERS] Throw some low-level C scutwork at me

2009-05-01 Thread Tom Lane
Andy Lester a...@petdance.com writes: And if you're an Emacs person, you can help figure out what the modeline should be for Emacs, and we can get that in there, too. If you're an Emacs person, you fix it in your ~/.emacs file so that every .c file in the Postgres tree is automatically

Re: [HACKERS] windows shared memory error

2009-05-01 Thread Andrew Dunstan
Heikki Linnakangas wrote: Dave Page wrote: On Fri, May 1, 2009 at 12:59 AM, Andrew Dunstan and...@dunslane.net wrote: It strikes me that we really need to try reconnecting to the shared memory here several times, and maybe the backoff need to increase each time. On a loaded server this

Re: [HACKERS] windows shared memory error

2009-05-01 Thread Heikki Linnakangas
Dave Page wrote: On Fri, May 1, 2009 at 4:10 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: Dave Page wrote: On Fri, May 1, 2009 at 12:59 AM, Andrew Dunstan and...@dunslane.net wrote: It strikes me that we really need to try reconnecting to the shared memory here several

Re: [HACKERS] plpgsql's EXIT versus block and loop nesting

2009-05-01 Thread Tom Lane
Heikki Linnakangas heikki.linnakan...@enterprisedb.com writes: Tom Lane wrote: Aside from the question of Oracle compatibility, ISTM this behavior is at variance with what our manual says about EXIT: If no label is given, the innermost loop is terminated and the statement following END LOOP

Re: [HACKERS] Throw some low-level C scutwork at me

2009-05-01 Thread Robert Haas
On Fri, May 1, 2009 at 11:23 AM, Tom Lane t...@sss.pgh.pa.us wrote: Andy Lester a...@petdance.com writes: And if you're an Emacs person, you can help figure out what the modeline should be for Emacs, and we can get that in there, too. If you're an Emacs person, you fix it in your ~/.emacs

Re: [HACKERS] Table data exclusion patch for pg_dump

2009-05-01 Thread Tom Lane
Vadim Trochinsky m...@vadim.ws writes: This is a patch that allows choosing not to dump the data for the selected tables. Why wouldn't you just use -s ? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] Throw some low-level C scutwork at me

2009-05-01 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: Speaking of space/tab settings, one thing I'm fuzzy on is the rule for wrapping long lines. I understand that a line that extends past 80 characters has to be wrapped, but the amount of indentation on the continuation line doesn't appear to follow a

Re: [HACKERS] Throw some low-level C scutwork at me

2009-05-01 Thread Andrew Dunstan
David E. Wheeler wrote: On May 1, 2009, at 8:38 AM, Robert Haas wrote: Speaking of space/tab settings, one thing I'm fuzzy on is the rule for wrapping long lines. I understand that a line that extends past 80 characters has to be wrapped, but the amount of indentation on the continuation

Re: [HACKERS] Throw some low-level C scutwork at me

2009-05-01 Thread David E. Wheeler
On May 1, 2009, at 10:38 AM, Andrew Dunstan wrote: Please, let's not have a whole host of different indentation styles. Postgres has a well established style. Let's stick to it in both perl and C +1 David -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make

Re: [HACKERS] Throw some low-level C scutwork at me

2009-05-01 Thread David E. Wheeler
On May 1, 2009, at 8:38 AM, Robert Haas wrote: Speaking of space/tab settings, one thing I'm fuzzy on is the rule for wrapping long lines. I understand that a line that extends past 80 characters has to be wrapped, but the amount of indentation on the continuation line doesn't appear to follow

Re: [HACKERS] Throw some low-level C scutwork at me

2009-05-01 Thread David Fetter
On Fri, May 01, 2009 at 01:38:38PM -0400, Andrew Dunstan wrote: David E. Wheeler wrote: On May 1, 2009, at 8:38 AM, Robert Haas wrote: Speaking of space/tab settings, one thing I'm fuzzy on is the rule for wrapping long lines. I understand that a line that extends past 80 characters has to

Re: [HACKERS] Throw some low-level C scutwork at me

2009-05-01 Thread David E. Wheeler
On May 1, 2009, at 10:54 AM, David Fetter wrote: foreach my $element (@array) { # clear, short, idiomatic code here } instead of Rube Goldberg constructs like this: my $i; for ($i=0; $i = $#array; ++$i) { # kludges up down and sideways here } is a good idea because it makes it easier

Re: [HACKERS] Throw some low-level C scutwork at me

2009-05-01 Thread Andy Lester
If you're an Emacs person, you fix it in your ~/.emacs file so that every .c file in the Postgres tree is automatically handled with the correct mode. Surely vi apologists can make their editor do the same. Thanks for your remarkable response. I will refer to it often for months to come.

Re: [HACKERS] Throw some low-level C scutwork at me

2009-05-01 Thread David Fetter
On Fri, May 01, 2009 at 11:23:24AM -0400, Tom Lane wrote: Andy Lester a...@petdance.com writes: And if you're an Emacs person, you can help figure out what the modeline should be for Emacs, and we can get that in there, too. If you're an Emacs person, you fix it in your ~/.emacs file so

Re: [HACKERS] Creating a tablespace directory in recovery

2009-05-01 Thread Flavio Henrique Araque Gurgel
- Fujii Masao masao.fu...@gmail.com escreveu: IMO, it's not so dangerous that postgres creates the directories, which doesn't overwrite or remove any existing data. So, I thought that it's worth writing the patch to create a tablespace directory in recovery. Is this the right

Re: [HACKERS] Table data exclusion patch for pg_dump

2009-05-01 Thread Andrew Dunstan
Tom Lane wrote: Vadim Trochinsky m...@vadim.ws writes: This is a patch that allows choosing not to dump the data for the selected tables. Why wouldn't you just use -s ? You might want the whole schema and data for most but not all of the tables (e.g.

Re: [HACKERS] Table data exclusion patch for pg_dump

2009-05-01 Thread Asko Oja
How do you use -s to exclude data for some tables from otherwise full dump? Dump schema and data separately? On Fri, May 1, 2009 at 6:38 PM, Tom Lane t...@sss.pgh.pa.us wrote: Vadim Trochinsky m...@vadim.ws writes: This is a patch that allows choosing not to dump the data for the selected

Re: [HACKERS] Table data exclusion patch for pg_dump

2009-05-01 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: Tom Lane wrote: Why wouldn't you just use -s ? You might want the whole schema and data for most but not all of the tables (e.g. you might leave out a large session table for a web app). The use-case seems pretty thin to me, and the potential for

Re: [HACKERS] Throw some low-level C scutwork at me

2009-05-01 Thread Joshua D. Drake
On Fri, 2009-05-01 at 12:09 -0700, David Fetter wrote: I'd appreciate your making an argument, if you're going to, on the merits of the proposal at hand, rather than stooping to personal insult. You know better. O.k. guys let's all take a breath here. We all have our favorite editors and our

Re: [HACKERS] Table data exclusion patch for pg_dump

2009-05-01 Thread Andrew Dunstan
Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: Tom Lane wrote: Why wouldn't you just use -s ? You might want the whole schema and data for most but not all of the tables (e.g. you might leave out a large session table for a web app). The use-case seems

Re: [HACKERS] Throw some low-level C scutwork at me

2009-05-01 Thread David Fetter
On Fri, May 01, 2009 at 12:37:19PM -0700, Joshua D. Drake wrote: On Fri, 2009-05-01 at 12:09 -0700, David Fetter wrote: I'd appreciate your making an argument, if you're going to, on the merits of the proposal at hand, rather than stooping to personal insult. You know better. O.k.

Re: [HACKERS] Throw some low-level C scutwork at me

2009-05-01 Thread Andy Lester
On May 1, 2009, at 2:37 PM, Joshua D. Drake wrote: Regardless, I agree with Tom that the idea of having decorators of any kind in source or docs is a bad idea. Why is it a bad idea? I don't understand the downside of a line or two at the bottom of a source file. That being said,

Re: [HACKERS] Throw some low-level C scutwork at me

2009-05-01 Thread Andrew Dunstan
Joshua D. Drake wrote: That being said, there is no reason why we can have a section of the wiki that has .rc files for respective editors and environments that conform to .Org coding conventions. Look in src/tools/editors. Already there. For both emacs and vi. cheers andrew -- Sent

Re: [HACKERS] Table data exclusion patch for pg_dump

2009-05-01 Thread Pavel Stehule
2009/5/1 Tom Lane t...@sss.pgh.pa.us: Andrew Dunstan and...@dunslane.net writes: Tom Lane wrote: Why wouldn't you just use -s ? You might want the whole schema and data for most but not all of the tables (e.g. you might leave out a large session table for a web app). The use-case seems

Re: [HACKERS] Table data exclusion patch for pg_dump

2009-05-01 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: Well, you can shoot yourself in the foot using pg_restore's --use-list option too, but that doesn't mean it's not useful. And indeed it could be used to achieve the OP's ends, except that he would have spent useless time and space dumping the data

Re: [HACKERS] Throw some low-level C scutwork at me

2009-05-01 Thread Tom Lane
Joshua D. Drake j...@commandprompt.com writes: That being said, there is no reason why we can have a section of the wiki that has .rc files for respective editors and environments that conform to .Org coding conventions. I think we already have that in the CVS tree - look in

Re: [HACKERS] Throw some low-level C scutwork at me

2009-05-01 Thread Andrew Dunstan
Andy Lester wrote: On May 1, 2009, at 2:37 PM, Joshua D. Drake wrote: Regardless, I agree with Tom that the idea of having decorators of any kind in source or docs is a bad idea. Why is it a bad idea? I don't understand the downside of a line or two at the bottom of a source file.

Re: [HACKERS] Throw some low-level C scutwork at me

2009-05-01 Thread Tom Lane
David Fetter da...@fetter.org writes: That was truly un-called-for. I don't care who you are or what you've done because nobody gets to treat volunteers the way you did above. Well, a volunteer whose first proposed contribution is a patch to add modelines to every file in the tree (with the

Re: [HACKERS] Throw some low-level C scutwork at me

2009-05-01 Thread Joshua D. Drake
On Fri, 2009-05-01 at 14:44 -0500, Andy Lester wrote: On May 1, 2009, at 2:37 PM, Joshua D. Drake wrote: Regardless, I agree with Tom that the idea of having decorators of any kind in source or docs is a bad idea. Why is it a bad idea? I don't understand the downside of a line or

Re: [HACKERS] Throw some low-level C scutwork at me

2009-05-01 Thread Andy Lester
Because it becomes one more maintenance task we don't need. There should be nothing to maintain, if it's done right. The linux kernel is a mess. There are a couple of hundred files with inconssistent mode lines. Most have none (and there are thousands). So it sounds like they could

Re: [HACKERS] Throw some low-level C scutwork at me

2009-05-01 Thread Andy Lester
Well, a volunteer whose first proposed contribution is a patch to add modelines to every file in the tree (with the clear subtext that we're idiots to not have thought of it before) No subtext at all. Perhaps the volunteer figured nobody ever bothered with it before. should expect a bit

Re: [HACKERS] Throw some low-level C scutwork at me

2009-05-01 Thread Tom Lane
Andy Lester a...@petdance.com writes: So we're hardly alone in not doing it the way you're suggesting. Sure, and I'm sure there are plenty of projects that do use them to great effect, most notably Perl 5 and Parrot. Perl 5 specifically has had the mish-mosh of tabs-vs-spaces reduced by

Re: [HACKERS] Throw some low-level C scutwork at me

2009-05-01 Thread Dimitri Fontaine
Hi, Le 1 mai 09 à 22:02, Andy Lester a écrit : Because it becomes one more maintenance task we don't need. There should be nothing to maintain, if it's done right. Any line in the source tree will have to get maintained, or why would you spend any time writing it? So it sounds like

Re: [HACKERS] Throw some low-level C scutwork at me

2009-05-01 Thread Aidan Van Dyk
Well, when I read both messages, I read just as much subtext in the original message as Tom's reply. No more, no less. To take personal offence at what Tom wrote, I think you'ld need to take personal offence at the way the way the initial proposal (or rather, more the it just needs to be done)

Re: [HACKERS] Throw some low-level C scutwork at me

2009-05-01 Thread Andy Lester
There should be nothing to maintain, if it's done right. Any line in the source tree will have to get maintained, or why would you spend any time writing it? I meant by hand. See doc/FAQ_DEV and those specific lines: I see no such file. Perhaps it doesn't get exported into the git

Re: [HACKERS] Throw some low-level C scutwork at me

2009-05-01 Thread Joshua D. Drake
On Fri, 2009-05-01 at 15:35 -0500, Andy Lester wrote: There should be nothing to maintain, if it's done right. Any line in the source tree will have to get maintained, or why would you spend any time writing it? I meant by hand. See doc/FAQ_DEV and those specific lines: I see

Re: [HACKERS] Throw some low-level C scutwork at me

2009-05-01 Thread Andy Lester
On May 1, 2009, at 3:46 PM, Joshua D. Drake wrote: See doc/FAQ_DEV and those specific lines: I see no such file. Perhaps it doesn't get exported into the git mirror? It is actually: http://wiki.postgresql.org/wiki/Developer_FAQ I understand that the FAQ is on the wiki. What I am

Re: [HACKERS] Table data exclusion patch for pg_dump

2009-05-01 Thread Jaime Casanova
On Fri, May 1, 2009 at 2:25 PM, Andrew Dunstan and...@dunslane.net wrote: Tom Lane wrote: Vadim Trochinsky m...@vadim.ws writes: This is a patch that allows choosing not to dump the data for the selected tables. Why wouldn't you just use -s ? You might want the whole schema and data

[HACKERS] Gist consistent and compression

2009-05-01 Thread Yeb Havinga
Hello list, An idea for possible improvement of query speed on gist indexes with a costly compression function. We have a gist index that uses a compressed internal datatype. The compression is with some cost (it involves a syscache lookup). The functions called by the consistent functions

Re: [HACKERS] windows shared memory error

2009-05-01 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: It strikes me that we really need to try reconnecting to the shared memory here several times, and maybe the backoff need to increase each time. Adding a backoff would make the code significantly more complex, with no gain that I can see. Just loop

Re: [HACKERS] Creating a tablespace directory in recovery

2009-05-01 Thread Tom Lane
Fujii Masao masao.fu...@gmail.com writes: ISTM that there is currently no unified policy of whether to automatically create the directory specified by an user. I think it's reasonably consistent: we don't automatically recreate directories that are likely to be symlinks to someplace outside

Re: [HACKERS] windows shared memory error

2009-05-01 Thread Andrew Dunstan
Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: It strikes me that we really need to try reconnecting to the shared memory here several times, and maybe the backoff need to increase each time. Adding a backoff would make the code significantly more complex, with no gain

Re: [HACKERS] windows shared memory error

2009-05-01 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: We've seen similar things with other Windows file operations, IIRC. What bothers me is that the problem might be precisely because the 1 second sleep between the CloseHandle() call and the CreateFileMapping() call might not be enough due to system

Re: [HACKERS] windows shared memory error

2009-05-01 Thread Andrew Dunstan
Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: We've seen similar things with other Windows file operations, IIRC. What bothers me is that the problem might be precisely because the 1 second sleep between the CloseHandle() call and the CreateFileMapping() call might not be

Re: [HACKERS] Throw some low-level C scutwork at me

2009-05-01 Thread Greg Stark
-- Greg On 1 May 2009, at 21:09, David Fetter da...@fetter.org wrote: On Fri, May 01, 2009 at 11:23:24AM -0400, Tom Lane wrote: We had a similar thing for awhile with the .sgml files, and got rid of that because it sucked ... I'd appreciate your making an argument, if you're

Re: [HACKERS] Throw some low-level C scutwork at me

2009-05-01 Thread Dimitri Fontaine
Le 1 mai 09 à 22:56, Andy Lester a écrit : http://wiki.postgresql.org/wiki/Developer_FAQ I understand that the FAQ is on the wiki. What I am saying is that my git repo does not have doc/FAQ_DEV. I didn't see it scroll by in the CVS repo that I'm rsyncing, either. Sorry:

Re: [HACKERS] Throw some low-level C scutwork at me

2009-05-01 Thread Joshua D. Drake
On Fri, 2009-05-01 at 15:56 -0500, Andy Lester wrote: On May 1, 2009, at 3:46 PM, Joshua D. Drake wrote: See doc/FAQ_DEV and those specific lines: I see no such file. Perhaps it doesn't get exported into the git mirror? It is actually:

Re: [HACKERS] Throw some low-level C scutwork at me

2009-05-01 Thread Alvaro Herrera
Andy Lester wrote: I've got my git clone set up, a copy of GCC 4.4 (and other compilers) at the ready, and am glad to help out on low-level scut work. Anybody need anything done? splint? valgrind? Let me know. If you have some time to kill, perhaps you could check the Coverity bug list

Re: [HACKERS] Throw some low-level C scutwork at me

2009-05-01 Thread Robert Haas
On Fri, May 1, 2009 at 4:35 PM, Andy Lester a...@petdance.com wrote: There should be nothing to maintain, if it's done right. Any line in the source tree will have to get maintained, or why would you spend any time writing it? I meant by hand. See doc/FAQ_DEV and those specific lines: I

Re: [HACKERS] possible bug in cover density ranking?

2009-05-01 Thread Sushant Sinha
I see this as open items here http://wiki.postgresql.org/wiki/PostgreSQL_8.4_Open_Items Any interest in fixing this? -Sushant. On Thu, 2009-01-29 at 13:54 -0500, Sushant Sinha wrote: On Thu, Jan 29, 2009 at 12:38 PM, Teodor Sigaev teo...@sigaev.ru wrote: Is this what is

[HACKERS] [OT?] how postgresql fits in

2009-05-01 Thread Vinicius Abrahao
FYI: http://www.osnews.com/staff/permalink.php/3447/being_at_the_mysql_user_conference:_how_postgres_fits_in.html

Re: [HACKERS] windows shared memory error

2009-05-01 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: I am seeing Postgres 8.3.7 running as a service on Windows Server 2003 repeatedly fail to restart after a backend crash because of the following code in port/win32_shmem.c: On further review, I see an entirely different explanation for possible