Re: [GENERAL] Postgres 8.3.7 Server Crash: failed to add item to the right sibling in index
>>Sounds like a data corruption problem After reindexing, the problem seems to go away. Is there any way to determine what caused the data corruption in the first place ?? Thanks. On Mon, Jul 6, 2009 at 8:29 PM, Tom Lane wrote: > CM J writes: > >I am running Postgres 8.3.7 on Windows 2003 with my java > > application.Off late, the server crashes with the following trace: > > > *2009-07-01 14:47:07.250 ISTPANIC: failed to add item to the right > sibling > > in index "mevservices2_ndx"* > > Sounds like a data corruption problem ... try reindexing that index. > >regards, tom lane >
[GENERAL] Postgres 8.3.7 Server Crash: failed to add item to the right sibling in index
Hi, I am running Postgres 8.3.7 on Windows 2003 with my java application.Off late, the server crashes with the following trace: *2009-07-01 14:47:07.250 ISTPANIC: failed to add item to the right sibling in index "mevservices2_ndx"* *2009-07-01 14:47:07.250 ISTSTATEMENT: insert into MEVSERVICES(NSIP,EPTIME,VSVRSVCNAME,VSVRNAME,VSVRSVCENTITYTYPE) values ($1,$2,$3,$4,$5)* This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. *2009-07-01 14:47:08.609 ISTLOG: server process (PID 2204) exited with exit code 3* *2009-07-01 14:47:08.609 ISTLOG: terminating any other active server processes* *2009-07-01 14:47:08.640 ISTWARNING: terminating connection because of crash of another server process* *2009-07-01 14:47:08.640 ISTDETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.* *2009-07-01 14:47:08.640 ISTHINT: In a moment you should be able to reconnect to the database and repeat your command.* *2009-07-01 14:47:08.687 ISTWARNING: terminating connection because of crash of another server process* *2009-07-01 14:47:08.687 ISTDETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.* *2009-07-01 14:47:08.687 ISTHINT: In a moment you should be able to reconnect to the database and repeat your command.* *2009-07-01 14:47:08.828 ISTWARNING: terminating connection because of crash of another server process* *2009-07-01 14:47:08.828 ISTDETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.* ~ The index is defined on a column of type varchar(100) . Is this is a bug in postgres and is this related to the discussion mentioned in the thread below: http://www.mail-archive.com/pgsql-hack...@postgresql.org/msg87557.html Thanks.
Re: [GENERAL] [JDBC] Postgres 8.3.7 -- EOF on client connection
Hi, The problem turned out to be not with postgres but my JDBC connection code. Thanks ! On Thu, Jun 25, 2009 at 5:25 PM, Saurabh Dave wrote: > Hi CMJ, > > If you are using WebNMS framework with hibernate, can you check if you have > done this: > > *ConfigReader configReader = ConfigReader.getInstance(); > configReader.modifyHbmToDdl(true); > * > > Thanks, > Saurabh > > > On Wed, Jun 24, 2009 at 6:06 PM, CM J wrote: > >> Hi , >> >> I installed postgres 8.3.7-1 in my windows machine. The server >> starts all right.However when i attempt a JDBC connection(Driver used: >> postgresql-8.3-604.jdbc4.jar), the following error is thrown: >> >> 2009-06-24 17:55:03.564 ISTERROR: relation "befailover" does not exist >> 2009-06-24 17:55:03.564 ISTSTATEMENT: SELECT HOSTADDRESS,RMIREGISTRYPORT >> FROM BEFAILOVER WHERE SERVERROLE='PRIMARY' >> 2009-06-24 17:55:03.580 ISTERROR: relation "befailover" does not exist >> 2009-06-24 17:55:03.580 ISTSTATEMENT: DELETE FROM BEFAILOVER WHERE >> SERVERROLE='STANDBY' >> *2009-06-24 17:55:12.639 ISTLOG: could not receive data from client: No >> connection could be made because the target machine >> actively refused it. >> 2009-06-24 17:55:12.639 ISTLOG: unexpected EOF on client connection* >> >> I attempt the JDBC connection from the machine as the postgres >> server. There are no anti-virus server software or firewall involved. Can >> someone tell me what could be wrong with my setup. >> >> Thanks. >> > >
[GENERAL] Postgres 8.3.7 -- EOF on client connection
Hi , I installed postgres 8.3.7-1 in my windows machine. The server starts all right.However when i attempt a JDBC connection(Driver used: postgresql-8.3-604.jdbc4.jar), the following error is thrown: 2009-06-24 17:55:03.564 ISTERROR: relation "befailover" does not exist 2009-06-24 17:55:03.564 ISTSTATEMENT: SELECT HOSTADDRESS,RMIREGISTRYPORT FROM BEFAILOVER WHERE SERVERROLE='PRIMARY' 2009-06-24 17:55:03.580 ISTERROR: relation "befailover" does not exist 2009-06-24 17:55:03.580 ISTSTATEMENT: DELETE FROM BEFAILOVER WHERE SERVERROLE='STANDBY' *2009-06-24 17:55:12.639 ISTLOG: could not receive data from client: No connection could be made because the target machine actively refused it. 2009-06-24 17:55:12.639 ISTLOG: unexpected EOF on client connection* I attempt the JDBC connection from the machine as the postgres server. There are no anti-virus server software or firewall involved. Can someone tell me what could be wrong with my setup. Thanks.
Re: [GENERAL] Postgres 8.2 Memory Tuning
Hi, I need to measure the memory used by postgres under various loads in my application.How to calculate the exact memory used by postgres for OS:Windows as well as linux ? Thanks, CM J On Mon, Jun 15, 2009 at 5:37 PM, Massa, Harald Armin wrote: > CMJ, > > same system.Even under moderate load in my application, each of the >> postgres process occupies some 25 MB memory leading to total postgres memory >> usage of 500+ MB. Now, how do i limit the memory used by each > > > how did you measure those 25MB and those 500+MB MEMORY usage? > > I guess you are running windows task manager and looking into the default > memory column. That is adress space used, rather then memory used. So > Postgres is using 500MB of adress space; share_memory of those processes is > accounted for every process. > > Look within additional columns of taskmanager to find the one giving the > private memory of the process. > > Especially on windows you should update to the latest 8.3.x PostgreSQL. > > Harald > > > > > > -- > GHUM Harald Massa > persuadere et programmare > Harald Armin Massa > Spielberger Straße 49 > 70435 Stuttgart > 0173/9409607 > no fx, no carrier pigeon > - > LASIK good, steroids bad? >
[GENERAL] Postgres 8.2 Memory Tuning
Hi , I have installed Postgres 8.2 in windows with default configuration.The windows machine has dual processor(2 GHZ,1GHZ) with 1 GB RAM.I use my java application with postgres and my database connection pool has some 25 connections.I understand from the documentation that postgres starts a seperate process for each of the connection.Now, my application and the database will be installed on the same system.Even under moderate load in my application, each of the postgres process occupies some 25 MB memory leading to total postgres memory usage of 500+ MB. Now, how do i limit the memory used by each of the postgres process to bring down the over all memory usage ? Thanks
[GENERAL] Postgres BackUp and Restore: ERROR: duplicate key violates unique constraint "pg_largeobject_loid_pn_index"
Hi, I backup my database using the following command: pg_dump.exe -f Backup.sql -U -p MYDB Now,before restoring, i drop all my tables,indexes,foreign key constraints.Then, i restore using the cmd below: psql.exe -U -p -d MYDB -f Backup.sql The above results in following exception and the data is not getting restored: ERROR: duplicate key violates unique constraint "pg_largeobject_loid_pn_index" What else do i need to drop/delete to completely reinitialize my database ? Also, instead of dropping the tables,indexes,foreign key constraints, if drop the database and recreate it, the above error is not thrown.However, this approach is not an option for me due to some limitation in my application. Kindly help. Thanks
[GENERAL] Postgres: Transaction Connections
Hi , I use postgres database server 8.2.12 with my java application. I was wondering if postgres supports transactions by default or do i have to turn some parameter on to enable transaction support ? Thanks.
[GENERAL] Postgres server startup
Hi, When logged in as administrator, i start the postgres server with the following command: runas /user:postgres "D:\postgres_new\pgsql\bin\pg_ctl.exe start -D D:\postgres_new\pgsql\data" The problem is "runas" cmd is not script friendly as i can not pass the password as a cmd line argument.Is there any way i can start the postgres server using pg_ctl.exe while logged in as administrator without using "runas" ?? Thanks!
Re: [GENERAL] Postgres: Installing as a service
Hi, The following cmd can be used for installating postgres as a service: pg_ctl.exe register -N -U -P -D and "pgctl.exe unregister -N " can be used to uninstall. Thanks. On Mon, Apr 13, 2009 at 12:15 PM, Craig Ringer wrote: > CM J wrote: > > Hi , > > > >I have extracted postgres from postgres-noinstaller.zip file. How > do > > i install postgres as a service from cmd line ? > > Search: http://msdn.microsoft.com/ > > You can use the `net' command to start/stop services. I don't recall the > command(s) used to install them, if any, but you'll be able to find the > info on MSDN. > > > Are there are any binaries > > provided by postgres to install it as a service ? > > No. > > Why not use the MSI installer's silent mode? > > -- > Craig Ringer >
[GENERAL] Postgres: Installing as a service
Hi , I have extracted postgres from postgres-noinstaller.zip file. How do i install postgres as a service from cmd line ? Are there are any binaries provided by postgres to install it as a service ? Please note that i am aware that msi installer automatically does all this. I want to know how to acheive the same from the postgres db extracted from the zip file. Thanks.
Re: [GENERAL] Postgres: Starting Server in background mode
Hi, I do not want start postgres as a service.Postgres will bundled along with my application and i am only looking at starting it only from cmd line.If there are any options to disable this cmd window which appears after executing the "pg_ctl.exe start", that would be great ! Thanks. On Thu, Apr 9, 2009 at 3:52 PM, Craig Ringer wrote: > CM J wrote: > > Hi, > > > >To start the postgres server in background mode in windows, i > > executed the following command: > > > > *runas /user:postgres "D:\postgres_new\pgsql\bin\pg_ctl.exe -W start -D > > D:\postgres_new\pgsql\data -l D:\postgres_new\pgsql\data\logfile"* > > > > The postgres starts up all fine and logs get redirected.However, > a > > command window gets opened which says "server starting...". How do i > disable > > this command window ? > > Run Pg as a service, and use the "net" command or the "services.msc" > snapin to start/stop the service. > > The GUI installer sets Pg up as a service by default. Why not use that? > > -- > Craig Ringer >
[GENERAL] Postgres: Starting Server in background mode
Hi, To start the postgres server in background mode in windows, i executed the following command: *runas /user:postgres "D:\postgres_new\pgsql\bin\pg_ctl.exe -W start -D D:\postgres_new\pgsql\data -l D:\postgres_new\pgsql\data\logfile"* The postgres starts up all fine and logs get redirected.However, a command window gets opened which says "server starting...". How do i disable this command window ? Thanks !
Re: [GENERAL] Postgres: Packaging & Server Startup
Hi, I did not run the initdb.exe and thats why i could not start the server.Here is what i did: 1. Executed initdb.exe as follows: runas /user:postgres "D:\pgsql\bin\initdb.exe -D:\pgsql\data" 2.Started the server by executing the following cmd: runas /user:postgres "D:\pgsql\bin\pg_ctl.exe -w start -D D:\pgsql\data" and it started fine.Thanks to Richard and Ray ! On Tue, Mar 31, 2009 at 6:13 PM, Raymond O'Donnell wrote: > On 31/03/2009 12:14, CM J wrote: > > > D:\pgsql\bin\pg_ctl.exe -U postgres -P -w start -D > D:\pgsql\data > > I wonder if that -P is causing trouble? According to the output of > --help, there's no -P option with a START operation; however, -p is used > to specify the path to the postgres binaries. > > Just a stab in the dark. > > Ray. > > -- > Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland > r...@iol.ie > Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals > -- >
Re: [GENERAL] Postgres: Packaging & Server Startup
Hi, Please ignore my previous mail. I had given data directory location incorrectly.Anyways,even after giving the absolute path for exe location, i get the same error message as before: D:\pgsql\bin\pg_ctl.exe -U postgres -P -w start -D D:\pgsql\data *waiting for server to start...FATAL: postgres: could not locate matching postgres executable* Thanks ! On Tue, Mar 31, 2009 at 4:31 PM, CM J wrote: > Hi, > > I don't have multiple postgres installed.Anyway, tried your > suggestion to use the full path name and here is what i get: > > D:\pgsql\bin>D:\pgsql\bin\pg_ctl.exe -U postgres -P -w start > -D:\pgsql\data > > pg_ctl: could not open PID file ":/pgsql/data/postmaster.pid": Invalid > argument > >There is no data directory created by default (i used > no-installer-zip file to install postgres), so i went ahead and created a > dummy data directory which gave the same result as above. Any suggestions ?? > > Thanks. > > > On Tue, Mar 31, 2009 at 4:09 PM, Richard Huxton wrote: > >> CM J wrote: >> > pg_ctl.exe -U postgres -P -w start -D D:\pgsql\data >> > >> > However, i get the following error message: >> > >> > waiting for server to start...FATAL: postgres: could not locate >> matching >> > postgres executable >> >> That does seem to suggest it found the executable but it didn't match >> versions with the data directory. Do you have two copies installed? If >> so, you'll probably want to specify the complete path to pg_ctl >> >> -- >> Richard Huxton >> Archonet Ltd >> > >
Re: [GENERAL] Postgres: Packaging & Server Startup
Hi, I don't have multiple postgres installed.Anyway, tried your suggestion to use the full path name and here is what i get: D:\pgsql\bin>D:\pgsql\bin\pg_ctl.exe -U postgres -P -w start -D:\pgsql\data pg_ctl: could not open PID file ":/pgsql/data/postmaster.pid": Invalid argument There is no data directory created by default (i used no-installer-zip file to install postgres), so i went ahead and created a dummy data directory which gave the same result as above. Any suggestions ?? Thanks. On Tue, Mar 31, 2009 at 4:09 PM, Richard Huxton wrote: > CM J wrote: > > pg_ctl.exe -U postgres -P -w start -D D:\pgsql\data > > > > However, i get the following error message: > > > > waiting for server to start...FATAL: postgres: could not locate matching > > postgres executable > > That does seem to suggest it found the executable but it didn't match > versions with the data directory. Do you have two copies installed? If > so, you'll probably want to specify the complete path to pg_ctl > > -- > Richard Huxton > Archonet Ltd >
[GENERAL] Postgres: Packaging & Server Startup
Hi, I am working on packaging postgres database in our java based application.I downloaded postgresql-8.2.12-1-binaries-no-installer.zip from the postgres site and installed it on a windows 2003 machine using administrator account.I later created a postgres service login account and changed the permissions on the postgres directory to include this user too. When logged in as administrator , i tried starting the server using the following cmd: pg_ctl.exe -U postgres -P -w start -D D:\pgsql\data However, i get the following error message: waiting for server to start...FATAL: postgres: could not locate matching postgres executable I also tried the starting the server using runas : runas /user:postgres "pg_ctl.exe -wait start -D D:\pgsql\data" The above too failed.Please let me know on what i am missing here. Thanks.