[HACKERS] ANNOUNCEMENT: Availability of TelegraphCQ v0.2 (BETA release)

2003-07-17 Thread Sailesh Krishnamurthy

ANNOUNCEMENT: Availability of TelegraphCQ v0.2 (BETA release)
-

The Telegraph Team at UC Berkeley is pleased to announce the immediate
availability of TelegraphCQ v0.2 (a BETA release). TelegraphCQ is a
system for processing long-running continuous queries over data
streams. TelegraphCQ is implemented as a significant modification to
the PostgreSQL open-source database system. Specifically, TelegraphCQ
v0.2 is based on the PostregreSQL 7.3.2 code-base.

For more information on the Telegraph project please visit:

   http://telegraph.cs.berkeley.edu

To download TelegraphCQ and for more information, please visit:

   http://telegraph.cs.berkeley.edu/telegraphcq

Here is the README.TelegraphCQ from the source distribution:

--
This file contains information on TelegraphCQ 0.2 (a Beta releae). 

What's new (since TelegraphCQ 0.1)
-

- Better stability: Lots of bugs have been squashed

- CSV Wrapper: An easy to use wrapper that accepts simple comma
separated text as input and supports all PostgreSQL and user-defined
types. There is now no need to write C code to develop a new wrapper
if your data source produces textual data.

- Pull Wrappers: If you want to pull (lookup) data from external
sources (such as web pages) based on query predicates, you can use the
new infrastructure for the Pull Wrapper.

- Introspective Query Processing: The dynamic catalog is a new feature
in TelegraphCQ. It lets users query three special purpose internal
data streams to get a continuous view of how the TelegraphCQ system is
behaving.

- Applications: Included with this distribution are a few applications
that we demonstrated at the ACM FCRC/SIGMOD 2003 Conference in San
Diego. We have integrated data from CalTrans (California Department of
Transportation), CHP (California Highway Patrol) and a local network
interface (using the tcpdump utility). We have also included graphical
visualizers that run some interesting queries over data streams from
these sources.

Request
---

If you are using TelegraphCQ for any project (research or otherwise),
we'd like to know ! 

  - If you are making any performance measurements of TelegraphCQ and
  are publishing it or disseminating it in some way, please do let us
  know.

  - We welcome bug fixes and code contributions of any kind. Please
  send all patches to [EMAIL PROTECTED]

Caveat Emptor
-

The current version of TelegraphCQ (0.2) is still a Beta release and
is very much research code. We haven't optimized it for
performance. Also, you will need to create a fresh database to use it
as it will not work against an existing PostgreSQL database. You are
free to use pgdump to export and then import your data from an
existing PostgreSQL database. 

- Archived streams: Note that although TelegraphCQ 0.2 supports
archived streams, we currently do not support access of historical
data. This will be fixed in our next release. 

For more information


Getting Started: 
  
  A TelegraphCQ Getting Started guide can be found in
  docs/TelegraphCQ/gettingstarted.html

  The Getting Started guide also has links to other information such
  as DDL/DML syntax, examples etc. Note that the documentation
  installed in your TelegraphCQ installation directory contains
  documentation for the new syntax changes (CREATE/ALTER/DROP STREAM,
  the WINDOW clause in DML) integrated into the existing PostgreSQL
  documentation.

The Telegraph Project:

  http://telegraph.cs.berkeley.edu

Supported Platforms
---

TelegraphCQ is supported on Linux x86 (various distributions including
Red Hat Linux 8,9 and Debian) and MacOS X 10.2, the platforms on which
it was developed. In addition, it has been minimally tested on the
SPARC Solaris platform. 

In general, TelegraphCQ should run anywhere PostgreSQL runs. However,
there are significant differences in how we use shared memory and
synchronization primitives such as semaphores. This is likely to cause
some hiccups on platforms where we have not tested it yet. We welcome
patches that help in porting TelegraphCQ. 


Please send all comments (and patches) to [EMAIL PROTECTED]

--




-- 
Pip-pip
Sailesh
http://www.cs.berkeley.edu/~sailesh



---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [HACKERS] Bad permissions bug in 7.3 dump (and 7.4)?

2003-07-17 Thread Peter Eisentraut
On Mon, 14 Jul 2003, Tom Lane wrote:

 Probably the only real solution is to implement DROP-CASCADE-like
 checking when a privilege is revoked.  Seems like rather a lot of
 work :-(

Yes and yes.  That's why the SQL standard goes on for pages and pages
about REVOKE.  It will be looked at eventually, just make sure someone is
taking notes on the failure cases.

-- 
Peter Eisentraut   [EMAIL PROTECTED]

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [HACKERS] Archives

2003-07-17 Thread scott.marlowe
On Wed, 16 Jul 2003, Alvaro Herrera wrote:

 On Wed, Jul 16, 2003 at 03:35:51PM -0500, Larry Rosenman wrote:
 
  --On Wednesday, July 16, 2003 16:31:24 -0400 Alvaro Herrera 
  [EMAIL PROTECTED] wrote:
  
  On Wed, Jul 16, 2003 at 01:57:41PM -0500, Thomas Swan wrote:
  Does anyone have recent archives of the pgsql-hackers list in mbx or
  flat file format?
  
  I really miss this too.  I searched the entire site, including
  Majordomo's web interface, and there is no way to get the mbox archives.
  It seems the only way to get'em is buying them from Pgsql Inc.
 
  I sent Thomas my July, 2003 MBX file.
 
 Actually I wanted everything from 2001 on general, hackers, patches and
 committers...  I know I'd rather not receive all that via email; mbox
 files in archives.postgresql.org just like almost every other list would
 have been perfect for me.
 
 OTOH I already did all the searching I needed via www interface...
 _very_ cumbersome and I wasted several precious hours, but it worked.

Use groups.google.com to search the archives, or use www.google.com with a 
site:archives.postgresql.org entry.


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


[HACKERS] DB2's row_number()

2003-07-17 Thread Hans-Jürgen Schönig
I had a brief look at DB2's row_number function which seems to be pretty 
useful.
What it does is:

test=# SELECT row_number(), relname FROM pg_class LIMIT 3;
 row_number |relname
+
  1 | pg_description
  2 | pg_group
  3 | pg_proc
(3 rows)
This makes sense to me and I need this feature from time to time. My 
question is: How do I find out when a query starts? Inside a table 
function I can call SRF_IS_FIRSTCALL() to see when it is called first. 
Is there an easy way to check that inside an ordinary C function 
returning just one value?
Currently my function counts the number of times it has been called per 
connection. I could write a second function for resetting the counter 
but this is not too smart ...

	Regards,

		Hans

--
Cybertec Geschwinde u Schoenig
Ludo-Hartmannplatz 1/14, A-1160 Vienna, Austria
Tel: +43/2952/30706; +43/664/233 90 75
www.cybertec.at, www.postgresql.at, kernel.cybertec.at


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
  http://www.postgresql.org/docs/faqs/FAQ.html


Re: [HACKERS] postmaster startup failure

2003-07-17 Thread Tom Lane
Hannu Krosing [EMAIL PROTECTED] writes:
 WHen running PostgreSQL 7.3.3-1 (from rpm's) on Redhat 9.0 I got the
 following in logs and the postmaster will not start up.
 PANIC:  XLogWrite: write request 0/30504000 is past end of log
 0/30504000

Ugh.  The reason we hadn't seen this happen in the field was that it is
a bug I introduced in a patch two months ago :-(

7.3.3 will in fact fail to start up, with the above error, any time the
last record of the WAL file ends exactly at a page boundary.  I think
we're gonna need a quick 7.3.4 ...

If you want a source patch for 7.3.3, here it is.

regards, tom lane


*** src/backend/access/transam/xlog.c.orig  Thu May 22 10:39:49 2003
--- src/backend/access/transam/xlog.c   Thu Jul 17 12:36:20 2003
***
*** 2483,2488 
--- 2483,2489 
EndOfLog;
XLogRecord *record;
char   *buffer;
+   uint32  freespace;
  
/* Use malloc() to ensure record buffer is MAXALIGNED */
buffer = (char *) malloc(_INTL_MAXLOGRECSZ);
***
*** 2678,2685 
memcpy((char *) Insert-currpage, readBuf, BLCKSZ);
Insert-currpos = (char *) Insert-currpage +
(EndOfLog.xrecoff + BLCKSZ - XLogCtl-xlblocks[0].xrecoff);
-   /* Make sure rest of page is zero */
-   MemSet(Insert-currpos, 0, INSERT_FREESPACE(Insert));
  
LogwrtResult.Write = LogwrtResult.Flush = EndOfLog;
  
--- 2679,2684 
***
*** 2689,2694 
--- 2688,2714 
  
XLogCtl-LogwrtRqst.Write = EndOfLog;
XLogCtl-LogwrtRqst.Flush = EndOfLog;
+ 
+   freespace = INSERT_FREESPACE(Insert);
+   if (freespace  0)
+   {
+   /* Make sure rest of page is zero */
+   MemSet(Insert-currpos, 0, freespace);
+   XLogCtl-Write.curridx = 0;
+   }
+   else
+   {
+   /*
+* Whenever Write.LogwrtResult points to exactly the end of a page,
+* Write.curridx must point to the *next* page (see XLogWrite()).
+*
+* Note: it might seem we should do AdvanceXLInsertBuffer() here,
+* but we can't since we haven't yet determined the correct StartUpID
+* to put into the new page's header.  The first actual attempt to
+* insert a log record will advance the insert state.
+*/
+   XLogCtl-Write.curridx = NextBufIdx(0);
+   }
  
  #ifdef NOT_USED
/* UNDO */

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [HACKERS] postmaster startup failure

2003-07-17 Thread Hannu Krosing
Tom Lane kirjutas N, 17.07.2003 kell 19:49:
 Ugh.  The reason we hadn't seen this happen in the field was that it is
 a bug I introduced in a patch two months ago :-(
 
 7.3.3 will in fact fail to start up, with the above error, any time the
 last record of the WAL file ends exactly at a page boundary.  I think
 we're gonna need a quick 7.3.4 ...
 
 If you want a source patch for 7.3.3, here it is.

Thanks!

---
Hannu


---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
  joining column's datatypes do not match


Re: [HACKERS] Patches List

2003-07-17 Thread Rod Taylor
On Wed, 2003-07-16 at 21:16, Tom Lane wrote:
 Larry Rosenman [EMAIL PROTECTED] writes:
  Is the patches list working?
 
 I saw something come through yesterday from Rod.

Which is funny because it's not in the archives and I didn't receive the
message to my own inbox.


signature.asc
Description: This is a digitally signed message part


Re: [HACKERS] Patches List

2003-07-17 Thread Larry Rosenman


--On Thursday, July 17, 2003 18:11:25 + Rod Taylor [EMAIL PROTECTED] wrote:

On Wed, 2003-07-16 at 21:16, Tom Lane wrote:
Larry Rosenman [EMAIL PROTECTED] writes:
 Is the patches list working?
I saw something come through yesterday from Rod.
Which is funny because it's not in the archives and I didn't receive the
message to my own inbox.
I got that one, and 3 messages today, but not the one I posted...

LER



--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED]
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749


---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
 joining column's datatypes do not match


Re: [HACKERS] Patches List

2003-07-17 Thread Robert Treat
On Thu, 2003-07-17 at 14:11, Rod Taylor wrote:
 On Wed, 2003-07-16 at 21:16, Tom Lane wrote:
  Larry Rosenman [EMAIL PROTECTED] writes:
   Is the patches list working?
  
  I saw something come through yesterday from Rod.
 
 Which is funny because it's not in the archives and I didn't receive the
 message to my own inbox.

FWIW I have it. Please be aware that archives isn't updating as of now,
so it's quite likely that it go flummoxed before this patch was sent. 

Robert Treat
-- 
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL


---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


Re: [HACKERS] DB2's row_number()

2003-07-17 Thread Darcy Buskermolen
Here is how I doi it when I need to...

BEGIN;
CREATE TEMP SEQUENCE row_num;
SELECT next_val('row_num'), relname FROM pg_class LIMIT 3;
ROLLBACK;

You could also do this with a Set Returning Fucntion so that it returns the 
nextval in a simular way



On Thursday 17 July 2003 08:03, Hans-Jürgen Schönig wrote:
 I had a brief look at DB2's row_number function which seems to be pretty
 useful.
 What it does is:

 test=# SELECT row_number(), relname FROM pg_class LIMIT 3;
   row_number |relname
 +
1 | pg_description
2 | pg_group
3 | pg_proc
 (3 rows)

 This makes sense to me and I need this feature from time to time. My
 question is: How do I find out when a query starts? Inside a table
 function I can call SRF_IS_FIRSTCALL() to see when it is called first.
 Is there an easy way to check that inside an ordinary C function
 returning just one value?
 Currently my function counts the number of times it has been called per
 connection. I could write a second function for resetting the counter
 but this is not too smart ...

   Regards,

   Hans

-- 
Darcy Buskermolen
Wavefire Technologies Corp.
ph: 250.717.0200
fx:  250.763.1759
http://www.wavefire.com

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faqs/FAQ.html


Re: [HACKERS] Patches List

2003-07-17 Thread Robert Treat
On Thu, 2003-07-17 at 14:15, Larry Rosenman wrote:
 
 
 --On Thursday, July 17, 2003 18:11:25 + Rod Taylor [EMAIL PROTECTED] wrote:
 
  On Wed, 2003-07-16 at 21:16, Tom Lane wrote:
  Larry Rosenman [EMAIL PROTECTED] writes:
   Is the patches list working?
 
  I saw something come through yesterday from Rod.
 
  Which is funny because it's not in the archives and I didn't receive the
  message to my own inbox.
 I got that one, and 3 messages today, but not the one I posted...
 

Marc had been playing with the configs for amavis(?) that seemed to have
created a bit of a black hole for some messages. I noticed one I sent
following up Chris K-L's post about a database not starting never made
it to the list. I checked with the direct recipients and they all
received it...

Robert Treat  
-- 
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [HACKERS] Patches List

2003-07-17 Thread Larry Rosenman


--On Thursday, July 17, 2003 14:24:03 -0400 Robert Treat 
[EMAIL PROTECTED] wrote:

On Thu, 2003-07-17 at 14:15, Larry Rosenman wrote:


--On Thursday, July 17, 2003 18:11:25 + Rod Taylor [EMAIL PROTECTED]
wrote:
 On Wed, 2003-07-16 at 21:16, Tom Lane wrote:
 Larry Rosenman [EMAIL PROTECTED] writes:
  Is the patches list working?

 I saw something come through yesterday from Rod.

 Which is funny because it's not in the archives and I didn't receive
 the message to my own inbox.
I got that one, and 3 messages today, but not the one I posted...
Marc had been playing with the configs for amavis(?) that seemed to have
created a bit of a black hole for some messages. I noticed one I sent
following up Chris K-L's post about a database not starting never made
it to the list. I checked with the direct recipients and they all
received it...
Might be the attachment(s) that caused the grief.

What it was, was input from SCO to allow PG 7.3.3 to build on OpenServer 
5.0.7, which
they are thinking of distributing.  I'd like to get that patch committed to 
7.4 and if
core lets it, a 7.3.4.

Tom: Did you get the direct send?

LER

Robert Treat


--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED]
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [HACKERS] DB2's row_number()

2003-07-17 Thread Tom Lane
=?ISO-8859-1?Q?Hans-J=FCrgen_Sch=F6nig?= [EMAIL PROTECTED] writes:
 question is: How do I find out when a query starts? Inside a table 
 function I can call SRF_IS_FIRSTCALL() to see when it is called first. 
 Is there an easy way to check that inside an ordinary C function 
 returning just one value?

Use fn_extra to store some state data.
pg_stat_get_backend_idset() is a useful example.

regards, tom lane

---(end of broadcast)---
TIP 6: Have you searched our list archives?

   http://archives.postgresql.org


[HACKERS] I am back

2003-07-17 Thread Bruce Momjian
I returned Monday night from O'Reilly and LinuxTag.  I have several
things to do this week:

read backlog of email
create 7.4 changes list
apply outstanding patches

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [HACKERS] timestamp bug?

2003-07-17 Thread Tom Lane
Gavin Sherry [EMAIL PROTECTED] writes:
 Shouldn't we be detecting problems with the following (haven't seen
 mention of it):
 template1=# insert into b values('1000-12-01 23:23:23');
 INSERT 555183 1
 template1=# select * from b;
 ERROR:  Unable to format timestamp; internal coding error

Okay, now I get

regression=# select '1000-12-01 23:23:23'::timestamp;
ERROR:  TIMESTAMP out of range '1000-12-01 23:23:23'
regression=# select '1000-12-01 23:23:23'::timestamptz;
ERROR:  TIMESTAMP WITH TIME ZONE out of range '1000-12-01 23:23:23'

regards, tom lane

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [HACKERS] Archives

2003-07-17 Thread Bruno Wolff III
On Wed, Jul 16, 2003 at 16:31:24 -0400,
  Alvaro Herrera [EMAIL PROTECTED] wrote:
 On Wed, Jul 16, 2003 at 01:57:41PM -0500, Thomas Swan wrote:
  Does anyone have recent archives of the pgsql-hackers list in mbx or 
  flat file format? 
  
  I know that I can search through the website or through other 
  interfaces, but I would like to be able to download a file containing 
  the posts for a period of time.  
 
 I really miss this too.  I searched the entire site, including
 Majordomo's web interface, and there is no way to get the mbox archives.
 It seems the only way to get'em is buying them from Pgsql Inc.

You can get a group of archived messages all attached to the same message.
This seems to be about as usable as an mbox. (At least with my mail reader.)

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster