Re: [PATCHES] [HACKERS] For review: Server instrumentation patch

2005-08-12 Thread Dave Page
> -Original Message- > From: Bruce Momjian [mailto:[EMAIL PROTECTED] > Sent: 12 August 2005 04:27 > To: PostgreSQL-patches > Cc: Dave Page; Andreas Pflug > Subject: Re: [PATCHES] [HACKERS] For review: Server > instrumentation patch > > Here is an updated patch I have just applied (cat

Re: [PATCHES] [HACKERS] For review: Server instrumentation patch

2005-08-12 Thread Andreas Pflug
Bruce Momjian wrote: I did not include pg_logdir_ls because that was basically pg_ls_dir with logic to decode the log file name and convert it to a timestamp. That seemed best done in the client. IMHO omitting pg_logdir_ls is a bad idea, because the function is intended to hide server inter

Re: [PATCHES] [HACKERS] For review: Server instrumentation patch

2005-08-12 Thread Alvaro Herrera
On Fri, Aug 12, 2005 at 11:28:22AM +, Andreas Pflug wrote: > Bruce Momjian wrote: > > > > >I did not include pg_logdir_ls because that was basically pg_ls_dir with > >logic to decode the log file name and convert it to a timestamp. That > >seemed best done in the client. > > IMHO omitting pg

Re: [PATCHES] Bug in canonicalize_path()

2005-08-12 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > Tom Lane wrote: > >> ... it's part of the API contract of canonicalize_path() that it > >> will not return something with trailing "." or "..". > > > OK, new patch which I think handles all cases. > > > + if (pending_strips > 0) > > + { > > +

Re: [PATCHES] Bug in canonicalize_path()

2005-08-12 Thread Tom Lane
Bruce Momjian writes: > Tom Lane wrote: >> Uh, that hardly meets the API contract that I mentioned. I think >> we really have to throw an error if the path tries to ".." above >> the starting point. > OK, so how do you want to error out? exit()? There are no ereport > calls in that file. Yeah

Re: [PATCHES] [HACKERS] For review: Server instrumentation patch

2005-08-12 Thread Bruce Momjian
Alvaro Herrera wrote: > On Fri, Aug 12, 2005 at 11:28:22AM +, Andreas Pflug wrote: > > Bruce Momjian wrote: > > > > > > > >I did not include pg_logdir_ls because that was basically pg_ls_dir with > > >logic to decode the log file name and convert it to a timestamp. That > > >seemed best done

Re: [PATCHES] [HACKERS] data on devel code perf dip

2005-08-12 Thread Bruce Momjian
Mark Wong wrote: > On Thu, 11 Aug 2005 22:11:42 -0400 (EDT) > Bruce Momjian wrote: > > > Tom Lane wrote: > > > Bruce Momjian writes: > > > >> O_DIRECT is only being used for WAL page writes (or I sure hope so > > > >> anyway), so shared_buffers should be irrelevant. > > > > > > > Uh, O_DIRECT r

[PATCHES] createuser patch

2005-08-12 Thread Alvaro Herrera
Hackers, Here is a patch to createuser, to make it handle some of the options of CREATE ROLE. While developing it, I noticed it takes an annoying number of options, or ask an annoying number of questions. I thought about producing a version called "createrole" which would have all the options an

Re: [PATCHES] createuser patch

2005-08-12 Thread Alvaro Herrera
On Fri, Aug 12, 2005 at 12:37:22PM -0400, Alvaro Herrera wrote: > Here is a patch to createuser, to make it handle some of the options of > CREATE ROLE. Sorry :-( -- Alvaro Herrera () "La principal característica humana es la tontería" (Augusto Monterroso) Index: createuser.c ==

Re: [PATCHES] [HACKERS] Autovacuum loose ends

2005-08-12 Thread Mark Wong
I thought I'd run a couple of tests to see if it would be helpful against CVS from Aug 3, 2005. Here's a run with autovacuum turned off: http://www.testing.osdl.org/projects/dbt2dev/results/dev4-015/42/ 5186.55 notpm Autvacuum on with default settings: http://www.testing.osdl.org/projects/dbt2dev

Re: [PATCHES] [HACKERS] For review: Server instrumentation patch

2005-08-12 Thread Tom Lane
Bruce Momjian writes: > Here is an updated patch I have just applied (catalog version updated). Actually, you forgot the catversion bump. I read over this and fixed most of the problems I could see, but there is still one left: /* *Prevent reference to the parent directory. *

Re: [PATCHES] [HACKERS] data on devel code perf dip

2005-08-12 Thread Mary Edie Meredith
Just to be certain I know what I have and how to use it, please confirm the following is correct. According to Markw, the tarball we have at OSDL that is dated 7/29 already has the O_DIRECT patch + wal grouping applied. Hence, I will use the one from the day before: postgresql-20050728.tar.bz2 a

Re: [PATCHES] [HACKERS] data on devel code perf dip

2005-08-12 Thread Bruce Momjian
Mary Edie Meredith wrote: > Just to be certain I know what I have and how to use it, > please confirm the following is correct. > > According to Markw, the tarball we have at OSDL that is > dated 7/29 already has the O_DIRECT patch + wal grouping > applied. Hence, I will use the one from the day

Re: [PATCHES] [HACKERS] For review: Server instrumentation patch

2005-08-12 Thread Tom Lane
I wrote: > I'm not sure whether to export skip_drive from path.c or just duplicate > it. If we do export it, a different name would probably be a good idea, > as it seems too generic for a global symbol. On reflection, there's another possibility, which is to put the test code into path.c in the

Re: [PATCHES] Bug in canonicalize_path()

2005-08-12 Thread Bruce Momjian
Tom Lane wrote: > I wrote: > > Uh, that hardly meets the API contract that I mentioned. I think > > we really have to throw an error if the path tries to ".." above > > the starting point. > > After rereading all the callers of canonicalize_path, I've concluded > that none of them actually depend

Re: [PATCHES] Bug in canonicalize_path()

2005-08-12 Thread Tom Lane
I wrote: > Uh, that hardly meets the API contract that I mentioned. I think > we really have to throw an error if the path tries to ".." above > the starting point. After rereading all the callers of canonicalize_path, I've concluded that none of them actually depend on not having a terminating "

Re: [PATCHES] PATCH to allow concurrent VACUUMs to not lock each

2005-08-12 Thread Bruce Momjian
This has been saved for the 8.2 release: http://momjian.postgresql.org/cgi-bin/pgpatches_hold --- Hannu Krosing wrote: > On E, 2005-07-04 at 10:24 +0300, Hannu Krosing wrote: > > On P, 2005-07-03 at 12:19 -0400, Tom

Re: [PATCHES] Bug in canonicalize_path()

2005-08-12 Thread Tom Lane
Bruce Momjian writes: > OK, here is a version that errors out that I just applied and reversed > out when I saw your email. Feel free to use it or discard it. Sorry about that --- should have tried to mail you a bit sooner. BTW, what's with the postmaster.c change? Seems mistaken.

Re: [PATCHES] Bug in canonicalize_path()

2005-08-12 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > OK, here is a version that errors out that I just applied and reversed > > out when I saw your email. Feel free to use it or discard it. > > Sorry about that --- should have tried to mail you a bit sooner. > > BTW, what's with the postmaster.c change?

Re: [PATCHES] [HACKERS] data on devel code perf dip

2005-08-12 Thread Mary Edie Meredith
On Fri, 2005-08-12 at 14:53 -0400, Bruce Momjian wrote: > Mary Edie Meredith wrote: > > Just to be certain I know what I have and how to use it, > > please confirm the following is correct. > > > > According to Markw, the tarball we have at OSDL that is > > dated 7/29 already has the O_DIRECT pat

Re: [PATCHES] plperl SRF sanity check fix

2005-08-12 Thread Bruce Momjian
Andrew Dunstan wrote: > > The attached patch moves a plperl sanity check into the correct > position. Performing the check in the existing position allows the call > to go through to perl first, possibly resulting in a SEGV. OK, patch applied. Your version didn't apply cleanly so I just moved

Re: [PATCHES] [HACKERS] data on devel code perf dip

2005-08-12 Thread Bruce Momjian
Mary Edie Meredith wrote: > On Fri, 2005-08-12 at 14:53 -0400, Bruce Momjian wrote: > > Mary Edie Meredith wrote: > > > Just to be certain I know what I have and how to use it, > > > please confirm the following is correct. > > > > > > According to Markw, the tarball we have at OSDL that is > > >

Re: [PATCHES] More to Bad link Makefile patch

2005-08-12 Thread Bruce Momjian
Tom Lane wrote: > Mark Deric <[EMAIL PROTECTED]> writes: > > So, my co-workers chided me mercilessly to get the -contrib RPM working > > as well; so the full patch is now attached. > > I think this overlaps or may be redundant with the patch that Peter E. > recently proposed; have you been followi

Re: [PATCHES] Bug in canonicalize_path()

2005-08-12 Thread Tom Lane
Bruce Momjian writes: > In my first attempt, I counted the number of ".." groups, then went up > to remove each "..", and them remove a regular directory for each "..". > And then you have this case: > /usr/local/../bin/../.. > Here you hit the first ".." as you are going up. It just seem

Re: [PATCHES] Bitmap index AM

2005-08-12 Thread Bruce Momjian
This has been saved for the 8.2 release: http://momjian.postgresql.org/cgi-bin/pgpatches_hold --- Victor Yegorov wrote: > Hi again. > > Here's an updated patch, that fixes several bugs and is synced with HEAD. > >

Re: [PATCHES] [pgsql-hackers-win32] patch for win32 dynloader

2005-08-12 Thread Bruce Momjian
Patch applied. Thanks. Backpatched to 8.0.X. --- Magnus Hagander wrote: > > >> 3) I restarted the postmaster both times. I got this error > > both times. > > >> :25: ERROR: could not load library "C:/Program > > >> File

Re: [PATCHES] [HACKERS] Duplicate object names in GRANT

2005-08-12 Thread Bruce Momjian
Patch applied. Thanks. I also added a comment above each one to mention why it is needed. --- Gavin Sherry wrote: > On Wed, 27 Jul 2005, Tom Lane wrote: > > > Gavin Sherry <[EMAIL PROTECTED]> writes: > > > I ran across t

Re: [PATCHES] [HACKERS] For review: Server instrumentation patch

2005-08-12 Thread Andreas Pflug
Bruce Momjian wrote: BTW, it surprised me that one of the functions (don't remember which one) expected the log files to be named in a very specific fashion. So there's no flexibility for changing the log_prefix. Probably it's not so bad, but strange anyway. Is this for "security" reasons?

Re: [PATCHES] [HACKERS] Autovacuum loose ends

2005-08-12 Thread Mark Wong
On Fri, 12 Aug 2005 17:49:41 -0400 Alvaro Herrera <[EMAIL PROTECTED]> wrote: > On Fri, Aug 12, 2005 at 10:49:43AM -0700, Mark Wong wrote: > > I thought I'd run a couple of tests to see if it would be helpful > > against CVS from Aug 3, 2005. > > > > Here's a run with autovacuum turned off: > > ht

Re: [PATCHES] [HACKERS] Autovacuum loose ends

2005-08-12 Thread Alvaro Herrera
On Fri, Aug 12, 2005 at 10:49:43AM -0700, Mark Wong wrote: > I thought I'd run a couple of tests to see if it would be helpful > against CVS from Aug 3, 2005. > > Here's a run with autovacuum turned off: > http://www.testing.osdl.org/projects/dbt2dev/results/dev4-015/42/ > 5186.55 notpm > > Autva

[PATCHES] [PATCH] Changing second argument to type input function

2005-08-12 Thread Martijn van Oosterhout
As detailed in the email to pgsql-hackers, this patch alters the second argument of the type input functions so that for base types it passes the oid, just as for composite types. For all cases where the oid is currently non-zero (composite and array types) it remains unchanged. http://archives.po

Re: [PATCHES] [HACKERS] PL/Perl list value return causes segfault

2005-08-12 Thread Bruce Momjian
Patch applied. Thanks. --- David Fetter wrote: > On Sat, Jul 30, 2005 at 09:47:58AM -0400, Andrew Dunstan wrote: > > > > > > David Fetter wrote: > > > > You have rolled 2 problems into one - spi_query+spi_fetchrow does

Re: [PATCHES] Win32 eventlog level fix

2005-08-12 Thread Bruce Momjian
Patch applied. Thanks. Backpatched to 8.0.X. --- Magnus Hagander wrote: > This patch fixes the event type used to log output from the > stderr-in-service or output-from-syslogger-in-service code. Previously > everything wa

Re: [PATCHES] [HACKERS] Autovacuum loose ends

2005-08-12 Thread Alvaro Herrera
On Fri, Aug 12, 2005 at 03:16:04PM -0700, Mark Wong wrote: > On Fri, 12 Aug 2005 17:49:41 -0400 > Alvaro Herrera <[EMAIL PROTECTED]> wrote: > > > Notice how the subindexes are wrong ... I think it should be 1:3 for > > i_orders, no? Apparently indexes_scan.data has the same problem. > > Whoops!

Re: [PATCHES] [HACKERS] For review: Server instrumentation patch

2005-08-12 Thread Andreas Pflug
Tom Lane wrote: Andreas Pflug <[EMAIL PROTECTED]> writes: So how would your query to display all all available _logfiles_ look like? I think it's perfectly reasonable to assume that all the files in the log directory are logfiles --- more so than assuming that the admin hasn't exercised his

Re: [PATCHES] [HACKERS] Autovacuum loose ends

2005-08-12 Thread Mark Wong
On Fri, 12 Aug 2005 18:42:09 -0400 Alvaro Herrera <[EMAIL PROTECTED]> wrote: > On Fri, Aug 12, 2005 at 03:16:04PM -0700, Mark Wong wrote: > > On Fri, 12 Aug 2005 17:49:41 -0400 > > Alvaro Herrera <[EMAIL PROTECTED]> wrote: > > > > > Notice how the subindexes are wrong ... I think it should be 1:3

Re: [PATCHES] [HACKERS] Autovacuum loose ends

2005-08-12 Thread Alvaro Herrera
On Fri, Aug 12, 2005 at 03:49:57PM -0700, Mark Wong wrote: > On Fri, 12 Aug 2005 18:42:09 -0400 > Alvaro Herrera <[EMAIL PROTECTED]> wrote: > > Also, it seems the "tran_lock.out" file captured wrong input -- I think > > you mean "WHERE transactionid IS NULL" in the query instead of "WHERE > > tran

Re: [PATCHES] [HACKERS] For review: Server instrumentation patch

2005-08-12 Thread Tom Lane
Andreas Pflug <[EMAIL PROTECTED]> writes: > So how would your query to display all all available _logfiles_ > look like? I think it's perfectly reasonable to assume that all the files in the log directory are logfiles --- more so than assuming that the admin hasn't exercised his option to change t

Re: [PATCHES] [HACKERS] For review: Server instrumentation patch

2005-08-12 Thread Bruce Momjian
Andreas Pflug wrote: > Bruce Momjian wrote: > > >> BTW, it surprised me that one of the functions (don't remember > >> which one) expected the log files to be named in a very specific > >> fashion. So there's no flexibility for changing the log_prefix. > >> Probably it's not so bad, but strang

Re: [PATCHES] [HACKERS] For review: Server instrumentation patch

2005-08-12 Thread Andreas Pflug
Bruce Momjian wrote: I don't assume people using psql will care about the current log files --- Hm. Probably because you think these users will have direct file access? Which in turn means they can edit *.conf directly too and don't need an interface for that either. it would be somethi

Re: [PATCHES] [HACKERS] For review: Server instrumentation patch

2005-08-12 Thread Bruce Momjian
Andreas Pflug wrote: > Bruce Momjian wrote: > > > > > > > I don't assume people using psql will care about the current log files --- > > Hm. Probably because you think these users will have direct file access? > Which in turn means they can edit *.conf directly too and don't need an > interfa

Re: [PATCHES] [HACKERS] For review: Server instrumentation patch

2005-08-12 Thread Andreas Pflug
Bruce Momjian wrote: I don't see how listing the log files relates to editing the confuration files. Both are remote administration. While we've seen the discussion that one aspect (config file editing) should be performed in psql, you assume the other aspect (viewing the logfile) to be no

Re: [PATCHES] [HACKERS] For review: Server instrumentation patch

2005-08-12 Thread Bruce Momjian
Andreas Pflug wrote: > Bruce Momjian wrote: > > > > > > > I don't see how listing the log files relates to editing the confuration > > files. > > Both are remote administration. While we've seen the discussion that one > aspect (config file editing) should be performed in psql, you assume the

Re: [PATCHES] [BUGS] BUG #1794: inheritance removes permissions from

2005-08-12 Thread Bruce Momjian
Patch applied. Thanks. --- Sean Burlington wrote: > Michael Fuhr wrote: > > On Thu, Jul 28, 2005 at 03:56:14PM +0100, Sean Burlington wrote: > > > >>Michael Fuhr wrote: > >> > >>>On Thu, Jul 28, 2005 at 12:48:35PM +0100,

Re: [PATCHES] PL/pgSQL: SELECT INTO EXACT

2005-08-12 Thread Bruce Momjian
This has been saved for the 8.2 release: http://momjian.postgresql.org/cgi-bin/pgpatches_hold --- Tom Lane wrote: > Matt Miller <[EMAIL PROTECTED]> writes: > >>> I can attach a patch that supports [EXACT | NOEXACT].

Re: [PATCHES] [patch 0/7] more patches for pgcrypto

2005-08-12 Thread Bruce Momjian
Thanks. All seven applied. --- Marko Kreen wrote: > Here are couple of small and one large patch for pgcrypto. > > The large one adds support for RSA keys and reorganizes > the pubkey functions a bit. The actual RSA-speci

Re: [PATCHES] [HACKERS] ECPG and escape strings

2005-08-12 Thread Bruce Momjian
Would someone on the interface list look for a fix to this? Thanks. --- Michael Fuhr wrote: > ECPG seems to be a little overzealous with the new escape string syntax: > > % cat foo.pgc > int > main(void) > { > putchar(

Re: [PATCHES] [HACKERS] ECPG ignores SAVEPOINT if first statement of a transaction

2005-08-12 Thread Bruce Momjian
Would someone on the interface list look for a fix to this? Thanks. --- Michael Fuhr wrote: > ECPG ignores SAVEPOINT if it's the first statement of a transaction: > > % cat foo.pgc > int > main(void) > { > EXEC SQL WHE

Re: [PATCHES] PL/pgSQL: #option select_into_1_row (was SELECT INTO

2005-08-12 Thread Bruce Momjian
This has been saved for the 8.2 release: http://momjian.postgresql.org/cgi-bin/pgpatches_hold --- Matt Miller wrote: > On Mon, 2005-08-08 at 17:18 -0400, Tom Lane wrote: > > If you think that this should be a global

Re: [PATCHES] [BUGS] BUG #1815: ECPGdebug causes crash on Windows XP

2005-08-12 Thread Bruce Momjian
William ZHANG wrote: > Make sure the lib directory is in the PATH. > I tested it in MinGW. > > $ ecpg main.pgc > $ gcc main.c -I../include -L../lib -lecpg > $ export PATH=$PATH:"/c/Program Files/PostgreSQL/8.0/lib" > $ ./a.exe > [1772]: ECPGdebug: set to 1 Ah, interesting. Why would it crash if

Re: [PATCHES] [BUGS] BUG #1815: ECPGdebug causes crash on Windows XP

2005-08-12 Thread Bruce Momjian
Can someone on the interfaces list comment on this? Thanks. --- joshua masiko wrote: > > The following bug has been logged online: > > Bug reference: 1815 > Logged by: joshua masiko > Email address: [EM

Re: [PATCHES] createuser patch

2005-08-12 Thread Bruce Momjian
I assume this is for 8.1 because of the new ROLE capability. Your patch has been added to the PostgreSQL unapplied patches list at: http://momjian.postgresql.org/cgi-bin/pgpatches It will be applied as soon as one of the PostgreSQL committers reviews and approves it. --

Re: [PATCHES] gettime() - a timeofday() alternative

2005-08-12 Thread Bruce Momjian
This has been saved for the 8.2 release: http://momjian.postgresql.org/cgi-bin/pgpatches_hold --- Brendan Jurd wrote: > On 8/7/05, Brendan Jurd <[EMAIL PROTECTED]> wrote: > > Hi all, > > > > I propose to add an int

Re: [PATCHES] createuser patch

2005-08-12 Thread Alvaro Herrera
On Fri, Aug 12, 2005 at 10:49:26PM -0400, Bruce Momjian wrote: > > I assume this is for 8.1 because of the new ROLE capability. IMHO this is an integral part of the ROLE patch. > > On Fri, Aug 12, 2005 at 12:37:22PM -0400, Alvaro Herrera wrote: > > > > > Here is a patch to createuser, to make