Re: [HACKERS] autovacuum and reloptions

2008-10-14 Thread Euler Taveira de Oliveira
Alvaro Herrera escreveu: > So I gave up waiting for someone else to do the reloptions patch for > autovacuum and started work on it myself. What I soon discovered is > that on first blush it seems a lot easier than I had expected. > Sorry about that. :( I was swamped with PGCon Brasil and then I

[HACKERS] Annoying error messages in _dosmaperr

2008-10-14 Thread ITAGAKI Takahiro
Hello, I found that pg_resetxlog always prints the following message on Windows. mapped win32 error code 2 to 2 Can we supress this annoying message? It seems to come from _dosmaperr, but the error "postmaster.pid is not found" is a *normal* situation in pg_resetxlog. -> open("%s/postma

Re: [HACKERS] Bogus attribute-number range checks in spi.c

2008-10-14 Thread Tom Lane
Gregory Stark <[EMAIL PROTECTED]> writes: > Tom Lane <[EMAIL PROTECTED]> writes: >> * tupdesc has fewer columns than the tuple does. I think this can >> happen in certain inheritance cases --- we might be inspecting a child >> tuple using a parent's tupdesc. > There are some comments in the sourc

Re: [HACKERS] Bogus attribute-number range checks in spi.c

2008-10-14 Thread Tom Lane
Gregory Stark <[EMAIL PROTECTED]> writes: > Tom Lane <[EMAIL PROTECTED]> writes: >> * tupdesc has more columns than the tuple does. This is possible after >> ALTER TABLE ADD COLUMN, for example. The correct interpretation in >> this situation is that the extra columns exist but are NULL. Throwin

Re: [HACKERS] Bogus attribute-number range checks in spi.c

2008-10-14 Thread Gregory Stark
Tom Lane <[EMAIL PROTECTED]> writes: > * tupdesc has more columns than the tuple does. This is possible after > ALTER TABLE ADD COLUMN, for example. The correct interpretation in > this situation is that the extra columns exist but are NULL. Throwing > an error is not correct. The code perhap

Re: [HACKERS] Window Functions

2008-10-14 Thread Hitoshi Harada
2008/10/15 Andreas Joseph Krogh <[EMAIL PROTECTED]>: > On Tuesday 14 October 2008 18:19:07 Hannu Krosing wrote: >> On Tue, 2008-10-14 at 11:05 +0200, Andreas Joseph Krogh wrote: >> > Hi all. >> > This is not very "hackers"-related, but related to the topic of >> > window-funcitons, which seems to

Re: [HACKERS] How is random_page_cost=4 ok?

2008-10-14 Thread Bruce Momjian
Nikolas Everett wrote: > > > > In any case your experience doesn't match mine. On a machine with a sizable > > raid controller setting random_page_cost higher does generate, as expected, > > plans with more bitmap heap scans which are in fact faster. > > > > We're running postgres backed by a NetA

Re: [HACKERS] minimal update

2008-10-14 Thread Andrew Dunstan
Bruce, did you ever look at completing this? cheers andrew Andrew Dunstan wrote: Bruce Momjian wrote: Andrew Dunstan wrote: Right. In fact, I already had that part in fact - see http://people.planetpostgresql.org/andrew/index.php?/archives/22-Minimal-Update-Trigger.html What I was

Re: [HACKERS] Improving planner variable handling

2008-10-14 Thread Tom Lane
Gregory Stark <[EMAIL PROTECTED]> writes: > Tom Lane <[EMAIL PROTECTED]> writes: >> * When we have a non-nullable expression in a sub-select's targetlist, >> and it's below an outer join, replace the expression by >> CASE WHEN flag_var THEN original_expression ELSE NULL END >> and then flatten as n

Re: [HACKERS] Improving planner variable handling

2008-10-14 Thread Gregory Stark
Tom Lane <[EMAIL PROTECTED]> writes: > * When we have a non-nullable expression in a sub-select's targetlist, > and it's below an outer join, replace the expression by > CASE WHEN flag_var THEN original_expression ELSE NULL END > and then flatten as normal. I don't understand how this gets

[HACKERS] Bogus attribute-number range checks in spi.c

2008-10-14 Thread Tom Lane
The various exported functions in spi.c that take an attribute number are not consistent about how they range-check it --- some test against tupdesc->natts and some against HeapTupleHeaderGetNatts(tuple). (Look for references to SPI_ERROR_NOATTRIBUTE to see what I'm talking about.) I'm thinking th

Re: [HACKERS] Version Number Function?

2008-10-14 Thread David E. Wheeler
On Oct 14, 2008, at 14:50, Hannu Krosing wrote: Was current_setting('server_version') available in 8.1 ? Yes. In 8.0, too. There must be a way to get string_to_array() to evaluate only once, yes? SELECT s.a[1]::int * 1 + s.a[2]::int * 100 + s.a[3]::int FROM (SELECT string_to_array(cur

Re: [HACKERS] spoonbill is failing citext test

2008-10-14 Thread Stefan Kaltenbrunner
Andrew Dunstan wrote: Tom Lane wrote: the other problem is that each of those failures leaves spoonbill with a running postgresql instance that causes a follow up failure with the next buildfarm run I think this is a known buildfarm-script problem --- it forgets to shut down the inst

Re: [HACKERS] Version Number Function?

2008-10-14 Thread Hannu Krosing
On Tue, 2008-10-14 at 09:53 -0700, David E. Wheeler wrote: > On Oct 14, 2008, at 08:33, David E. Wheeler wrote: > > > Well, the C version I borrowed from dumpitils seems to work great. > > Any reason I shouldn't stay with that? > > Also, here's a simpler SQL version, for those following along a

Re: [HACKERS] The Axe list

2008-10-14 Thread Robert Treat
On Monday 13 October 2008 04:53:44 Markus Wanner wrote: > Hi, > > Josh Berkus wrote: > > So it sounds like intagg is still in use/development. But ... is it > > more of an example, or is it useful as a type/function in production? > > We use it in production for quite remarkable speedups of operat

Re: [HACKERS] spoonbill is failing citext test

2008-10-14 Thread Andrew Dunstan
Tom Lane wrote: the other problem is that each of those failures leaves spoonbill with a running postgresql instance that causes a follow up failure with the next buildfarm run I think this is a known buildfarm-script problem --- it forgets to shut down the installed postmaster if the

Re: [HACKERS] Version Number Function?

2008-10-14 Thread David E. Wheeler
On Oct 14, 2008, at 14:32, Hannu Krosing wrote: On Tue, 2008-10-14 at 08:33 -0700, David E. Wheeler wrote: Well, the C version I borrowed from dumpitils seems to work great. Any reason I shouldn't stay with that? SQL is the only "PL" available by default, no need to compile or install an

Re: [HACKERS] TODO item: adding VERBOSE option to CLUSTER [with patch]

2008-10-14 Thread Robert Treat
On Monday 13 October 2008 16:45:35 Joshua Drake wrote: > On Mon, 13 Oct 2008 15:34:04 -0500 > > "Kevin Grittner" <[EMAIL PROTECTED]> wrote: > > ccdev=# select pg_total_relation_size('"DbTranImageStatus"'); > > pg_total_relation_size > > > > 253952 > > (1 r

Re: [HACKERS] Version Number Function?

2008-10-14 Thread Hannu Krosing
On Tue, 2008-10-14 at 08:33 -0700, David E. Wheeler wrote: > Well, the C version I borrowed from dumpitils seems to work great. Any > reason I shouldn't stay with that? SQL is the only "PL" available by default, no need to compile or install anything. It can be written more effectively in almos

Re: [HACKERS] Window Functions

2008-10-14 Thread Hannu Krosing
On Tue, 2008-10-14 at 19:04 +0200, Andreas Joseph Krogh wrote: > On Tuesday 14 October 2008 18:19:07 Hannu Krosing wrote: > > On Tue, 2008-10-14 at 11:05 +0200, Andreas Joseph Krogh wrote: > > > Hi all. > > > This is not very "hackers"-related, but related to the topic of > > > window-funcitons, w

Re: [HACKERS] spoonbill is failing citext test

2008-10-14 Thread Tom Lane
Stefan Kaltenbrunner <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Perhaps Stefan can run the test manually and get us a readable diff. > well what we are looking at here are actually two issues - one is the > regression failure - diff -a produces: > http://www.kaltenbrunner.cc/files/citext.di

Re: [HACKERS] spoonbill is failing citext test

2008-10-14 Thread Stefan Kaltenbrunner
David E. Wheeler wrote: On Oct 14, 2008, at 14:00, Stefan Kaltenbrunner wrote: well what we are looking at here are actually two issues - one is the regression failure - diff -a produces: http://www.kaltenbrunner.cc/files/citext.diff.txt Am I reading that right? Is there really just an issu

Re: [HACKERS] WITH RECURSIVE ... CYCLE in vanilla SQL: issues with arrays of rows

2008-10-14 Thread Merlin Moncure
On Tue, Oct 14, 2008 at 10:59 AM, Tom Lane <[EMAIL PROTECTED]> wrote: > "Merlin Moncure" <[EMAIL PROTECTED]> writes: >> Here is another use-case solved by the patch. Previously, there was >> no easy way to index on a composite function result. The following >> works in HEAD: > >> create function

Re: [HACKERS] spoonbill is failing citext test

2008-10-14 Thread Andrew Dunstan
Stefan Kaltenbrunner wrote: Tom Lane wrote: Alvaro Herrera <[EMAIL PROTECTED]> writes: Maybe we should pass -a to diff so that it displays the difference even if it thinks the file is binary. Unfortunately not portable: $ /usr/bin/diff -a foo bar /usr/bin/diff: illegal option -- a

Re: [HACKERS] spoonbill is failing citext test

2008-10-14 Thread David E. Wheeler
On Oct 14, 2008, at 14:00, Stefan Kaltenbrunner wrote: well what we are looking at here are actually two issues - one is the regression failure - diff -a produces: http://www.kaltenbrunner.cc/files/citext.diff.txt Am I reading that right? Is there really just an issue of a different numbe

Re: [HACKERS] Is autovacuum too noisy about orphan temp tables?

2008-10-14 Thread Alvaro Herrera
Tom Lane wrote: > ITAGAKI Takahiro <[EMAIL PROTECTED]> writes: > > Standard DBAs are blind to LOG level messages. > > Indeed, which is why I'm not too concerned about Heikki's complaint. Well, if the disk fills up due to excessive LOG entries, they won't be so blind. I think just adding the HIN

Re: [HACKERS] Is autovacuum too noisy about orphan temp tables?

2008-10-14 Thread Tom Lane
ITAGAKI Takahiro <[EMAIL PROTECTED]> writes: > Why can't we drop orphan temp tables automatically? See prior discussion --- it was deemed too risky. What if there's a bug in the determination of what's an orphan temp table? > Standard DBAs are blind to LOG level messages. Indeed, which is why I

Re: [HACKERS] spoonbill is failing citext test

2008-10-14 Thread Stefan Kaltenbrunner
Tom Lane wrote: Alvaro Herrera <[EMAIL PROTECTED]> writes: Maybe we should pass -a to diff so that it displays the difference even if it thinks the file is binary. Unfortunately not portable: $ /usr/bin/diff -a foo bar /usr/bin/diff: illegal option -- a usage: diff [ -C n ] [ -S name

Re: [HACKERS] There's some sort of race condition with the new FSM stuff

2008-10-14 Thread Tom Lane
Heikki Linnakangas <[EMAIL PROTECTED]> writes: > The bug only affected fsync/forget requests that are forwarded from > backends, not the ones that bgwriter puts into the hash table itself. Oh, of course. So the actual sequence of events was: * bgwriter queues an fsync request for a FSM

Re: [HACKERS] spoonbill is failing citext test

2008-10-14 Thread Andrew Dunstan
Aidan Van Dyk wrote: * Tom Lane <[EMAIL PROTECTED]> [081014 16:08]: Alvaro Herrera <[EMAIL PROTECTED]> writes: Maybe we should pass -a to diff so that it displays the difference even if it thinks the file is binary. Unfortunately not portable: $ /usr/bin/diff -a foo bar /usr/

Re: [HACKERS] spoonbill is failing citext test

2008-10-14 Thread Aidan Van Dyk
* Tom Lane <[EMAIL PROTECTED]> [081014 16:08]: > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > Maybe we should pass -a to diff so that it displays the difference even > > if it thinks the file is binary. > > Unfortunately not portable: > > $ /usr/bin/diff -a foo bar > /usr/bin/diff: illegal opti

Re: [HACKERS] spoonbill is failing citext test

2008-10-14 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Maybe we should pass -a to diff so that it displays the difference even > if it thinks the file is binary. Unfortunately not portable: $ /usr/bin/diff -a foo bar /usr/bin/diff: illegal option -- a usage: diff [ -C n ] [ -S name ] [ -bcefhilnrst

Re: [HACKERS] There's some sort of race condition with the new FSM stuff

2008-10-14 Thread Heikki Linnakangas
Tom Lane wrote: Heikki Linnakangas <[EMAIL PROTECTED]> writes: Zdenek Kotala wrote: For security reason any OS should clean memory pages before process first touches them. Yeah. But it doesn't necessarily need to fill them with zeros, any garbage will do. Yeah, but the observed symptoms se

Re: [HACKERS] There's some sort of race condition with the new FSM stuff

2008-10-14 Thread Tom Lane
Heikki Linnakangas <[EMAIL PROTECTED]> writes: > Zdenek Kotala wrote: >> Tom Lane napsal(a): >>> Hmm ... AFAICS this mistake would mean that no forknum field of the >>> requests[] array ever gets set at all, so they would stay at whatever >>> the virgin value in the shmem segment had been. Perhaps

Re: [HACKERS] spoonbill is failing citext test

2008-10-14 Thread David E. Wheeler
On Oct 14, 2008, at 12:36, Alvaro Herrera wrote: I don't know if you have noticed, but the spoonbill buildfarm member is failing the citext test. Unfortunately the regression diff is not very helpful: Binary files /home/pgbuild/pgbuildfarm/HEAD/pgsql.2397/contrib/ citext/expected/citext.o

Re: [HACKERS] Improving planner variable handling

2008-10-14 Thread Tom Lane
Back in April I posted some musings about improving the planner's handling of variables that could be forced to null by outer joins: http://archives.postgresql.org/pgsql-hackers/2008-04/msg01063.php I haven't gotten anything further done on that, and time grows short for 8.4. I am still intereste

Re: [HACKERS] Version Number Function?

2008-10-14 Thread Robert Haas
> There must be a way to get string_to_array() to evaluate only once, yes? WITH, but that's not going to help you for backward compatibility. If you used plpgsql you could assign the string_to_array result to a variable and then work off the variable, but I'm not sure that's really better. ...Ro

[HACKERS] spoonbill is failing citext test

2008-10-14 Thread Alvaro Herrera
Hi, I don't know if you have noticed, but the spoonbill buildfarm member is failing the citext test. Unfortunately the regression diff is not very helpful: Binary files /home/pgbuild/pgbuildfarm/HEAD/pgsql.2397/contrib/citext/expected/citext.out and /home/pgbuild/pgbuildfarm/HEAD/pgsql.2397/co

Re: [HACKERS] There's some sort of race condition with the new FSM stuff

2008-10-14 Thread Heikki Linnakangas
Zdenek Kotala wrote: Tom Lane napsal(a): Heikki Linnakangas <[EMAIL PROTECTED]> writes: I still wonder, though, why we're seeing the error consistently on kudu, and not on any other animal. Perhaps the forknum field that's left uninitialized gets a different value there than on other platforms

Re: [HACKERS] Updates of SE-PostgreSQL 8.4devel patches

2008-10-14 Thread Bruce Momjian
Andrew Sullivan wrote: > On Fri, Oct 10, 2008 at 01:09:48PM +0900, KaiGai Kohei wrote: > > >> 4. Metadata-level access controls. None of the proposals so far seem > >> to provide a complete set of access controls for the system details -- > >> schemas, databases, &c. Such controls are often req

[HACKERS] Constraint partition index usage

2008-10-14 Thread Michael Glaesemann
We've been looking at breaking out some of our larger logging-type tables (INSERT only, other than DELETEs for regularly removing old rows for maintenance) using constraint partitioning to avoid the need for heavy vacuuming. For some cases it's working well. In others, we're running into pe

[HACKERS] Deriving Recovery Snapshots

2008-10-14 Thread Simon Riggs
I've worked out what I think is a workable, efficient process for deriving snapshots during recovery. I will be posting a patch to show how this works tomorrow [Wed 15 Oct], just doing cleanup now. Recovery Snapshots are snapshots taken during recovery. They are valid snapshots in all ways for tes

[HACKERS] Question about implementing a new operation

2008-10-14 Thread Zhe He
I'm currently implement a new operation in Postgres. If I want to get all tuples of a single attribute table to create an array defined by myself, how can I do that? -Zhe -- Best Regards, Zhe HE TEL: (001) 646-789-3008 Address:965 Amsterdam Avenue, New York, NY 10025 Master Student, CS Dept. C

Re: [HACKERS] Window Functions

2008-10-14 Thread Andreas Joseph Krogh
On Tuesday 14 October 2008 18:19:07 Hannu Krosing wrote: > On Tue, 2008-10-14 at 11:05 +0200, Andreas Joseph Krogh wrote: > > Hi all. > > This is not very "hackers"-related, but related to the topic of > > window-funcitons, which seems to be discussed quite a bit on "hackers" > > these days. > >

Re: [HACKERS] Version Number Function?

2008-10-14 Thread David E. Wheeler
On Oct 14, 2008, at 08:33, David E. Wheeler wrote: Well, the C version I borrowed from dumpitils seems to work great. Any reason I shouldn't stay with that? Also, here's a simpler SQL version, for those following along at home: create or replace function pg_version_num() returns int language

Re: [HACKERS] Transactions and temp tables

2008-10-14 Thread Alvaro Herrera
Emmanuel Cecchet wrote: > Emmanuel Cecchet wrote: >> Here is the latest patch and the regression tests for the temp tables >> and 2PC issue. >> Is there a way to stop and restart postmaster between 2 tests? >> >> Thanks for your feedback, >> Emmanuel > I did not get any comment on that one. > How

Re: [HACKERS] autovacuum and reloptions

2008-10-14 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> God, no. GUC is hopelessly complex already, we should *not* try to make >> it track different values of a parameter for different tables. > Are there any more specific reasons than "it's very complex"? That one seems quite suffici

[HACKERS] Problem to get the tuple of a table

2008-10-14 Thread Zhe He
I'm currently implement a new operation in Postgres. If I want to get all tuples of a single attribute table to create an array defined by myself, how can I do that? -Zhe

Re: [HACKERS] Transactions and temp tables

2008-10-14 Thread Emmanuel Cecchet
Emmanuel Cecchet wrote: Here is the latest patch and the regression tests for the temp tables and 2PC issue. Is there a way to stop and restart postmaster between 2 tests? Thanks for your feedback, Emmanuel I did not get any comment on that one. How should I proceed so that the patch integrati

Re: [HACKERS] Window Functions

2008-10-14 Thread Hannu Krosing
On Tue, 2008-10-14 at 11:05 +0200, Andreas Joseph Krogh wrote: > Hi all. > This is not very "hackers"-related, but related to the topic of > window-funcitons, which seems to be discussed quite a bit on "hackers" these > days. > > Can window-functions in PG be used to return "total number of rows

Re: [HACKERS] CLUSTER, REINDEX, VACUUM in "read only" transaction?

2008-10-14 Thread Peter Eisentraut
Tom Lane wrote: So I was looking for other omissions in utility.c, and I noticed that check_xact_readonly() doesn't reject CLUSTER, REINDEX, or VACUUM. Now the notion of "read only" that we're trying to enforce is pretty weak (I think it's effectively "no writes to non-temp tables"). But I can't

Re: [HACKERS] 8.3 .4 + Vista + MingW + initdb = ACCESS_DENIED

2008-10-14 Thread Dave Page
On Tue, Oct 14, 2008 at 5:12 PM, Robert Haas <[EMAIL PROTECTED]> wrote: >>> I'm not so sure that non-console terminal service sessions should be >>> categorized as "pretty rare". >>> >>> I use them routinely. >> >> For installing and running Postgres? Note that we're not talking about >> running cl

Re: [HACKERS] 8.3 .4 + Vista + MingW + initdb = ACCESS_DENIED

2008-10-14 Thread Robert Haas
>> I'm not so sure that non-console terminal service sessions should be >> categorized as "pretty rare". >> >> I use them routinely. > > For installing and running Postgres? Note that we're not talking about > running clients apps here, but the server itself. Sure, why not? I mean, I've come acro

Re: [HACKERS] There's some sort of race condition with the new FSM stuff

2008-10-14 Thread Zdenek Kotala
Tom Lane napsal(a): Heikki Linnakangas <[EMAIL PROTECTED]> writes: I still wonder, though, why we're seeing the error consistently on kudu, and not on any other animal. Perhaps the forknum field that's left uninitialized gets a different value there than on other platforms. Hmm ... AFAICS thi

Re: [HACKERS] patch: Allow the UUID type to accept non-standard formats

2008-10-14 Thread Peter Eisentraut
Dawid Kuroczko wrote: 2) The '-' is not the only character that people have used. ClearCase uses '.' and ':' as punctuation. I would be more in favor of accepting MAC-address style notation AA:BB:CC:DD also, in that case, but I think its going too far... So, I am for sticking with dashes and

Re: [HACKERS] Version Number Function?

2008-10-14 Thread David E. Wheeler
Well, the C version I borrowed from dumpitils seems to work great. Any reason I shouldn't stay with that? Best, David Sent from my iPhone On Oct 14, 2008, at 7:44, Hannu Krosing <[EMAIL PROTECTED]> wrote: On Sun, 2008-10-12 at 14:39 -0700, David E. Wheeler wrote: On Oct 12, 2008, at 14:11

Re: [HACKERS] autovacuum and reloptions

2008-10-14 Thread Peter Eisentraut
Tom Lane wrote: Gregory Stark <[EMAIL PROTECTED]> writes: I wonder if we could piggy-back on guc parameters. God, no. GUC is hopelessly complex already, we should *not* try to make it track different values of a parameter for different tables. Are there any more specific reasons than "it's

Re: [HACKERS] Updates of SE-PostgreSQL 8.4devel patches

2008-10-14 Thread Peter Eisentraut
Andrew Sullivan wrote: On Wed, Oct 08, 2008 at 11:36:19AM +0900, KaiGai Kohei wrote: Yes, unfortunatelly. No one replied to my proposed design: http://marc.info/?l=pgsql-hackers&m=12470930544&w=2 FWIW, I didn't know what to say about that proposal because I still don't know what problems

Re: [HACKERS] Updates of SE-PostgreSQL 8.4devel patches

2008-10-14 Thread Peter Eisentraut
Bruce Momjian wrote: KaiGai Kohei wrote: Robert Haas wrote: Can you *do* the row-level permission? I don't think there's any consensus on a design. Yes, unfortunatelly. No one replied to my proposed design: http://marc.info/?l=pgsql-hackers&m=12470930544&w=2 Yes, we got stuck on the

Re: [HACKERS] 8.3 .4 + Vista + MingW + initdb = ACCESS_DENIED

2008-10-14 Thread Dave Page
On Tue, Oct 14, 2008 at 4:19 PM, Magnus Hagander <[EMAIL PROTECTED]> wrote: > > Not quite. The reason it's in the global namespace is to provide an > interlock preventing the starting of a postmaster in two different > sessions at the same time against the same data directory. We need to > figure o

Re: [HACKERS] 8.3 .4 + Vista + MingW + initdb = ACCESS_DENIED

2008-10-14 Thread Magnus Hagander
Tom Lane wrote: > "Robert Haas" <[EMAIL PROTECTED]> writes: >>> The user running initdb (or the postmaster) needs >>> SeCreateGlobalPrivilege - which is something we cannot really start >>> telling people they must have. My view is that we revert the change >>> (well, replace it with something that

Re: [HACKERS] 8.3 .4 + Vista + MingW + initdb = ACCESS_DENIED

2008-10-14 Thread Magnus Hagander
Dave Page wrote: > On Tue, Oct 14, 2008 at 2:33 PM, Andrew Dunstan <[EMAIL PROTECTED]> wrote: >> >> Dave Page wrote: Well - building your own Postgres 8.3 on Windows using MingW appears broken. Not sure how many people fall into that category, but its seems like a fairly major

Re: [HACKERS] WITH RECURSIVE ... CYCLE in vanilla SQL: issues with arrays of rows

2008-10-14 Thread Tom Lane
"Merlin Moncure" <[EMAIL PROTECTED]> writes: > Here is another use-case solved by the patch. Previously, there was > no easy way to index on a composite function result. The following > works in HEAD: > create function func(f foo, a out int, b out int) returns record ... > create index foo_idx

Re: [HACKERS] WITH RECURSIVE ... CYCLE in vanilla SQL: issues with arrays of rows

2008-10-14 Thread Merlin Moncure
On Mon, Oct 13, 2008 at 7:01 PM, Tom Lane <[EMAIL PROTECTED]> wrote: > "Merlin Moncure" <[EMAIL PROTECTED]> writes: >> On Mon, Oct 13, 2008 at 9:56 AM, Tom Lane <[EMAIL PROTECTED]> wrote: >>> I'm inclined to apply the patch with binary-coercibility adjustments >>> and not try to turn RECORD or RECO

Re: [HACKERS] 8.3 .4 + Vista + MingW + initdb = ACCESS_DENIED

2008-10-14 Thread Tom Lane
"Robert Haas" <[EMAIL PROTECTED]> writes: >> The user running initdb (or the postmaster) needs >> SeCreateGlobalPrivilege - which is something we cannot really start >> telling people they must have. My view is that we revert the change >> (well, replace it with something that looks less like a bro

Re: [HACKERS] Version Number Function?

2008-10-14 Thread Hannu Krosing
On Sun, 2008-10-12 at 14:39 -0700, David E. Wheeler wrote: > On Oct 12, 2008, at 14:11, Tom Lane wrote: > > > You'd have to parse the result of version(). > > As I figured. This is what I'm trying: if performance is not critical, then you could use this: hannu=# create or replace function pg_ve

Re: [HACKERS] 8.3 .4 + Vista + MingW + initdb = ACCESS_DENIED

2008-10-14 Thread Dave Page
On Tue, Oct 14, 2008 at 3:31 PM, Robert Haas <[EMAIL PROTECTED]> wrote: >> The user running initdb (or the postmaster) needs >> SeCreateGlobalPrivilege - which is something we cannot really start >> telling people they must have. My view is that we revert the change >> (well, replace it with someth

Re: [HACKERS] 8.3 .4 + Vista + MingW + initdb = ACCESS_DENIED

2008-10-14 Thread Robert Haas
> The user running initdb (or the postmaster) needs > SeCreateGlobalPrivilege - which is something we cannot really start > telling people they must have. My view is that we revert the change > (well, replace it with something that looks less like a broken attempt > to use the global namespace) and

Re: [HACKERS] log shipping pg_standby

2008-10-14 Thread Kevin Grittner
>>> Dave Cramer <[EMAIL PROTECTED]> wrote: > After terminating recovery mode by creating a trigger file postgres > starts up and complains about missing WAL files in pg_xlog; The last > two which were replayed. Is this normal ? It is normal for recovery to ask for one or more files a second

Re: [HACKERS] 8.3 .4 + Vista + MingW + initdb = ACCESS_DENIED

2008-10-14 Thread Dave Page
On Tue, Oct 14, 2008 at 2:33 PM, Andrew Dunstan <[EMAIL PROTECTED]> wrote: > > > Dave Page wrote: >>> >>> Well - building your own Postgres 8.3 on Windows using MingW appears >>> broken. >>> Not sure how many people fall into that category, but its seems like a >>> fairly major issue. >>> >> >> Ve

Re: [HACKERS] 8.3 .4 + Vista + MingW + initdb = ACCESS_DENIED

2008-10-14 Thread Andrew Dunstan
Dave Page wrote: Well - building your own Postgres 8.3 on Windows using MingW appears broken. Not sure how many people fall into that category, but its seems like a fairly major issue. Very few people build their own Postgres on Windows, because it's not exactly straightforward to do b

Re: [HACKERS] Is autovacuum too noisy about orphan temp tables?

2008-10-14 Thread ITAGAKI Takahiro
Tom Lane <[EMAIL PROTECTED]> wrote: > Heikki Linnakangas <[EMAIL PROTECTED]> writes: > > LOG: autovacuum: found orphan temp table "pg_temp_2"."foo" in database > > "postgres" > > What else would you do? I can't see adding state to remember when we > printed it last. Why can't we drop orphan

Re: [HACKERS] Is autovacuum too noisy about orphan temp tables?

2008-10-14 Thread Tom Lane
Heikki Linnakangas <[EMAIL PROTECTED]> writes: > LOG: autovacuum: found orphan temp table "pg_temp_2"."foo" in database > "postgres" > I remember the discussion when that was put in, but I'm starting to > think that printing that every time autovacuum wakes up, which is once > per minute by de

Re: [HACKERS] There's some sort of race condition with the new FSM stuff

2008-10-14 Thread Tom Lane
Heikki Linnakangas <[EMAIL PROTECTED]> writes: > I still wonder, though, why we're seeing the error consistently on kudu, > and not on any other animal. Perhaps the forknum field that's left > uninitialized gets a different value there than on other platforms. Hmm ... AFAICS this mistake would m

Re: [HACKERS] Proposed patch: make pg_dump --data-only consider FK constraints

2008-10-14 Thread Philip Warner
Tom Lane wrote: >> How about printing that notice at the top of the dump file as well? >> > > Hmm ... that might be feasible in plain text output, but I don't see > any easy way to get a similar effect in archive modes. > Just saw this, obviously very late, but from memory there is a TOC e

[HACKERS] log shipping pg_standby

2008-10-14 Thread Dave Cramer
After terminating recovery mode by creating a trigger file postgres starts up and complains about missing WAL files in pg_xlog; The last two which were replayed. Is this normal ? Dave -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

[HACKERS] Window Functions

2008-10-14 Thread Andreas Joseph Krogh
Hi all. This is not very "hackers"-related, but related to the topic of window-funcitons, which seems to be discussed quite a bit on "hackers" these days. Can window-functions in PG be used to return "total number of rows" in a "paged result"? Say you have: SELECT p.id, p.firstname FROM perso

[HACKERS] Updates of SE-PostgreSQL 8.4devel patches (r1120)

2008-10-14 Thread KaiGai Kohei
KaiGai Kohei wrote: OK, I decided to pay my efforts to implement row-level permission as soon as possible. Its fundamental idea is same as I posted before. It enables to assign database ACL per tuples, and enables to filter violated tuples from the result set of query. I guess we can see the ini

Re: [HACKERS] 8.3 .4 + Vista + MingW + initdb = ACCESS_DENIED

2008-10-14 Thread Vladimir Sitnikov
On Tue, Oct 14, 2008 at 12:43 PM, Charlie Savage <[EMAIL PROTECTED]> wrote: > It's on my list to discuss it with Magnus when we meet in Italy >> tomorrow. The simple fix is to back out the change that broke it, >> which leaves us in our previous broken-but-less-severely state (which >> is what we

Re: [HACKERS] 8.3 .4 + Vista + MingW + initdb = ACCESS_DENIED

2008-10-14 Thread Dave Page
On Tue, Oct 14, 2008 at 9:43 AM, Charlie Savage <[EMAIL PROTECTED]> wrote: >> It's on my list to discuss it with Magnus when we meet in Italy >> tomorrow. The simple fix is to back out the change that broke it, >> which leaves us in our previous broken-but-less-severely state (which >> is what we d

Re: [HACKERS] 8.3 .4 + Vista + MingW + initdb = ACCESS_DENIED

2008-10-14 Thread Charlie Savage
It's on my list to discuss it with Magnus when we meet in Italy tomorrow. The simple fix is to back out the change that broke it, which leaves us in our previous broken-but-less-severely state (which is what we did for the binary packages). If you mean reverting the patch that Mangus mentioned,

[HACKERS] Is autovacuum too noisy about orphan temp tables?

2008-10-14 Thread Heikki Linnakangas
While playing around, I got into the situation that I have an "orphaned temp table" in my database. The log is now slowly filling with these messages: LOG: autovacuum: found orphan temp table "pg_temp_2"."foo" in database "postgres" LOG: autovacuum: found orphan temp table "pg_temp_2"."foo"

Re: [HACKERS] xact_desc

2008-10-14 Thread Simon Riggs
On Mon, 2008-10-13 at 23:05 -0400, Tom Lane wrote: > Simon Riggs <[EMAIL PROTECTED]> writes: > > ISTM that xact_desc routines do not work properly when called with > > WAL_DEBUG enabled from XLogInsert(). > > Well, now that you mention it, that code is utterly, completely broken, > and always has

Re: [HACKERS] 8.3 .4 + Vista + MingW + initdb = ACCESS_DENIED

2008-10-14 Thread Dave Page
On Mon, Oct 13, 2008 at 10:38 PM, Andrew Dunstan <[EMAIL PROTECTED]> wrote: > > > I am getting this error on XP Pro. The buildfarm members run happily from > the scheduler, but when run by hand from the command line they fail. This is > true of both MinGW and MSVC. > It's on my list to discuss it

Re: [HACKERS] There's some sort of race condition with the new FSM stuff

2008-10-14 Thread Heikki Linnakangas
Tom Lane wrote: I wrote: Two different buildfarm machines are currently showing the same failure: ERROR: could not fsync segment 0 of relation 1663/16384/29270/1: No such file or directory ERROR: checkpoint request failed Some tests show that when the serial regression tests are run in a fr

Re: [HACKERS] WITH RECURSIVE ... CYCLE in vanilla SQL: issues with arrays of rows

2008-10-14 Thread David Fetter
On Mon, Oct 13, 2008 at 07:01:29PM -0400, Tom Lane wrote: > "Merlin Moncure" <[EMAIL PROTECTED]> writes: > > On Mon, Oct 13, 2008 at 9:56 AM, Tom Lane <[EMAIL PROTECTED]> wrote: > >> I'm inclined to apply the patch with binary-coercibility > >> adjustments and not try to turn RECORD or RECORD[] int