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

2008-11-21 Thread KaiGai Kohei
Bruce Momjian wrote: KaiGai Kohei wrote: Bruce Momjian wrote: KaiGai Kohei wrote: Please consider SELinux/SE-PostgreSQL requires various kind of objects (including database objects) to be labeled properly at the initial state. If it allows clients to turn on row-level security feature, it mean

Re: [HACKERS] Window functions review

2008-11-21 Thread Hitoshi Harada
2008/11/22 Heikki Linnakangas <[EMAIL PROTECTED]>: > Just to let you know, I'm hacking this patch again, the executor part in > particular. I've got a stripped out the unfinished window frame stuff, > refactored the Window object API so that the window functions don't get to, > and don't need to, a

Re: [HACKERS] Window functions review

2008-11-21 Thread Heikki Linnakangas
Just to let you know, I'm hacking this patch again, the executor part in particular. I've got a stripped out the unfinished window frame stuff, refactored the Window object API so that the window functions don't get to, and don't need to, access tuple slots directly. And a bunch of other simpli

Re: [HACKERS] RAM-only temporary tables

2008-11-21 Thread Kevin Grittner
Sorry for the late response; I was on vacation. >>> Heikki Linnakangas <[EMAIL PROTECTED]> wrote: > Kevin, what was your original scenario like that led you to investigate > this? We noticed a performance degradation in application code which, within a database transaction, looped through lar

Re: [HACKERS] Autoconf, libpq and replacement function

2008-11-21 Thread Bruce Momjian
Tom Lane wrote: > Magnus Hagander <[EMAIL PROTECTED]> writes: > > Or in the same directly, called something else. Like fnmatchstub.h. See > > attached, seems reasonable? > > Seems okay to me. Note: in future, don't bother posting configure > diffs; nobody wants to look at that, just the changes i

Re: [HACKERS] HEAD build failure on win32 mingw

2008-11-21 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> ... the file >> that is actually being delivered in snapshots still contains man1/ >> and manl/. So that file needs to be regenerated. Peter? > Shouldn't it be part of the nightly snapshot creation to make that file? > In the snaps

Re: [HACKERS] Cool hack with recursive queries

2008-11-21 Thread Bruce Momjian
Alvaro Herrera wrote: > David Fetter escribi?: > > On Fri, Nov 21, 2008 at 04:11:11PM -0500, Tom Lane wrote: > > > > This is a cool hack, agreed, but that doesn't make it a useful > > > regression test. Whatever value it might have isn't going to repay > > > the community-wide expenditure of cycl

Re: [HACKERS] Cool hack with recursive queries

2008-11-21 Thread Alvaro Herrera
David Fetter escribió: > On Fri, Nov 21, 2008 at 04:11:11PM -0500, Tom Lane wrote: > > This is a cool hack, agreed, but that doesn't make it a useful > > regression test. Whatever value it might have isn't going to repay > > the community-wide expenditure of cycles. > > What's the slowest it run

Re: [HACKERS] Cool hack with recursive queries

2008-11-21 Thread David Fetter
On Fri, Nov 21, 2008 at 04:11:11PM -0500, Tom Lane wrote: > David Fetter <[EMAIL PROTECTED]> writes: > > On Fri, Nov 21, 2008 at 09:06:13PM +0100, Zdenek Kotala wrote: > >> I takes 2.6 second on my laptop. I think it is not so bad. > > > About 2.0 on my OS/X laptop. Could this be a problem on wha

Re: [HACKERS] HEAD build failure on win32 mingw

2008-11-21 Thread Andrew Dunstan
Tom Lane wrote: It looks to me like the problem is that the makefile expects the man.tar.gz file to contain stuff in man1/ and man7/, but the file that is actually being delivered in snapshots still contains man1/ and manl/. So that file needs to be regenerated. Peter?

Re: [HACKERS] Cool hack with recursive queries

2008-11-21 Thread Tom Lane
David Fetter <[EMAIL PROTECTED]> writes: > On Fri, Nov 21, 2008 at 09:06:13PM +0100, Zdenek Kotala wrote: >> I takes 2.6 second on my laptop. I think it is not so bad. > About 2.0 on my OS/X laptop. Could this be a problem on whatever > architecture/OS/compiler combo you have? Not everyone is us

Re: [HACKERS] Cool hack with recursive queries

2008-11-21 Thread David Fetter
On Fri, Nov 21, 2008 at 09:06:13PM +0100, Zdenek Kotala wrote: > Alvaro Herrera napsal(a): >> David Fetter escribió: >>> On Wed, Nov 19, 2008 at 10:21:06PM -, David Rowley wrote: Gregory Stark wrote: > So based on Graeme Job's T-SQL hack over at thedailywtf.com I > adapted the T-SQ

Re: [HACKERS] HEAD build failure on win32 mingw

2008-11-21 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > Jaime Casanova wrote: >> i saw the same on a nightly snapshot a week ago, then used cvs and >> everything was good... i thouhgt it was a problem already solved... >> could be a problem in the nightly builds? > Yeah. Buildfarm doesn't do docs at all. >

Re: [HACKERS] Cool hack with recursive queries

2008-11-21 Thread Merlin Moncure
On Fri, Nov 21, 2008 at 3:06 PM, Zdenek Kotala <[EMAIL PROTECTED]> wrote: > > I takes 2.6 second on my laptop. I think it is not so bad. > Time: 694.512 ms :-) merlin -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgres

Re: [HACKERS] HEAD build failure on win32 mingw

2008-11-21 Thread Andrew Dunstan
Jaime Casanova wrote: On Thu, Nov 20, 2008 at 4:31 AM, ITAGAKI Takahiro <[EMAIL PROTECTED]> wrote: I used a nightly snapshot(snapshot/postgresql-snapshot.tar.bz2) and it includes *.gz files. It would be the cause. i saw the same on a nightly snapshot a week ago, then used cvs and ev

Re: [HACKERS] Cool hack with recursive queries

2008-11-21 Thread Zdenek Kotala
Alvaro Herrera napsal(a): David Fetter escribió: On Wed, Nov 19, 2008 at 10:21:06PM -, David Rowley wrote: Gregory Stark wrote: So based on Graeme Job's T-SQL hack over at thedailywtf.com I adapted the T-SQL code to Postgres and got this. Thought others might find it amusing. That's pret

Re: [HACKERS] Re: [COMMITTERS] pgsql: Silence compiler warning about ignored return value.

2008-11-21 Thread Alvaro Herrera
Robert Haas escribió: > >> Maybe syslog? > > > > Doesn't exist on Windows ... > > There is an event log though which is fairly comparable. Of course > that still leaves you with the problem of what to do when the syslog > or event log write fails. Well, syslog does not have a return code, which

Re: [HACKERS] Should enum GUCs be listed as such in config.sgml?

2008-11-21 Thread Magnus Hagander
Tom Lane wrote: > Magnus Hagander <[EMAIL PROTECTED]> writes: >> Tom Lane wrote: >>> Last I checked, Magnus had promised to come up with suitable >>> documentation changes for this patch, but then he went off sailing... > >> Meh, I seem to have forgotten this one again. Here's a suggestion, seems

Re: [HACKERS] Autoconf, libpq and replacement function

2008-11-21 Thread Tom Lane
Greg Stark <[EMAIL PROTECTED]> writes: > If you want people to stop posting configure diffs you should remove > the damn configure file from CVS where it doesn't belong. Well, that'd require everyone using CVS to have autoconf installed --- and not just any autoconf, but the specific version. S

Re: [HACKERS] Autoconf, libpq and replacement function

2008-11-21 Thread Greg Stark
If you want people to stop posting configure diffs you should remove the damn configure file from CVS where it doesn't belong. greg On 21 Nov 2008, at 06:49 PM, Tom Lane <[EMAIL PROTECTED]> wrote: Magnus Hagander <[EMAIL PROTECTED]> writes: Or in the same directly, called something else. Lik

Re: [HACKERS] HEAD build failure on win32 mingw

2008-11-21 Thread Jaime Casanova
On Thu, Nov 20, 2008 at 4:31 AM, ITAGAKI Takahiro <[EMAIL PROTECTED]> wrote: > > I used a nightly snapshot(snapshot/postgresql-snapshot.tar.bz2) > and it includes *.gz files. It would be the cause. > i saw the same on a nightly snapshot a week ago, then used cvs and everything was good... i thouhg

Re: [HACKERS] Autoconf, libpq and replacement function

2008-11-21 Thread Magnus Hagander
Tom Lane wrote: > Magnus Hagander <[EMAIL PROTECTED]> writes: >> Or in the same directly, called something else. Like fnmatchstub.h. See >> attached, seems reasonable? > > Seems okay to me. Note: in future, don't bother posting configure > diffs; nobody wants to look at that, just the changes in

Re: [HACKERS] pg_settings.enumval as array

2008-11-21 Thread Magnus Hagander
Tom Lane wrote: > Magnus Hagander <[EMAIL PROTECTED]> writes: >> Tom Lane wrote: >>> Also, the output datatype should be text[] not cstring[]. > >> Ok, will change. That requires hardcode of 1009? Or should I a #define >> to pg_type.h? > > Add a #define (bit surprising we didn't have one already)

Re: [HACKERS] Autoconf, libpq and replacement function

2008-11-21 Thread Tom Lane
Magnus Hagander <[EMAIL PROTECTED]> writes: > Or in the same directly, called something else. Like fnmatchstub.h. See > attached, seems reasonable? Seems okay to me. Note: in future, don't bother posting configure diffs; nobody wants to look at that, just the changes in the autoconf input files.

Re: [HACKERS] How should pg_standby get over the gap of timeline?

2008-11-21 Thread Fujii Masao
Hi, Simon. Thanks for the comment!! On Sat, Nov 22, 2008 at 2:09 AM, Simon Riggs <[EMAIL PROTECTED]> wrote: > > On Thu, 2008-11-20 at 22:41 +0900, Fujii Masao wrote: > >> In the current Synch Rep patch, the standby cannot catch up with the >> primary which has a bigger timeline. So, whenever makin

Re: [HACKERS] Re: [COMMITTERS] pgsql: Silence compiler warning about ignored return value.

2008-11-21 Thread Robert Haas
>> Maybe syslog? > > Doesn't exist on Windows ... There is an event log though which is fairly comparable. Of course that still leaves you with the problem of what to do when the syslog or event log write fails. ...Robert -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To

Re: [HACKERS] pg_settings.enumval as array

2008-11-21 Thread Tom Lane
Magnus Hagander <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Also, the output datatype should be text[] not cstring[]. > Ok, will change. That requires hardcode of 1009? Or should I a #define > to pg_type.h? Add a #define (bit surprising we didn't have one already) re

Re: [HACKERS] pg_settings.enumval as array

2008-11-21 Thread Magnus Hagander
Tom Lane wrote: > Magnus Hagander <[EMAIL PROTECTED]> writes: >> The attached patch changes pg_settings.enumval to be an array of text >> instead of just a string, per previous discussion and the open items list. > >> Comments? > > Hmmm ... this coding will fail if any enumval contains a double q

Re: [HACKERS] Should enum GUCs be listed as such in config.sgml?

2008-11-21 Thread Tom Lane
Magnus Hagander <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Last I checked, Magnus had promised to come up with suitable >> documentation changes for this patch, but then he went off sailing... > Meh, I seem to have forgotten this one again. Here's a suggestion, seems > ok, or were you thinki

Re: [HACKERS] fmgr.h vs funcapi.h?

2008-11-21 Thread Magnus Hagander
Tom Lane wrote: > Magnus Hagander <[EMAIL PROTECTED]> writes: >> I was writing a simple standalone function compiled with pgxs - been a >> while since I did that. > >> Including "postgres.h" and "fmgr.h", it didn't work - the backend would >> complain that the function did not exist in the shared

Re: [HACKERS] pg_settings.enumval as array

2008-11-21 Thread Tom Lane
Magnus Hagander <[EMAIL PROTECTED]> writes: > The attached patch changes pg_settings.enumval to be an array of text > instead of just a string, per previous discussion and the open items list. > Comments? Hmmm ... this coding will fail if any enumval contains a double quote. Which is probably not

Re: [HACKERS] Re: [COMMITTERS] pgsql: Silence compiler warning about ignored return value.

2008-11-21 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> I didn't say it was --- merely opined that we need a consistent plan >> about how to handle corner cases like that if we want to try to wipe out >> all the warnings of this class. > Maybe syslog? Doesn't exist on Windows ...

Re: [HACKERS] Re: [COMMITTERS] pgsql: Silence compiler warning about ignored return value.

2008-11-21 Thread Alvaro Herrera
Tom Lane wrote: > Peter Eisentraut <[EMAIL PROTECTED]> writes: > > Tom Lane wrote: > >> (Whatcha gonna do if you fail to write the postmaster log ... try to > >> log a complaint message?) > > > Well, good question, but I'm not convinced that doing nothing is always > > the best answer. > > I did

Re: [HACKERS] SSL configure patch: review

2008-11-21 Thread Magnus Hagander
Alvaro Herrera wrote: > Magnus Hagander escribió: >> Alex Hunsaker wrote: >>> On Fri, Aug 1, 2008 at 13:31, Alvaro Herrera <[EMAIL PROTECTED]> wrote: Something that's bothering me is that PGSSLKEY is inconsistent with the sslkey conninfo parameter. PGSSLKEY specifies an engine (basically

Re: [HACKERS] How should pg_standby get over the gap of timeline?

2008-11-21 Thread Simon Riggs
On Thu, 2008-11-20 at 22:41 +0900, Fujii Masao wrote: > In the current Synch Rep patch, the standby cannot catch up with the > primary which has a bigger timeline. So, whenever making the standby > catch up, a fresh base backup is required. This is obviously undesirable, > and I'd like to get rid

Re: [HACKERS] Re: [COMMITTERS] pgsql: Silence compiler warning about ignored return value.

2008-11-21 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> (Whatcha gonna do if you fail to write the postmaster log ... try to >> log a complaint message?) > Well, good question, but I'm not convinced that doing nothing is always > the best answer. I didn't say it was --- merely opined t

Re: [HACKERS] Opening a recovering DB in for read-only access?

2008-11-21 Thread Simon Riggs
On Fri, 2008-11-21 at 15:45 +1100, Philip Warner wrote: > Sounds somewhat evil, I know, but I was wondering if it was even > remotely possible with the current design? > > The reason: we are contemplating using pg_standy to create a > warm-standby. It would be a bonus if we would run read-only qu

Re: [HACKERS] Re: [COMMITTERS] pgsql: Silence compiler warning about ignored return value.

2008-11-21 Thread Peter Eisentraut
Tom Lane wrote: (Whatcha gonna do if you fail to write the postmaster log ... try to log a complaint message?) Well, good question, but I'm not convinced that doing nothing is always the best answer. Something along the lines of SIGSTOP'ing oneself or calling abort() might be appropriate in

Re: [HACKERS] fmgr.h vs funcapi.h?

2008-11-21 Thread Tom Lane
Magnus Hagander <[EMAIL PROTECTED]> writes: > I was writing a simple standalone function compiled with pgxs - been a > while since I did that. > Including "postgres.h" and "fmgr.h", it didn't work - the backend would > complain that the function did not exist in the shared library. > Including "po

Re: [HACKERS] [COMMITTERS] pgsql: TABLE command

2008-11-21 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > relation_expr is fine by me. It just makes the syntax more complicated > to explain ... > Btw., so we plan to keep the sql_inheritance parameter forever? I have no idea ... but I should think we'd want to allow ONLY here in any case. You can use t

Re: [HACKERS] Transactions and temp tables

2008-11-21 Thread Emmanuel Cecchet
Heikki Linnakangas wrote: Emmanuel Cecchet wrote: I still quite did not get what the big deal was if an ON COMMIT DELETE ROWS temp table was created inside a transaction. In case the transaction that created a temp table rolls back, the table needs to be removed. Removing a temporary table be

[HACKERS] fmgr.h vs funcapi.h?

2008-11-21 Thread Magnus Hagander
I was writing a simple standalone function compiled with pgxs - been a while since I did that. Including "postgres.h" and "fmgr.h", it didn't work - the backend would complain that the function did not exist in the shared library. Including "postgres.h" and "funcapi.h" *did* work - no complaints.

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

2008-11-21 Thread Bruce Momjian
KaiGai Kohei wrote: > Bruce Momjian wrote: > > KaiGai Kohei wrote: > Please consider SELinux/SE-PostgreSQL requires various kind of objects > (including database objects) to be labeled properly at the initial state. > If it allows clients to turn on row-level security feature, it mea

Re: [HACKERS] SSL configure patch: review

2008-11-21 Thread Alvaro Herrera
Magnus Hagander escribió: > Alex Hunsaker wrote: > > On Fri, Aug 1, 2008 at 13:31, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > >> Something that's bothering me is that PGSSLKEY is inconsistent with the > >> sslkey conninfo parameter. PGSSLKEY specifies an engine (basically a > >> driver for specia

Re: [HACKERS] Autoconf, libpq and replacement function

2008-11-21 Thread Magnus Hagander
Tom Lane wrote: > Magnus Hagander <[EMAIL PROTECTED]> writes: >> AFAICS, we're not doing this for any other functions though - or am I >> too tired and just looking in the wrong place? Or is that because >> they're just function definitions and not #defines? >> (I want to be sure to stick whatever

Re: [HACKERS] Review: Hot standby

2008-11-21 Thread Simon Riggs
On Fri, 2008-11-21 at 15:21 +0530, Pavan Deolasee wrote: > > + /* > +* Release locks, if any. > +*/ > + RelationReleaseRecoveryLocks(xlrec->slotId); > > > If I am reading the patch correctly, AccessExclusiveLocks acquired by > a transaction will be released when the

Re: [HACKERS] SSL configure patch: review

2008-11-21 Thread Magnus Hagander
Alex Hunsaker wrote: > On Fri, Aug 1, 2008 at 13:31, Alvaro Herrera <[EMAIL PROTECTED]> wrote: >> Something that's bothering me is that PGSSLKEY is inconsistent with the >> sslkey conninfo parameter. PGSSLKEY specifies an engine (basically a >> driver for specialized hardware AFAICT) from which th

Re: [HACKERS] Review: Hot standby

2008-11-21 Thread Simon Riggs
On Fri, 2008-11-21 at 13:22 +0530, Pavan Deolasee wrote: > > I think we should avoid the #define's like below which uses a local > variable. I guess the same #define is used elsewhere in the code as > well. If the code is rearranged or the variable name is changed, the > code would break. I use

Re: [HACKERS] Hot Standby (commit fest version - v5)

2008-11-21 Thread Simon Riggs
On Fri, 2008-11-21 at 17:08 +0530, Pavan Deolasee wrote: > Sorry, its the startup process thats stuck in the checkpoint. Here is > the stack trace: Already fixed in new version I'm preparing for you. Both the startup process and bgwriter can perform restartpoints, so its not a problem whether w

[HACKERS] pg_settings.enumval as array

2008-11-21 Thread Magnus Hagander
The attached patch changes pg_settings.enumval to be an array of text instead of just a string, per previous discussion and the open items list. Comments? //Magnus *** a/src/backend/utils/misc/guc.c --- b/src/backend/utils/misc/guc.c *** *** 168,174 static bool assign_maxconnecti

Re: [HACKERS] Hot Standby (commit fest version - v5)

2008-11-21 Thread Pavan Deolasee
On Thu, Nov 20, 2008 at 8:15 PM, Pavan Deolasee <[EMAIL PROTECTED]>wrote: > > > On Thu, Nov 20, 2008 at 7:50 PM, Simon Riggs <[EMAIL PROTECTED]>wrote: > > > >> >> (I assume you mean bgwriter, not archiver process). >> >> > Yeah, its the bgwriter, IIRC hung while taking checkpoint. > > > Sorry, its

Re: [HACKERS] [COMMITTERS] pgsql: TABLE command

2008-11-21 Thread Peter Eisentraut
Tom Lane wrote: [EMAIL PROTECTED] (Peter Eisentraut) writes: Log Message: --- TABLE command If this got re-posted for review I missed it :-(. I disagree with using qualified_name here --- I think it would be better to use relation_expr so that people would have the ability to specify

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

2008-11-21 Thread KaiGai Kohei
Bruce Momjian wrote: KaiGai Kohei wrote: Please consider SELinux/SE-PostgreSQL requires various kind of objects (including database objects) to be labeled properly at the initial state. If it allows clients to turn on row-level security feature, it means many "unlabeled" tuples appear suddenly.

Re: [HACKERS] Review: Hot standby

2008-11-21 Thread Pavan Deolasee
+ /* +* Release locks, if any. +*/ + RelationReleaseRecoveryLocks(xlrec->slotId); If I am reading the patch correctly, AccessExclusiveLocks acquired by a transaction will be released when the transaction is committed or aborted. If the transaction errors out with FATAL

Re: [HACKERS] Should enum GUCs be listed as such in config.sgml?

2008-11-21 Thread Magnus Hagander
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: >> bruce wrote: >>> Tom Lane wrote: Currently, config.sgml still describes the new "enum" GUC variables as being of type "string" --- but pg_settings says they are "enum". This is not very consistent, but I wonder whether ch

Re: [HACKERS] Review: Hot standby

2008-11-21 Thread Pavan Deolasee
I wonder if there is corner case below where there are no WAL records to replay during standby recovery. Specifically, that may cause IsRunningXactDataValid() to return false since latestObservedXid remains set to InvalidTransactionId and that prevents postmaster from serving read-only clients. I