Re: [GENERAL] pgAdmin complains about vacuuming required after fresh 8.1 install

2008-06-12 Thread Collin Peters
Bump Does anyone have *any* thoughts on this? This seems to be a fairly common problem. Does anybody have any good links that they can provide to find an answer? My current test is that I have a table where all the rows were purged, and then new ones inserted using a specific job. pgAdmin

[GENERAL] how to kill postgreSQL session

2008-06-12 Thread sang hyun Lee
Hi there, I'm a developer who is working on PostgreSQL API and i got stuck in Terminating session. I'm working on PostgreSQL 8.3. Please, help if anyone has ideas on how to kill PostgreSQL session. i found this code in misc.c #ifdef NOT_USED /* Disabled in 8.0 due to reliability

[GENERAL] Fw: postgrepsql vacuum

2008-06-12 Thread wenjing wu
Hi, Our site run into a pnfs server failure, because of the postgresql transaction id wraparound problem, Now , I am trying to vacuum the database companion in the standalone model: [EMAIL PROTECTED] /var/lib/pgsql/data/pg_log# su - postgres -bash-3.00$ postgres -D /var/lib/pgsql/data

[GENERAL] pl/pgsql function with argument of type DATE

2008-06-12 Thread Bojan
How to invoke function which has arguments declared as type “date”? I want to make function which will return a list of all dates between starting and ending date which are two arguments of that function. I tried with: select * from foo(2008-06-01, 2008-06-09) select * from

Re: [GENERAL] IN vs EXISTS

2008-06-12 Thread askel
Tom, I'm using 8.3.1. I did run EXPLAIN but have never familiarized myself with how to read/use it beside simple comparing cost estimation and whether there is any seq scan that can benefit from creating index. Thanks for replying On Jun 7, 11:19 am, [EMAIL PROTECTED] (Tom Lane) wrote: askel

[GENERAL] to_tsvector: error with italian configuration

2008-06-12 Thread Giorgio Valoti
Hi all, I was looking into PostgreSQL’s full-text search but when using the to_tsvector function with italian settings I get this error: test= select to_tsvector('italian','prova'); ERROR: invalid byte sequence for encoding UTF8: 0xc3 HINT: This error can also happen if the byte sequence does

Re: [GENERAL] pgAdmin complains about vacuuming required after fresh 8.1 install

2008-06-12 Thread Dave Page
On Thu, Jun 12, 2008 at 7:18 AM, Collin Peters [EMAIL PROTECTED] wrote: Bump Does anyone have *any* thoughts on this? This seems to be a fairly common problem. Does anybody have any good links that they can provide to find an answer? My current test is that I have a table where all the

Re: [GENERAL] pl/pgsql function with argument of type DATE

2008-06-12 Thread A. Kretschmer
am Tue, dem 10.06.2008, um 18:02:01 +0100 mailte Bojan folgendes: How to invoke function which has arguments declared as type ?date?? I want to make function which will return a list of all dates between starting and ending date which are two arguments of that function. I tried

Re: [GENERAL] pgAdmin complains about vacuuming required after fresh 8.1 install

2008-06-12 Thread Guillaume Lelarge
Collin Peters a écrit : Does anyone have *any* thoughts on this? This seems to be a fairly common problem. Does anybody have any good links that they can provide to find an answer? My current test is that I have a table where all the rows were purged, and then new ones inserted using a

Re: [GENERAL] pgAdmin complains about vacuuming required after fresh 8.1 install

2008-06-12 Thread Dave Page
On Thu, Jun 12, 2008 at 9:30 AM, Guillaume Lelarge [EMAIL PROTECTED] wrote: They don't use the same algorithms. Which, it should be noted, is intentional, so pgAdmin has a chance to warn you if your autovac settings are screwy. -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com --

Re: [GENERAL] pl/pgsql function with argument of type DATE

2008-06-12 Thread Pavel Stehule
2008/6/10 Bojan [EMAIL PROTECTED]: How to invoke function which has arguments declared as type date? I want to make function which will return a list of all dates between starting and ending date which are two arguments of that function. I tried with: select * from foo(2008-06-01,

Re: [GENERAL] Heavily fragmented table and index data in 8.0.3

2008-06-12 Thread Zoltan Boszormenyi
Gregory Stark írta: Zoltan Boszormenyi [EMAIL PROTECTED] writes: Also, VACUUM FULL also takes too much time, on an otherwise idle database, I worked on a copy of their live database. During VACUUM, _bt_getbuf() was also called repeatedly with the block number jumping up and down.

Re: [GENERAL] Insert into master table - 0 rows affected - Hibernate problems

2008-06-12 Thread Magnus Hagander
I think you could do overlapping CHECK constraints for the rules for a very short period of time. Querying for just that time will hit both partitions, so it won't be perfect from a performance standpoint, but it would only do that for a very small timeframe. And I can certainly agree it's not

Re: [GENERAL] Unable to dump database using pg_dump

2008-06-12 Thread Adam Dear
I'm comfortable enough with it that I can edit it if I can find exactly what to edit. Whats the best way to edit the file? I've opened it using: vim -b 1260 Here is what is at the end of the block in the file. If you could point me in the right direction, I'd appreciate it. @[EMAIL

Re: [GENERAL] array column and b-tree index allowing only 8191 bytes

2008-06-12 Thread Alvaro Herrera
Celso Pinto wrote: What, if any, would be the recommended options to improve this scenario? Not using intarray? :-) Not using a broken design. Arrays are a poor fit in the relational model. Avoid them. -- Alvaro Herrerahttp://www.CommandPrompt.com/

Re: [GENERAL] pg_query $result re-fill

2008-06-12 Thread Stefan Schwarzer
Here I would like to check: IF param1 75 THEN region-in-$result-should-be-set-to-NULL Not sure I get what all you're wanting to do from your message, but could you use a case statement in sql to do this? Or put it in the where clause? I knew it too be a bit complicated to explain

[GENERAL] defining a variable

2008-06-12 Thread luca . ciciriello
DI VACANZE ? A Riccione i Family Hotels sono gli alberghi specializzati per le vacanze dei bambini Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=7983d=20080612 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] Unable to dump database using pg_dump

2008-06-12 Thread Alvaro Herrera
Adam Dear wrote: I'm comfortable enough with it that I can edit it if I can find exactly what to edit. Whats the best way to edit the file? I've opened it using: vim -b 1260 Here is what is at the end of the block in the file. If you could point me in the right direction, I'd

Re: [GENERAL] Heavily fragmented table and index data in 8.0.3

2008-06-12 Thread Alvaro Herrera
Zoltan Boszormenyi wrote: This is so embarrassing that the file and its only index used up only 3.3MB, at the time of my testing no one else used the database, shared_buffers is large enough to hold both the index and the table data totally: I would be embarrased if this was on a recent

[GENERAL] Nested IMMUTABLE functions

2008-06-12 Thread Peter
I have two immutable Pl/PG funcs - func A takes a parameter X, looks up related value Y from a table and passes Y to func B. Now, if I do something like select A(field_x) from bigtable it will, of course call A for every single row since paramater is changing. However, it also calls func B for

Re: [GENERAL] Unable to dump database using pg_dump

2008-06-12 Thread Tom Lane
Adam Dear [EMAIL PROTECTED] writes: I'm comfortable enough with it that I can edit it if I can find exactly what to edit. Whats the best way to edit the file? I've opened it using: vim -b 1260 Here is what is at the end of the block in the file. If you could point me in the right

Re: [GENERAL] Heavily fragmented table and index data in 8.0.3

2008-06-12 Thread Tom Lane
Zoltan Boszormenyi [EMAIL PROTECTED] writes: The realtime trace I captured from the hung INSERT shows that it enters two functions repeatedly: _bt_relandgetbuf() and _bt_compare(). The pattern in which these functions entered match either _bt_moveright() or _bt_insertonpg(). What that sounds

Re: [GENERAL] Fw: postgrepsql vacuum

2008-06-12 Thread Tom Lane
wenjing wu [EMAIL PROTECTED] writes: Now , I am trying to vacuum the database companion in the standalone model: [EMAIL PROTECTED] /var/lib/pgsql/data/pg_log# su - postgres -bash-3.00$ postgres -D /var/lib/pgsql/data This is defaulting to connecting to database postgres ...

Re: [GENERAL] Heavily fragmented table and index data in 8.0.3

2008-06-12 Thread Zoltan Boszormenyi
Tom Lane írta: Zoltan Boszormenyi [EMAIL PROTECTED] writes: The realtime trace I captured from the hung INSERT shows that it enters two functions repeatedly: _bt_relandgetbuf() and _bt_compare(). The pattern in which these functions entered match either _bt_moveright() or

Re: [GENERAL] Determining offsets to jump to grab a group of records

2008-06-12 Thread David Lambert
Scott Marlowe wrote: Yes there is. Use an indexed id field of some kind. select * from table where idfield between 0 and 100; select * from table where idfield between 100 and 1000100; Will both be equally fast. Offset / limit syntax requires the db to materialize offset+limit rows for

Re: [GENERAL] Heavily fragmented table and index data in 8.0.3

2008-06-12 Thread Andrew Sullivan
On Thu, Jun 12, 2008 at 05:31:37PM +0200, Zoltan Boszormenyi wrote: Hardware is from Sun, not a grocery store PC, so I don't suppose it to be faulty. FWIW, I had a pair of E4500s in one job that I would _happily_ have traded for any beige box you care to mention. Heck, at the end I mighta

Re: [GENERAL] Heavily fragmented table and index data in 8.0.3

2008-06-12 Thread Joshua D. Drake
On Thu, 2008-06-12 at 11:56 -0400, Andrew Sullivan wrote: On Thu, Jun 12, 2008 at 05:31:37PM +0200, Zoltan Boszormenyi wrote: Hardware is from Sun, not a grocery store PC, so I don't suppose it to be faulty. FWIW, I had a pair of E4500s in one job that I would _happily_ have traded

Re: [GENERAL] Unable to dump database using pg_dump

2008-06-12 Thread Adam Dear
I downloaded a hex editor, but honestly, I can't make heads or tails of what I'm looking at. I'm not sure what needs changing. Also, FYI, you mentioned that you thought I had deleted the record with ctid=(0,2). I did delete that, but thats what caused the database to not work. I restored a

Re: [GENERAL] Heavily fragmented table and index data in 8.0.3

2008-06-12 Thread Tom Lane
Zoltan Boszormenyi [EMAIL PROTECTED] writes: Tom Lane írta: What that sounds like to me is a corrupt index (infinite loop of right-links, perhaps). Have you tried REINDEXing the table? How can such an infinite loop sneak into an index? Hardware is from Sun, not a grocery store PC, so I

Re: [GENERAL] Unable to dump database using pg_dump

2008-06-12 Thread Tom Lane
Adam Dear [EMAIL PROTECTED] writes: If I restored the data directory again wouldn't that undo the Vacuum Freeze command that I did that has locked the database into the state that it is in now? It'd undo the freeze, but that doesn't get you any closer to a solution. What you need is to get

Re: [GENERAL] Unable to dump database using pg_dump

2008-06-12 Thread Adam Dear
Let me ask this question. Is there any other option for moving data from one server to another that doesn't involve pg_dump? If I can get the data out of this server, and onto my new one I don't care if the old server gets fixed. I just need the data. The new server already has the table

Re: [GENERAL] Unable to dump database using pg_dump

2008-06-12 Thread Joshua D. Drake
On Thu, 2008-06-12 at 11:33 -0500, Adam Dear wrote: Let me ask this question. Is there any other option for moving data from one server to another that doesn't involve pg_dump? If I can get the data out of this server, and onto my new one I don't care if the old server gets fixed. I

Re: [GENERAL] Unable to dump database using pg_dump

2008-06-12 Thread Alvaro Herrera
Adam Dear wrote: Let me ask this question. Is there any other option for moving data from one server to another that doesn't involve pg_dump? If I can get the data out of this server, and onto my new one I don't care if the old server gets fixed. I just need the data. The new server

Re: [GENERAL] Unable to dump database using pg_dump

2008-06-12 Thread Tom Lane
Adam Dear [EMAIL PROTECTED] writes: Let me ask this question. Is there any other option for moving data from one server to another that doesn't involve pg_dump? If I can get the data out of this server, and onto my new one I don't care if the old server gets fixed. I just need the data.

Re: [GENERAL] Unable to dump database using pg_dump

2008-06-12 Thread Adam Dear
What is Slony? I have a super user account for the server and the database. Joshua D. Drake wrote: On Thu, 2008-06-12 at 11:33 -0500, Adam Dear wrote: Let me ask this question. Is there any other option for moving data from one server to another that doesn't involve pg_dump? If I can get

Re: [GENERAL] Unable to dump database using pg_dump

2008-06-12 Thread Craig Ringer
Adam Dear wrote: Let me ask this question. Is there any other option for moving data from one server to another that doesn't involve pg_dump? If I can get the data out of this server, and onto my new one I don't care if the old server gets fixed. I just need the data. The new server

Re: [GENERAL] defining a variable

2008-06-12 Thread Raymond O'Donnell
On 12/06/2008 14:37, [EMAIL PROTECTED] wrote: I need to create a sql script and launch it from pgadmin. In this script some sql statements (INSERT) have to depend from the result of previous statements (SELECT). Is there a way to define a variable in SQL and set its value with the result of a

Re: [GENERAL] IN vs EXISTS

2008-06-12 Thread Jeff Davis
On Sat, 2008-06-07 at 08:59 -0500, Adam Rich wrote: what's faster on one dbms my be different than another. I've found that postgresql is usually slower than other databases for IN () queries, but handles EXISTS and inner joins (a third way of writing your queries above) quite quickly. Do

[GENERAL] Win32 8.3.3 install fail (sufficient privileges to install system services).

2008-06-12 Thread Terry Yapt
I did installed 8.3.1 on WinXP Prof. and all was ok. After that successful install I have tried to install 8.2.x without success several times on the same workstation. Today I have tried to install 8.3.3 and I have stuck on the same error: === Service 'PostgreSQL Database

Re: [GENERAL] Win32 8.3.3 install fail (sufficient privileges to install system services).

2008-06-12 Thread Raymond O'Donnell
On 12/06/2008 18:21, Terry Yapt wrote: I did installed 8.3.1 on WinXP Prof. and all was ok. After that successful install I have tried to install 8.2.x without success several times on the same workstation. Today I have tried to install 8.3.3 and I have stuck on the same error: Did you

Re: [GENERAL] how to kill postgreSQL session

2008-06-12 Thread Bruce Momjian
I'm a developer who is working on PostgreSQL API and i got stuck in Terminating session. I'm working on PostgreSQL 8.3. Please, help if anyone has ideas on how to kill PostgreSQL session. i found this code in misc.c #ifdef NOT_USED /* Disabled in 8.0 due to reliability concerns;

Re: [GENERAL] Win32 8.3.3 install fail (sufficient privileges to

2008-06-12 Thread Terry Yapt
Raymond O'Donnell escribió: On 12/06/2008 18:21, Terry Yapt wrote: I did installed 8.3.1 on WinXP Prof. and all was ok. After that successful install I have tried to install 8.2.x without success several times on the same workstation. Today I have tried to install 8.3.3 and I have stuck

Re: [GENERAL] Win32 8.3.3 install fail (sufficient privileges to

2008-06-12 Thread Terry Yapt
Raymond O'Donnell escribió: On 12/06/2008 18:21, Terry Yapt wrote: I did installed 8.3.1 on WinXP Prof. and all was ok. After that successful install I have tried to install 8.2.x without success several times on the same workstation. Today I have tried to install 8.3.3 and I have stuck

Re: [GENERAL] Win32 8.3.3 install fail (sufficient privileges to

2008-06-12 Thread Raymond O'Donnell
On 12/06/2008 19:38, Terry Yapt wrote: Answering to myself: Version of PostgreSQL Database: SELECT VERSION(); Heh - beat me to it. :-) Glad you're sorted. Ray. -- Raymond O'Donnell, Director of Music, Galway Cathedral,

Re: [GENERAL] Win32 8.3.3 install fail (sufficient privileges to install system services).

2008-06-12 Thread Stephen Denne
Terry Yapt wrote: I did installed 8.3.1 on WinXP Prof. and all was ok. After that successful install I have tried to install 8.2.x without success several times on the same workstation. Today I have tried to install 8.3.3 and I have stuck on the same error: === Service

Re: [GENERAL] file system level backup

2008-06-12 Thread iztech
On Jun 12, 6:31 am, iztech [EMAIL PROTECTED] wrote: i have just switched to posgresql and installed for use with ruby. i need to move my app and database to a new server. since i can shut down the server i think it will be easier for me to do a file system level back up. when i try to shut

[GENERAL] understanding a nested query

2008-06-12 Thread Rowan
I would like to create a nested statement but am unsure of the correct syntax. My statement shoudl read someting like SELECT field1, field2 FROM table WHERE name ILIKE xxx AND ( street ILIKE or street2 ILIKE ) so basically it needs to match name and either street or street 2.. any

[GENERAL] PostgreSQL Syntax questions

2008-06-12 Thread krishtpt
Hi There, I am new to Postgresql. I have few questions regarding the sql syntax in Postgresql. 1. I am trying to disable constraints from a particular table in postgresql. But I couldn't get the alter command for the same. 2. I am trying to fetch all the constraints from a specific table using

[GENERAL] file system level backup

2008-06-12 Thread iztech
i have just switched to posgresql and installed for use with ruby. i need to move my app and database to a new server. since i can shut down the server i think it will be easier for me to do a file system level back up. when i try to shut the server down i get this message sudo -u postgres

Re: [GENERAL] PostgreSQL Syntax questions

2008-06-12 Thread Ben
On Thu, 12 Jun 2008, krishtpt wrote: 1. I am trying to disable constraints from a particular table in postgresql. But I couldn't get the alter command for the same. The documentation is generally pretty good, if you know what you're looking for. At what point in reading

Re: [GENERAL] understanding a nested query

2008-06-12 Thread Ben
On Thu, 12 Jun 2008, Rowan wrote: I would like to create a nested statement but am unsure of the correct syntax. My statement shoudl read someting like SELECT field1, field2 FROM table WHERE name ILIKE xxx AND ( street ILIKE or street2 ILIKE ) so basically it needs to match name and

Re: [GENERAL] file system level backup

2008-06-12 Thread Craig Ringer
iztech wrote: On Jun 12, 6:31 am, iztech [EMAIL PROTECTED] wrote: i have just switched to posgresql and installed for use with ruby. i need to move my app and database to a new server. since i can shut down the server i think it will be easier for me to do a file system level back up.