Re: [GENERAL] Drop table

2004-12-07 Thread Michael Fuhr
On Tue, Dec 07, 2004 at 01:20:07PM +0530, Nageshwar Rao wrote:

> Not able to drop a table,though nobody is accessing the table.I am able to
> insert the records and delete the records.When I give drop table it just
> hangs there .No error message.

Another transaction might be holding a lock on the table.  Have
you looked at pg_locks?

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/

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


Re: [GENERAL] When to encrypt

2004-12-07 Thread Daniel Martini
Hi,

Citing Greg Stark <[EMAIL PROTECTED]>:
> Martijn van Oosterhout <[EMAIL PROTECTED]> writes:
> > Actually, hard disk encryption is useful for one thing: so if somebody
> > kills the power and takes the hard disk/computer, the data is safe.
> > While it's running it's vulnerable though...
> 
> Where do you plan to keep the key?

Well, where do you plan to keep the key for your encrypted backup tapes,
like you suggested in another post in this thread ;-)
That's pretty much the same problem.

Anyways, there are a bunch of solutions to this problem. All the good
ones require manual intervention (key entry, not necessarily by hand)
in case of the encrypted partition being brought from the unmounted
into the mounted state and rely on a certain person or a group of people
being trusted. Problem one (man. intervention) will not be a problem
at all, if the data is really valuable. Problem two (trust) is more
difficult. The more you distribute a single key across different people
and media, the less trust you will need in every single person, but the
more difficult will it be to conveniently access the data. 

Regards,
Daniel

---(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: [GENERAL] Index on geometry and timestamp

2004-12-07 Thread Pierre-Frédéric Caillaud

	You could convert your timestamp into an integer (number of seconds since  
the epoch).
	Also, under certain conditions, you can cheat and use a sequence instead  
of a timestamp.

Hi,
I need an index on a postgis-point and a timestamp.
I'm using an GiST index on the geometry. But the creation of an GiST  
index
on geometry and timestamp seems to be impossible, because GiST doesn't
support Timestamps.
Is there a possibility to solve my problem?

Greetings
Jens

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


Re: [GENERAL] Index on geometry and timestamp

2004-12-07 Thread Werdin Jens
The Problem is, that I need the milliseconds and the information of the
Timezone.  

-Ursprüngliche Nachricht-
Von: Pierre-Frédéric Caillaud [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 7. Dezember 2004 09:48
An: Werdin Jens; [EMAIL PROTECTED]
Betreff: Re: [GENERAL] Index on geometry and timestamp



You could convert your timestamp into an integer (number of seconds
since  
the epoch).
Also, under certain conditions, you can cheat and use a sequence
instead  
of a timestamp.

>
> Hi,
> I need an index on a postgis-point and a timestamp.
> I'm using an GiST index on the geometry. But the creation of an GiST  
> index
> on geometry and timestamp seems to be impossible, because GiST doesn't
> support Timestamps.
> Is there a possibility to solve my problem?
>
> Greetings
> Jens
>


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

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


[GENERAL] Fwd: 8.0 vs. 7.4 benchmarks

2004-12-07 Thread Postgres Learner
Hi all!
I posted this on pgsql-performance but got no reply, so here it is:
thanks!
ps


-- Forwarded message --
From: Postgres Learner <[EMAIL PROTECTED]>
Date: Mon, 6 Dec 2004 14:58:46 +0530
Subject: 8.0 vs. 7.4 benchmarks
To: [EMAIL PROTECTED]


Hi all!
Has anyone done any performance benchmarking of postgresql 7.4 vs 8.0?
Are there any scenarios where 8.0 can be expected to be faster? 
I would love to get my hands on any numbers that someone might have.

Also does anyone know how long it will take for a stable release of
8.0 to come (any estimates would be good) ? 
Given the loads of additional features in 8.0, I can't
wait to use it in production. :-)

thanks a lot everyone!!!
ps

---(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: [GENERAL] Triggers don't activate when dropping table

2004-12-07 Thread Michael Fuhr
On Tue, Dec 07, 2004 at 02:41:37PM +0800, cheng shan wrote:

> In the first version, the function destroy_object_type( ) just drop
> the table only. But when I find the triggers havn't been actived
> yet,  I add the delete setense. This time it becomes even worse,
> the system throws error message.ERROR:  could not open relation
> with OID 1390714.

What's happening when you get this error?  If you've been dropping
tables then you might have a problem with cached plans.

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/

---(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


[GENERAL] How can I recovery old Data from files and folders on windows?

2004-12-07 Thread Premsun Choltanwanich
I got some problem on PostgreSQL 8 for windows so I uninstall and
reinstall it again. Before I uninstall PostgreSQL 8 I already backup all
files and folders (copy all to other place).

The problem is how can I restore by use files and folders that I
already backup. If I try to restore by put all of it back it will be
make a same error. I just want to restore only DATA (databases,
functions, views, users, group etc).

 Please suggest me that How can I recovery old Data from files and
folders on windows?

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


Re: [GENERAL] How can I recovery old Data from files and folders on windows?

2004-12-07 Thread Markus Wollny
Hi!

You can't. You'll have to restore your erroneous version first, then dump your 
data, the reinstall and use restore to restore the data you want.

Kind regards

   Markus 

> -Ursprüngliche Nachricht-
> Von: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] Im Auftrag von 
> Premsun Choltanwanich
> Gesendet: Dienstag, 7. Dezember 2004 10:49
> An: [EMAIL PROTECTED]
> Betreff: [GENERAL] How can I recovery old Data from files and 
> folders on windows?
> 
> I got some problem on PostgreSQL 8 for windows so I uninstall 
> and reinstall it again. Before I uninstall PostgreSQL 8 I 
> already backup all files and folders (copy all to other place).
> 
> The problem is how can I restore by use files and folders 
> that I already backup. If I try to restore by put all of it 
> back it will be make a same error. I just want to restore 
> only DATA (databases, functions, views, users, group etc).
> 
>  Please suggest me that How can I recovery old Data from 
> files and folders on windows?
> 
> ---(end of 
> broadcast)---
> TIP 1: subscribe and unsubscribe commands go to 
> [EMAIL PROTECTED]
> 

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


Re: [GENERAL] How can I recovery old Data from files and

2004-12-07 Thread Premsun Choltanwanich
My problem is I cannot start PostgreSQL service on Windows 2000 Advance
Server. For more information it's work fine for all 3 - 4 months ago.

The error message that show when I try to start PostgreSQL service is:

Microsoft Management Console
Could not start the PostgreSQL Database Server 8.0-beta1 service on
Local Computer.
The service did not return an error. This could be an internal Windows
error or an internal service error.
If the problem persists, contact your system administrator.


So I cannot restore my erroneous version and dump my data for
reinstall. Could you give me some suggestion for correct this problem?

FYI: The ways I already done are
- reinstall with out uninstall the old one.
- reinstall with uninstall the old one first. then copy the old data
directory to the new one
- reinstall with uninstall the old one first. then copy the old files
by try to compare between the old one and new one file by file.







>>> "Markus Wollny" <[EMAIL PROTECTED]> 7/12/2004 5:14:02 pm
>>>
Hi!

You can't. You'll have to restore your erroneous version first, then
dump your data, the reinstall and use restore to restore the data you
want.

Kind regards

   Markus 

> -Urspr?ngliche Nachricht-
> Von: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] Im Auftrag von 
> Premsun Choltanwanich
> Gesendet: Dienstag, 7. Dezember 2004 10:49
> An: [EMAIL PROTECTED] 
> Betreff: [GENERAL] How can I recovery old Data from files and 
> folders on windows?
> 
> I got some problem on PostgreSQL 8 for windows so I uninstall 
> and reinstall it again. Before I uninstall PostgreSQL 8 I 
> already backup all files and folders (copy all to other place).
> 
> The problem is how can I restore by use files and folders 
> that I already backup. If I try to restore by put all of it 
> back it will be make a same error. I just want to restore 
> only DATA (databases, functions, views, users, group etc).
> 
>  Please suggest me that How can I recovery old Data from 
> files and folders on windows?
> 
> ---(end of 
> broadcast)---
> TIP 1: subscribe and unsubscribe commands go to 
> [EMAIL PROTECTED] 
> 

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


Re: [GENERAL] Index on geometry and timestamp

2004-12-07 Thread Oleg Bartunov
On Tue, 7 Dec 2004, Werdin Jens wrote:
Hi,
I need an index on a postgis-point and a timestamp.
I'm using an GiST index on the geometry. But the creation of an GiST index
on geometry and timestamp seems to be impossible, because GiST doesn't
support Timestamps.
Is there a possibility to solve my problem?
yes, use contrib/btree_gist
Greetings
Jens

Regards,
Oleg
_
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: [EMAIL PROTECTED], http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
   (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


Re: [GENERAL] Triggers don't activate when dropping table

2004-12-07 Thread Stephan Szabo

On Tue, 7 Dec 2004, cheng shan wrote:

>In the first version, the function destroy_object_type( ) just drop the
>table only. But when I find the triggers havn't
>been actived yet,  I add the delete setense. This time it becomes even
>worse, the system throws error message.ERROR:  could
>not open relation with OID 1390714.

>To avoid the fatal error, I have no choice but to rollback the function
>to the original version.

>I have written a simplified test cast to verify the system, but it
>performs as I expected and it's wrong.

Once I remove the bare text from the test case, my 8.0b3 system seems to
run the whole thing pasted in with no errors. What version are you trying
it against?

---(end of broadcast)---
TIP 8: explain analyze is your friend


Re: [GENERAL] Index scan vs. Seq scan on timestamps

2004-12-07 Thread Stephan Szabo
On Mon, 6 Dec 2004, Stephen Frost wrote:

> * Stephan Szabo ([EMAIL PROTECTED]) wrote:
> > On Mon, 6 Dec 2004, Per Jensen wrote:
> > > select count(*)
> > > from accesslog
> > > where time  between (timeofday()::timestamp - INTERVAL '30 d') and
> > > timeofday()::timestamp;
> >
> > Besides the type issue, timeofday() is volatile and thus is not allowed to
> > be turned into a constant in order to do an index scan because it's
> > allowed to return different values for every row of the input.
>
> Is there a way to say "just take the value of this function at the start
> of the transaction and then have it be constant" in a query?

I can't think of a general one unless you make some kind of session
variable functions where the get was stable.  In this particular case
now() or CURRENT_TIMESTAMP is a stable at transaction start time value.

Currently you can fake the system out by using a scalar subselect or
writing a wrapper function that lies about volatility, but I don't believe
that those are considered guaranteed to keep working forever.


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


Re: [GENERAL] Performance tuning on RedHat Enterprise Linux 3

2004-12-07 Thread P.J. \"Josh\" Rovero
There are many reports of kernel problems with memory allocation
(too agressive) and swap issues with RHEL 3.0 on both RAID
and non-RAID systems.  I hope folks have worked through all
those issues before blaming postgresql.
Tom Lane wrote:
If I thought that a 200% error in memory usage were cause for a Chinese
fire drill, then I'd say "yeah, let's do that".  The problem is that the
place where performance actually goes into the toilet is normally an
order of magnitude or two above the nominal sort_mem setting (for
obvious reasons: admins can't afford to push the envelope on sort_mem
because of the various unpredictable multiples that may apply).  So
switching to a hugely more expensive implementation as soon as we exceed
some arbitrary limit is likely to be a net loss not a win.
If you can think of a spill methodology that has a gentle degradation
curve, then I'm all for that.  But I doubt there are any quick-hack
improvements to be had here.
			regards, tom lane
--
P. J. "Josh" Rovero Sonalysts, Inc.
Email: [EMAIL PROTECTED]www.sonalysts.com215 Parkway North
Work: (860)326-3671 or 442-4355 Waterford CT 06385
***
---(end of broadcast)---
TIP 6: Have you searched our list archives?
  http://archives.postgresql.org


[GENERAL] RC1, missing -lpthread when building with --disable-shared on i686

2004-12-07 Thread Frank van Vugt
L.S.

I noticed the following :


Workstation used to build RC1:

2.4.21-260-athlon, i686 athlon i386 GNU/Linux


Configured with : 

./configure 
--enable-thread-safety 
--disable-shared 
--prefix=/usr/src/postgresql/install


Error during make install :

in directory src/bin/pg_ctl

gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wendif-labels 
-fno-strict-aliasing pg_ctl.o  -L../../../src/interfaces/libpq -lpq 
-L../../../src/port  -Wl,-rpath,/usr/src/postgresql/install/lib -lpgport -lz 
-lreadline -lcrypt -lresolv -lnsl -ldl -lm  -o pg_ctl
../../../src/interfaces/libpq/libpq.a(fe-secure.o)(.text+0x140): In function 
`pq_block_sigpipe':
: undefined reference to `pthread_sigmask'
../../../src/interfaces/libpq/libpq.a(fe-secure.o)(.text+0x1e0): In function 
`pq_reset_sigpipe':
: undefined reference to `pthread_sigmask'
collect2: ld gaf exit-status 1 terug


There seems to be a missing option '-lpthread' here, adding it properly links 
the file.

The same goes for pg_restore, pg_dumpall, psql, createdb, createlang, 
createuser, dropdb, droplang, dropuser, clusterdb and vacuumdb.





-- 
Best,




Frank.


---(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: [GENERAL] RC1, missing -lpthread when building with --disable-shared

2004-12-07 Thread Bruce Momjian

What do you show for PTHREAD_* in Makefile.global?

Is this another platform where the library doesn't remember dependencies
used when it was built?  It is Linux so I wouldn't think so.

---

Frank van Vugt wrote:
> L.S.
> 
> I noticed the following :
> 
> 
> Workstation used to build RC1:
>   
>   2.4.21-260-athlon, i686 athlon i386 GNU/Linux
> 
> 
> Configured with : 
> 
>   ./configure 
>   --enable-thread-safety 
>   --disable-shared 
>   --prefix=/usr/src/postgresql/install
> 
> 
> Error during make install :
> 
>   in directory src/bin/pg_ctl
> 
> gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wendif-labels 
> -fno-strict-aliasing pg_ctl.o  -L../../../src/interfaces/libpq -lpq 
> -L../../../src/port  -Wl,-rpath,/usr/src/postgresql/install/lib -lpgport -lz 
> -lreadline -lcrypt -lresolv -lnsl -ldl -lm  -o pg_ctl
> ../../../src/interfaces/libpq/libpq.a(fe-secure.o)(.text+0x140): In function 
> `pq_block_sigpipe':
> : undefined reference to `pthread_sigmask'
> ../../../src/interfaces/libpq/libpq.a(fe-secure.o)(.text+0x1e0): In function 
> `pq_reset_sigpipe':
> : undefined reference to `pthread_sigmask'
> collect2: ld gaf exit-status 1 terug
> 
> 
> There seems to be a missing option '-lpthread' here, adding it properly links 
> the file.
> 
> The same goes for pg_restore, pg_dumpall, psql, createdb, createlang, 
> createuser, dropdb, droplang, dropuser, clusterdb and vacuumdb.
> 
> 
> 
> 
> 
> -- 
> Best,
> 
> 
> 
> 
> Frank.
> 
> 
> ---(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
> 

-- 
  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 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [GENERAL] Fwd: 8.0 vs. 7.4 benchmarks

2004-12-07 Thread Bruno Wolff III
On Tue, Dec 07, 2004 at 14:47:58 +0530,
  Postgres Learner <[EMAIL PROTECTED]> wrote:
> 
> Has anyone done any performance benchmarking of postgresql 7.4 vs 8.0?
> Are there any scenarios where 8.0 can be expected to be faster? 

Have you read the release notes?

> I would love to get my hands on any numbers that someone might have.
> 
> Also does anyone know how long it will take for a stable release of
> 8.0 to come (any estimates would be good) ? 

The last target date I saw mentioned was 2004-12-15. If a second release
candidate is needed, I don't know if that date will be met.

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


Re: [GENERAL] RC1, missing -lpthread when building with --disable-shared on i686

2004-12-07 Thread Frank van Vugt
> What do you show for PTHREAD_* in Makefile.global?

PTHREAD_CFLAGS  =  -pthread  -D_REENTRANT -D_THREAD_SAFE 
-D_POSIX_PTHREAD_SEMANTICS
PTHREAD_LIBS=  -lpthread

> Is this another platform where the library doesn't remember dependencies
> used when it was built?  It is Linux so I wouldn't think so.

Yeah, early in the beta-cycle builds on my Slackware v9.1 server showed 
symptoms like this, but these were already handled a while ago. This comes up 
just now since I started to use RC1 on my development workstation, which runs 
SuSE (v9.0 for that matter, will be able to try v9.1 in a couple of hours and 
v9.2 tomorrow, it you'd like).


-- 
Best,




Frank.


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


[GENERAL] postgresql and javascript

2004-12-07 Thread RobertD . Stewart








Does anyone know how to connect  _javascript_ to a postgresql
database

Please send example if anyone has done it

 

 

thanks

 

Robert Stewart

Network Eng

Commonwealth Office of Technology

Finance and Administration Cabinet

101 Cold Harbor

Work # 502 564 9696

Cell # 502 330 5991

Email [EMAIL PROTECTED]

 








[GENERAL] vacuum problem?

2004-12-07 Thread marcelo Cortez
 hello to all 

the scene is following:

 /psql someDatabase 
 vaccum full verbose;
but nothing informs. 
in which cases vacuum do not inform anything? 
postgresql 7.4 on red hat 9.0 
any clue be appreciate.
best regards 

  klingon

 PS: the application has problems for that reason it
wanted to verify the database and the table.






___ 
¡Llevate a Yahoo! en tu Unifón! 
Ahora podés usar Yahoo! Messenger en tu Unifón, en cualquier momento y lugar. 
Encontrá más información en: http://ar.mobile.yahoo.com/sms.html 


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])