[GENERAL] Locale problem
Hello PG support, Recently i am facing locale problem in postgres 8.3. In my home machine i have 8.4 which have db schema as CREATE DATABASE impulse_travel WITH OWNER = postgres ENCODING = 'UTF8' LC_COLLATE = 'English_India.1252' LC_CTYPE = 'English_India.1252' CONNECTION LIMIT = -1; But in production server we are limited to postgres 8.3 only. So while creating db i cant able to provide LC_COLLATE , LC_CTYPE . So i did initdb "initdb -W --locale=en_IN --lc-collate=en_IN --lc-ctype=en_IN --lc-messages=en_IN --lc-monetary=en_IN --lc-numeric=en_IN --lc-time=en_IN -D /var/lib/pgsql/data4" but even then it seems it doesnt set. I used test query as select 'Rs.6,000.00'::money; this returns value in home pgsql 8.4 server but in the production server it throws error as template1=# select 'Rs.6,000.00'::money; ERROR: invalid input syntax for type money: "Rs.6,000.00" I want to know whether it is possible in postgres 8.3 and if yes where i went wrong? Thanks in advance, Arvind S "Many of lifes failure are people who did not realize how close they were to success when they gave up." -Thomas Edison
[GENERAL] Postgres physical directory structure meaning
I want to know about the meaning of various directory present in data folder. Mostly what will the 'base' folder contains? The reason of this is recently in the datafolder 'global' was deleted unknowingly which leads to entire DB crash in a second. We found a tool to get the data from the base folder as sql queries, but many table content are missing. Pls tell what kind of data will be present in each folder, if possible sent the doc link. Arvind S
Re: [GENERAL] Postgres Host
most of the site provided there r not have postgres,.. i think its better to clear up the links in that page... As Craig told i am also interested in cloud.. have to check it up.. On Tue, Jan 26, 2010 at 6:51 PM, Thom Brown wrote: > 2010/1/26 S Arvind > > Hi Everyone, >> me and my friend wants a central db to do our development as we are in >> different location. Do any one know postgres service provider who is doing >> service which can help us? >> >> Arvind S >> > > There is a list of hosts available on the PostgreSQL site: > http://www.postgresql.org/support/professional_hosting > > Regards > > Thom >
[GENERAL] Postgres Host
Hi Everyone, me and my friend wants a central db to do our development as we are in different location. Do any one know postgres service provider who is doing service which can help us? Arvind S
Re: [GENERAL] Session based transaction!!
Web application have single DB only.. On Fri, Dec 25, 2009 at 7:03 PM, Bill Moran wrote: > S Arvind wrote: > > > > Hi Everyone, > > > > In a web application running in Tomcat and Postgres 8.3 as DB, i need to > > know whether my given task is feasible or not. > >All the db operation which is done by that web application > must > > be rollback at the end(session dies) and the DB data must be same as the > > starting stage(of session). Its like virtually placing the data for that > > session alone and rollbacking the db to the template which is originally > > been. So whenever users get in the webapplication, the initial data must > be > > the template data only and he can perform any operation for which data is > > visible for that user alone and when the users leaves(session destroyed) > all > > the data changed in that time must be rollbacked. > > > > I thought this by, When the session created in the application a > transaction > > must be started and all the activites must be done on the DB, but the > > transaction will not be commited or rollback across request but it must > be > > done across the session. By not destroying the connection and using it > for > > all the work done by that session. when session destroy we can rollback > the > > entire transaction > > > > Is there any other way to achieve the requirements in postgres. > > Thanks in advance.. > > Would be easy except for one factor that I don't know about in Tomcat. > > In most web applications, the database connection is not maintained between > page loads. Each new page view may (and usually does) get a different DB > connection than the previous one. If Tomcat maintains a single DB > connection for a session across all page view, then you should be able > to implement this. However, if Tomcat runs like most of the other web > systems I've seen, you'll have no way to ensure that a particular page > view will have the same DB connection as a previous page view. It will > require some sort of middleware that keeps the DB connections open and > associates HTTP sessions with DB connections. > > Past that, however, I expect it will be a maintenance nightmare. Each > rolled back DB session is going to generate a lot of dead rows that > vacuum will have to reclaim. Whether or not this is feasible overall > depends on a lot of questions that I don't know the answers to. Partly, > it's going to depend on the amount of change and amount of concurrency > that occurs. > > Personally, I would recommend coming up with a different approach, but > I might be wrong. > > -- > Bill Moran > http://www.potentialtech.com >
[GENERAL] Session based transaction!!
Hi Everyone, In a web application running in Tomcat and Postgres 8.3 as DB, i need to know whether my given task is feasible or not. All the db operation which is done by that web application must be rollback at the end(session dies) and the DB data must be same as the starting stage(of session). Its like virtually placing the data for that session alone and rollbacking the db to the template which is originally been. So whenever users get in the webapplication, the initial data must be the template data only and he can perform any operation for which data is visible for that user alone and when the users leaves(session destroyed) all the data changed in that time must be rollbacked. I thought this by, When the session created in the application a transaction must be started and all the activites must be done on the DB, but the transaction will not be commited or rollback across request but it must be done across the session. By not destroying the connection and using it for all the work done by that session. when session destroy we can rollback the entire transaction Is there any other way to achieve the requirements in postgres. Thanks in advance.. Arvind S * "Many of lifes failure are people who did not realize how close they were to success when they gave up." -Thomas Edison*
Re: [GENERAL] About logging
ok thanks Magnus from saving my time in googling -Arvind S "Many of lifes failure are people who did not realize how close they were to success when they gave up." -Thomas Edison On Fri, Sep 25, 2009 at 12:39 AM, Magnus Hagander wrote: > On Thu, Sep 24, 2009 at 21:06, wrote: > > Is it possible to log two different information to two different file. > > Bascially i need to log all the mod statement in one log csv file and all > > the queries running more then 2mins in another csv log file. As i enabled > > both it will be doing both in single file rt . Is there any way to split > > both??? > > This is not currently possible inside PostgreSQL, you will need to do > external post-processing of the logfile to get that. > > > -- > Magnus Hagander > Me: http://www.hagander.net/ > Work: http://www.redpill-linpro.com/ >
[GENERAL] Data folder in differnet filesystem
I have 2 doubts related to Filsesytem and Postgres data folder 1.Currently in CentOS, our postgres data folder is in single filesystem. Is there any possibility to have a single data folder of single postgres in more then one file system. 2.I am having three big DB, is it possible to have a data of each DB in different file system. so if i want to add a DB to postgre i will mount a drive (filesystem ) and point that location for the postgres to use that space. for eg Filesystem Mounted on /dev/hda3 /data/db1for DB1 /dev/hda4 /data/db2for DB2 thanks in advance Arvind S "Many of lifes failure are people who did not realize how close they were to success when they gave up." -Thomas Edison
[GENERAL] Table replication
Hi Members, Is there any way to sync a single table across the DBs. We need a single table alone to be equal in all DBs in the single postgres. Presenly we are doing this with the help of Update, insert, delete trigger. Is there any other best way for that. Arvind S
[GENERAL] ResultSet is FORWARD_ONLY.
Hi everyone, Recently we have upgraded postgres driver jdbc4 for 8.3. After that while executing rst.first(), it raise the exception. The statment was created correctly as dbconnection..createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY); org.postgresql.util.PSQLException: Operation requires a scrollable ResultSet, but this ResultSet is FORWARD_ONLY. at org.postgresql.jdbc2.AbstractJdbc2ResultSet.checkScrollable(AbstractJdbc2ResultSet.java:207) at org.postgresql.jdbc2.AbstractJdbc2ResultSet.first(AbstractJdbc2ResultSet.java:292) at org.apache.tomcat.dbcp.dbcp.DelegatingResultSet.first(DelegatingResultSet.java:326) This statment worked in postgres 8.1 jdbc 3 driver but now its not.. Pleas help is solving this... -Arvind S
Re: [GENERAL] max execution time of query
Thanks Chris & kretschmer. But one small doubt in it,, What happens to update or insert query? - Arvind S * "Many of lifes failure are people who did not realize how close they were to success when they gave up." -Thomas Edison * On Fri, Jun 5, 2009 at 11:59 AM, Chris wrote: > S Arvind wrote: > >> Is there any possibility to mention max time a query can execute from DBCP >> side? our DB is Postgres and Container is tomcat 6. we dont want to give the >> timeout in postgres for all query but need to set in application side based >> on differnet needs? Is it possible? >> >> Is there anyother way to specify the query execution time out while >> establishing connection with the help of DBCP in tomcat? >> >> Example, if a query executed from web application then it should not >> execute more then 22mins. If it execute more then that means query shold be >> cancelled from postgres(important) and java should get exception on this >> event. Is it possible? >> > > You can set statement_timeout per session. > > http://www.postgresql.org/docs/8.3/static/runtime-config-client.html > > Not sure what happens on the java side when the exec time is hit but the > query is cancelled in postgres. > > -- > Postgresql & php tutorials > http://www.designmagick.com/ > >
[GENERAL] max execution time of query
Is there any possibility to mention max time a query can execute from DBCP side? our DB is Postgres and Container is tomcat 6. we dont want to give the timeout in postgres for all query but need to set in application side based on differnet needs? Is it possible? Is there anyother way to specify the query execution time out while establishing connection with the help of DBCP in tomcat? Example, if a query executed from web application then it should not execute more then 22mins. If it execute more then that means query shold be cancelled from postgres(important) and java should get exception on this event. Is it possible? -Arvind S * "Many of lifes failure are people who did not realize how close they were to success when they gave up." -Thomas Edison*
[GENERAL] Upgrading from postgres 8.1 to 8.3
Our 600GB data was currently loaded in postgres 8.1 , we want to upgrade from postgres 8.1 to 8.3 . Can we able to point the data directly or should we have to do any porting work for transfering data from 8.1 to 8.3. Arvind S * "Many of lifes failure are people who did not realize how close they were to success when they gave up." -Thomas Edison*
[GENERAL] From 8.1 to 8.3
Our company wants to move from 8,1 to 8.3 latest. In irc they told me to check realse notes for issues while upgrading. But there are lots of release notesss. Can anyone tell some most noticable change or place-of-error while upgrading? Arvind S * "Many of lifes failure are people who did not realize how close they were to success when they gave up." -Thomas Edison*
[GENERAL] Reg: Logging log_min_duration_statement
I set log_min_duration_statement to 1 and restart the postgres. But when i check the tail to log i am getting all queries. please tell is it bug ? i have log_statement = all . is there any relation between this and min_duaration? Arvind S * "Many of lifes failure are people who did not realize how close they were to success when they gave up." -Thomas Edison*