Re: [GENERAL] Postgresql Database Lock Problem

2009-11-18 Thread shohorab hossain
The statement that creates lock and waiting is in following. This is from pg_stats and pg_stat_activity view. Here AD_Sequence is a table that maintains sequence number for all database objects. It automatically generates primary key value for all table insert. I think it also generates

Re: [GENERAL] Postgresql Database Lock Problem

2009-11-18 Thread shohorab hossain
At first I would like to thank you all for your quick response. Now my question is why two processes ID 19181 and 19196 are trying to access the same transaction 18386574 at the same time. Here I have got Process ID, Transaction ID and SQL statement from pg_locks and pg_stat_activity view. Is

Re: [GENERAL] Postgresql Database Lock Problem

2009-11-18 Thread shohorab hossain
Now I am using the following parameter to temporary resolve the locking problem statment_timeout = 20s With Thanks Regards: - Shohorab Hossain - Original Message From: shohorab hossain shohora...@yahoo.com To: Tom Lane t...@sss.pgh.pa.us Cc:

Re: [GENERAL] passing parameters to multiple statements

2009-11-18 Thread Ivan Sergio Borgonovo
On Tue, 17 Nov 2009 20:16:36 -0800 David Fetter da...@fetter.org wrote: On Tue, Nov 17, 2009 at 09:33:05AM -0700, Konstantin Izmailov wrote: Some companies have policy to stay DB agnostic, i.e. use standard SQL only. That's called shooting yourself in the head. I'm a small fish. I use

Re: [GENERAL] Data Directory size increasing abnormally

2009-11-18 Thread Joao Ferreira gmail
A strange behaviour is observerd in the physical files with respect to this table. The size of the file is growing abnormally in GBs. Suppose the file name (oid of relation )with respect to the table is 18924 I could find entries of 1 GB files like 18924, 18924.1, 18924.2 ,

Re: [GENERAL] passing parameters to multiple statements

2009-11-18 Thread Pavel Stehule
2009/11/18 Ivan Sergio Borgonovo m...@webthatworks.it: On Tue, 17 Nov 2009 20:16:36 -0800 David Fetter da...@fetter.org wrote: On Tue, Nov 17, 2009 at 09:33:05AM -0700, Konstantin Izmailov wrote: Some companies have policy to stay DB agnostic, i.e. use standard SQL only. That's called

[GENERAL] vacuumdb: vacuuming of database xy failed: PANIC: corrupted item pointer: 19227

2009-11-18 Thread Tech 2010
Hello! How do I location of this pointer and how do I zero it so I can access the rest of the data? zero_damaged_pages = true did not help in this case, because I always get same numbers being zeroed. This is with 8.4.0 and 8.4.1. Thanks. -- Sent via pgsql-general mailing list

Re: [GENERAL] passing parameters to multiple statements

2009-11-18 Thread Ivan Sergio Borgonovo
On Wed, 18 Nov 2009 11:38:46 +0100 Pavel Stehule pavel.steh...@gmail.com wrote: 2009/11/18 Ivan Sergio Borgonovo m...@webthatworks.it: On Tue, 17 Nov 2009 20:16:36 -0800 David Fetter da...@fetter.org wrote: On Tue, Nov 17, 2009 at 09:33:05AM -0700, Konstantin Izmailov wrote: Some

Re: [GENERAL] vacuumdb: vacuuming of database xy failed: PANIC: corrupted item pointer: 19227

2009-11-18 Thread Thom Brown
2009/11/18 Tech 2010 tch...@gmail.com: Hello! How do I location of this pointer and how do I zero it so I can access the rest of the data? zero_damaged_pages = true did not help in this case, because I always get same numbers being zeroed. This is with 8.4.0 and 8.4.1. Thanks. You

[GENERAL] Creating new database

2009-11-18 Thread Malcolm Warren
Dear All, I've been using a single database for many years. I'd now like to create a new separate database with most of the same tables, so that I don't have to re-write my code, I'd like to just use a different Tomcat datasource to access it. I had imagined this would be as simple as : 1)

Re: [GENERAL] Creating new database

2009-11-18 Thread Raymond O'Donnell
On 18/11/2009 11:48, Malcolm Warren wrote: Let's say the old database is called database1, and I've created a new database2. When I import the pg_dump into database2, it tells me that the tables already exist (obviously it's talking about the tables in database1). But I surely I've created

[GENERAL] column does not exist error

2009-11-18 Thread Dave Coventry
Tearing my hair out, can anyone see what I'm doing wrong? SELECT title FROM node WHERE type=client; ERROR: column client does not exist LINE 1: SELECT title FROM node WHERE type=client; Yet this works: SELECT type FROM node; type client client client client client (5 rows)

Re: [GENERAL] column does not exist error

2009-11-18 Thread Raymond O'Donnell
On 18/11/2009 13:23, Dave Coventry wrote: Tearing my hair out, can anyone see what I'm doing wrong? SELECT title FROM node WHERE type=client; You need to quote literal values: SELECT title FROM node WHERE type='client'; Otherwise PG thinks you're referring to a column called client, as

Re: [GENERAL] column does not exist error

2009-11-18 Thread Naoko Reeves
SELECT title FROM node WHERE type='client'; Would this work? -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Dave Coventry Sent: Wednesday, November 18, 2009 6:24 AM To: pgsql-general General Subject: [GENERAL] column

Re: [GENERAL] column does not exist error

2009-11-18 Thread Thomas Kellerer
Dave Coventry, 18.11.2009 14:23: Tearing my hair out, can anyone see what I'm doing wrong? SELECT title FROM node WHERE type=client; ERROR: column client does not exist LINE 1: SELECT title FROM node WHERE type=client; You are missing the quotes to identify a character literal: SELECT

Re: [GENERAL] passing parameters to multiple statements

2009-11-18 Thread Pavel Stehule
2009/11/18 Ivan Sergio Borgonovo m...@webthatworks.it: On Wed, 18 Nov 2009 11:38:46 +0100 Pavel Stehule pavel.steh...@gmail.com wrote: 2009/11/18 Ivan Sergio Borgonovo m...@webthatworks.it: On Tue, 17 Nov 2009 20:16:36 -0800 David Fetter da...@fetter.org wrote: On Tue, Nov 17, 2009 at

Re: [GENERAL] Creating new database

2009-11-18 Thread Vidhya Bondre
can you specify the exact commands and the sequence. With this set up it should work. how do you import the data. Vidhya On Wed, Nov 18, 2009 at 5:18 PM, Malcolm Warren malc...@villeinitalia.comwrote: Dear All, I've been using a single database for many years. I'd now like to create a new

Re: [GENERAL] column does not exist error

2009-11-18 Thread Vidhya Bondre
Can you try reframing it as : SELECT title FROM node WHERE type='client; Regards Vidhya On Wed, Nov 18, 2009 at 6:53 PM, Dave Coventry dgcoven...@gmail.com wrote: Tearing my hair out, can anyone see what I'm doing wrong? SELECT title FROM node WHERE type=client; ERROR: column client

Re: [GENERAL] column does not exist error

2009-11-18 Thread Thomas Markus
Hi, try SELECT title FROM node WHERE type='client'; hth Thomas Dave Coventry schrieb: Tearing my hair out, can anyone see what I'm doing wrong? SELECT title FROM node WHERE type=client; ERROR: column client does not exist LINE 1: SELECT title FROM node WHERE type=client; Yet this

[GENERAL] advocating pgsql was:passing parameters to multiple statements

2009-11-18 Thread Ivan Sergio Borgonovo
On Wed, 18 Nov 2009 14:39:05 +0100 Pavel Stehule pavel.steh...@gmail.com wrote: Standard is good. And I prefere standard everywhere, where is [snip] Any dogmatism is wrong - yes. But minimally me - and probably David has very bad experience with design ala all sql code for all databases.

Re: [GENERAL] column does not exist error

2009-11-18 Thread Scott Marlowe
Type may be a reserved keyword and need double quoting: where type='client'; On Wed, Nov 18, 2009 at 6:23 AM, Dave Coventry dgcoven...@gmail.com wrote: Tearing my hair out, can anyone see what I'm doing wrong?  SELECT title FROM node WHERE type=client; ERROR:  column client does not exist

Re: [GENERAL] passing parameters to multiple statements

2009-11-18 Thread Thomas Kellerer
Konstantin Izmailov, 17.11.2009 17:33: This is why they want to use multiple statements Which is not portable as well. Actually the only database I know which permits sending more than one statement in one string is SQL Server... Thomas -- Sent via pgsql-general mailing list

Re: [GENERAL] passing parameters to multiple statements

2009-11-18 Thread Daniel Verite
Konstantin Izmailov wrote: Some companies have policy to stay DB agnostic, i.e. use standard SQL only. Good luck with that. For example, querying the lastval of a sequence, as your sample code does, already falls outside of standard SQL, AFAIK. If PQexecParams does not support

Re: [GENERAL] Creating new database

2009-11-18 Thread Joao Ferreira gmail
I'dd suggest: pgdumpall --clean dump.sql edit the dump.sql file by hand replacing database name and owners and so... then reload into the new DB with psql -f dump.sql postgres this does all the work except creation of users and databases should give you an exact replica with all data inside

[Fwd: Re: [GENERAL] Creating new database]

2009-11-18 Thread Malcolm Warren
---BeginMessage--- Thank you very much for your replies. It's clear to me from your replies that something very odd is going on, not least because I now see that if I connect with: psql template1 I see everything in database1, including data, whereas template1 should be empty. Luckily

Re: [GENERAL] Creating new database

2009-11-18 Thread Scott Marlowe
On Wed, Nov 18, 2009 at 8:12 AM, Joao Ferreira gmail joao.miguel.c.ferre...@gmail.com wrote: I'dd suggest: pgdumpall --clean dump.sql I'd think he'd be much better off with pg_dump, not pg_dumpall. pg_dump srcdb | psql destdb you can add -s as a pg_dump switch if all you want is the schema.

Re: [GENERAL] Creating new database

2009-11-18 Thread Joao Ferreira gmail
On Wed, 2009-11-18 at 08:39 -0700, Scott Marlowe wrote: On Wed, Nov 18, 2009 at 8:12 AM, Joao Ferreira gmail joao.miguel.c.ferre...@gmail.com wrote: I'dd suggest: pgdumpall --clean dump.sql I'd think he'd be much better off with pg_dump, not pg_dumpall. yes, agree. sorry. joao

[GENERAL] Out of sync Primary Key Index

2009-11-18 Thread Dave Coventry
I have deleted a record from a table and am now getting errors: INSERT INTO content_node_field (field_name, type, global_settings, required, multiple, db_storage, module, db_columns, active, locked) VALUES ('field_client_name', 'text',

Re: [GENERAL] Out of sync Primary Key Index

2009-11-18 Thread Adrian Klaver
- Dave Coventry dgcoven...@gmail.com wrote: I have deleted a record from a table and am now getting errors: INSERT INTO content_node_field (field_name, type, global_settings, required, multiple, db_storage, module, db_columns, active, locked) VALUES ('field_client_name', 'text',

Re: [GENERAL] Out of sync Primary Key Index

2009-11-18 Thread Bill Moran
In response to Dave Coventry dgcoven...@gmail.com: I have deleted a record from a table and am now getting errors: INSERT INTO content_node_field (field_name, type, global_settings, required, multiple, db_storage, module, db_columns, active, locked) VALUES ('field_client_name', 'text',

[GENERAL] Totally fresh uninstall/reinstall of Postgres on MacBook Pro running Snow Leopard?

2009-11-18 Thread doug livesey
Hi -- I'm having a world of trouble getting Postgres to work with a number of ruby libraries, and was thinking that, to be sure that I'm eliminating all that could be wrong, I need to ensure that my Postgres install is fresh, correct, and as canonical as possible. Could someone advise me on the

Re: [GENERAL] passing parameters to multiple statements

2009-11-18 Thread Konstantin Izmailov
Ok, I accept reasoning that DB agnostic development is propbably a bad idea. The question should probably be re-introduced as Stored Procedures against multiple statements in Postgres. Here is my client opinion: SP’s have their place, as with any development, there’s many reasons for and against

Re: [GENERAL] Totally fresh uninstall/reinstall of Postgres on MacBook Pro running Snow Leopard?

2009-11-18 Thread Peter Hunsberger
On Wed, Nov 18, 2009 at 10:37 AM, doug livesey biot...@gmail.com wrote: Hi -- I'm having a world of trouble getting Postgres to work with a number of ruby libraries, and was thinking that, to be sure that I'm eliminating all that could be wrong, I need to ensure that my Postgres install is

Re: [GENERAL] Totally fresh uninstall/reinstall of Postgres on MacBook Pro running Snow Leopard?

2009-11-18 Thread doug livesey
What packages are those? Maybe I should look them up. (Sorry for the double-post, Peter.)

Re: [GENERAL] Totally fresh uninstall/reinstall of Postgres on MacBook Pro running Snow Leopard?

2009-11-18 Thread doug livesey
Ah, do you mean the postgres-pr gem? That seems to have done it, for now -- I shall see if it falls over when I use it in anger. Cheers, Doug. 2009/11/18 doug livesey biot...@gmail.com What packages are those? Maybe I should look them up. (Sorry for the double-post, Peter.)

Re: [GENERAL] Creating new database - SOLVED

2009-11-18 Thread Malcolm Warren
Dear All, Thank you for your emails which were very helpful. I've finally solved it. template1 was full of data, presumably somehow from a badly-run dump and restore. So when I created the new database, that too was full of data from the template. I ran a clean pg_dump on template1 from my

Re: [GENERAL] passing parameters to multiple statements

2009-11-18 Thread Pavel Stehule
2009/11/18 Konstantin Izmailov pgf...@gmail.com: Ok, I accept reasoning that DB agnostic development is propbably a bad idea. The question should probably be re-introduced as Stored Procedures against multiple statements in Postgres. Here is my client opinion: SP’s have their place, as with

Re: [GENERAL] Totally fresh uninstall/reinstall of Postgres on MacBook Pro running Snow Leopard?

2009-11-18 Thread doug livesey
Is that a custom version of Ruby Rails to work with Postgres, or the other way around? If the latter, that could be cool, but if the former, then not as useful, as it is with DataMapper Sinatra I'd really like to use the postgres db. But the postgres-pr is a fine compromise for the time being,

[GENERAL] DB terminating

2009-11-18 Thread Scott Felt
Hello. I have been having an issue with a database. The logs consistently show this: 2009-11-17 16:03:55 ESTLOG: 0: server process (PID 9644) exited with exit code 128 2009-11-17 16:03:55 ESTLOCATION: LogChildExit, .\src\backend\postmaster\postmaster.c:2705 2009-11-17 16:03:55 ESTLOG:

Re: [GENERAL] DB terminating [on Windows]

2009-11-18 Thread Richard Broersma
Magnus, any thoughts? On Wed, Nov 18, 2009 at 9:53 AM, Scott Felt scott.f...@gmail.com wrote: Hello.  I have been having an issue with a database.  The logs consistently show this: 2009-11-17 16:03:55 ESTLOG:  0: server process (PID 9644) exited with exit code 128 2009-11-17 16:03:55

Re: [GENERAL] DB terminating

2009-11-18 Thread Tom Lane
Scott Felt scott.f...@gmail.com writes: Hello. I have been having an issue with a database. The logs consistently show this: 2009-11-17 16:03:55 ESTLOG: 0: server process (PID 9644) exited with exit code 128 This looks like a fairly garden-variety backend crash, but with only this

Re: [GENERAL] Creating new database - SOLVED

2009-11-18 Thread John R Pierce
Malcolm Warren wrote: template1 was full of data, presumably somehow from a badly-run dump and restore. So when I created the new database, that too was full of data from the template. I ran a clean pg_dump on template1 from my production database and restored it on my test machine, and

Re: [GENERAL] DB terminating

2009-11-18 Thread Scott Felt
Thanks, Tom. I will alter the config file to give greater details as you suggest. Perhaps that will be sufficiently informative to point me toward a fix. Thank you. --Scott Tom Lane-2 wrote: Scott Felt scott.f...@gmail.com writes: Hello. I have been having an issue with a database.

[GENERAL] pg_standby instructions

2009-11-18 Thread akp geek
Hi All - I would like to know if any one has instructions on how to setup pg_standby, if so can you please share? Thanks for the help Regards -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] pg_standby instructions

2009-11-18 Thread Joshua D. Drake
On Wed, 2009-11-18 at 16:46 -0500, akp geek wrote: Hi All - I would like to know if any one has instructions on how to setup pg_standby, if so can you please share? If you are on a *nix platform, I would suggest PITRTools which utilizes pg_standby but gives you a more complete

Re: [GENERAL] Can anyone help setting up pgbouncer?

2009-11-18 Thread Nick
On Nov 18, 12:43 pm, d...@archonet.com (Richard Huxton) wrote: Nick wrote: So now the only step I have left is actually connecting. Im trying to connect a php script topgbouncerwith $conn = pg_connect(host=127.0.0.1 dbname=bouncer1 port=6543 user=nboutelier password=password); which

[GENERAL] DB terminating

2009-11-18 Thread Scott Felt
Hello. I have been having an issue with a database. The logs consistently show this: 2009-11-17 16:03:55 ESTLOG: 0: server process (PID 9644) exited with exit code 128 2009-11-17 16:03:55 ESTLOCATION: LogChildExit, .\src\backend\postmaster\postmaster.c:2705 2009-11-17 16:03:55 ESTLOG:

Re: [Fwd: Re: [GENERAL] Creating new database]

2009-11-18 Thread Skylar Saveland
pg_dumpall dumps a cluster of databases. Malcolm Warren wrote: -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To

[GENERAL] Re: vacuumdb: vacuuming of database xy failed: PANIC: corrupted item pointer: 19227

2009-11-18 Thread Tech 2010
On 18 nov., 13:40, thombr...@gmail.com (Thom Brown) wrote: 2009/11/18 Tech 2010 tch...@gmail.com: Hello! How do I location of this pointer and how do I zero it so I can access the rest of the data? zero_damaged_pages = true did not help in this case, because I always get same numbers

Re: [GENERAL] Can anyone help setting up pgbouncer?

2009-11-18 Thread Richard Huxton
Nick wrote: lsof -i | grep pgbouncer results in no output. Then it's either not running or not listening on a port (you did run that as root, didn't you?). Does ps aux | grep pgbouncer show it? Your pgbouncer logfile should show the File descriptor limit line followed by one or more

[GENERAL] Enum on-disk format

2009-11-18 Thread Scott Bailey
I'm trying to better understand the internals of Postgres, and I'm looking at the enum type. The docs say that an enum value is stored on disk as 4 bytes. But enum_send() returns a bytea representing the actual text of the value and not the index of that value. So what step am I missing here?

Re: [GENERAL] Enum on-disk format

2009-11-18 Thread Tom Lane
Scott Bailey arta...@comcast.net writes: I'm trying to better understand the internals of Postgres, and I'm looking at the enum type. The docs say that an enum value is stored on disk as 4 bytes. But enum_send() returns a bytea representing the actual text of the value and not the index of

Re: [GENERAL] Customize the install directory of the postgres DB

2009-11-18 Thread weixiang tam
Hi all, Thanks for the suggestion, i have tried out the option Thomas has mentioned by unzipping the db, and it works in our scenario. Just a question regarding the shared library. I have run the following command so that postgres can locate the shared library /sbin/ldconfig /home/app/pgsql/lib

Re: [GENERAL] DB terminating

2009-11-18 Thread Craig Ringer
On 19/11/2009 1:23 AM, Scott Felt wrote: Hello. I have been having an issue with a database. The logs consistently show this: [snip] Prior to this, the logs show nothing other than AutoVacWorkerMain activities. This database is installed on a Windows OS. The version of PostgreSQL is

[GENERAL] Information of streaming about PostgreSQL Conference 2009 Japan

2009-11-18 Thread Kaori Inaba
Hi, All. PostgreSQL Conference 2009 Japan will be held from tomorrow. PostgreSQL Cluster Developer's Meeting is held today. PostgreSQL Conference 2009 Japan made a official twitter tag. #pgcon09j We perform the sessions on the 21st in streaming. URL is the following. 21st - Track A

Re: [GENERAL] Enum on-disk format

2009-11-18 Thread Scott Bailey
Tom Lane wrote: Scott Bailey arta...@comcast.net writes: I'm trying to better understand the internals of Postgres, and I'm looking at the enum type. The docs say that an enum value is stored on disk as 4 bytes. But enum_send() returns a bytea representing the actual text of the value and not

Re: [GENERAL] Can anyone help setting up pgbouncer?

2009-11-18 Thread Nick
On Nov 18, 3:28 pm, d...@archonet.com (Richard Huxton) wrote: Nick wrote: lsof -i | greppgbouncer results in no output. Then it's either not running or not listening on a port (you did run that as root, didn't you?). Does ps aux | greppgbouncer show it? Yourpgbouncerlogfile should show