[GENERAL] using pg's internal timezone database?

2011-12-20 Thread Louis-David Mitterrand
Hi, To provide my forum users with a 'timezeone' preference in their profile how can I use postgresql's internal table of timezones ? I found a reference to it here: http://www.postgresql.org/docs/7.2/static/timezones.html but not in recent versions docs. Thanks, -- Sent via pgsql-general ma

Re: [GENERAL] fsync on ext4 does not work

2011-12-20 Thread Florian Weimer
* Havasvölgyi Ottó: > 2011/12/19 Florian Weimer > >> * Havasvölgyi Ottó: >> >> > Even though the TPS in pgbench about 700 with 1 client. >> > I have tried other sync methods (fdatasync, open_sync), but all are >> similar. >> > Should I disable write cache on HDD to make it work? >> >> Did you mou

[GENERAL] pg_restore should restore the schema comments and the database properties

2011-12-20 Thread Daniel Migowski
Hi, I know this discussion has already been made, but for us it is a real problem that database properties are not restored with pg_restore. For me, the comment on a database, as well as the properties like pg_search_path are part of the data of the database. They are even contained in the dump

Re: [GENERAL] using pg's internal timezone database?

2011-12-20 Thread Scott Marlowe
On Tue, Dec 20, 2011 at 2:05 AM, Louis-David Mitterrand wrote: > Hi, > > To provide my forum users with a 'timezeone' preference in their profile > how can I use postgresql's internal table of timezones ? > > I found a reference to it here: > > http://www.postgresql.org/docs/7.2/static/timezones.h

Re: [GENERAL] fsync on ext4 does not work

2011-12-20 Thread Greg Smith
On 12/19/2011 10:52 AM, Havasvölgyi Ottó wrote: PgSql 9.1.2 Debian, 2.6.32 kernel WAL filesystem: ext4 with defaults There's a pg_test_fsync program included with the postgresql-contrib package that might help you sort out what's going on here. This will eliminate the possibility that you're

Re: [GENERAL] pg_restore should restore the schema comments and the database properties

2011-12-20 Thread Adrian Klaver
On Tuesday, December 20, 2011 2:48:31 am Daniel Migowski wrote: > Hi, > > I know this discussion has already been made, but for us it is a real > problem that database properties are not restored with pg_restore. For me, > the comment on a database, as well as the properties like pg_search_path >

Re: [GENERAL] pg_restore should restore the schema comments and the database properties

2011-12-20 Thread Adrian Klaver
On Tuesday, December 20, 2011 2:48:31 am Daniel Migowski wrote: > Hi, > > I know this discussion has already been made, but for us it is a real > problem that database properties are not restored with pg_restore. For me, > the comment on a database, as well as the properties like pg_search_path >

Re: [GENERAL] segfault with plproxy

2011-12-20 Thread Marko Kreen
On Mon, Dec 19, 2011 at 01:05:20PM +0100, Filip Rembiałkowski wrote: > W dniu 19 grudnia 2011 10:39 użytkownik Marko Kreen > napisał: > > On Sat, Dec 17, 2011 at 10:25:40PM +0100, Filip Rembiałkowski wrote: > >> Following scrip causes segmentation fault. Any ideas why / how to diagnose? > > > >>

Re: [GENERAL] Cisco Systems fail

2011-12-20 Thread Christian Ramseyer
On 12/14/11 7:03 PM, Ray Stell wrote: > I've been using a network management tool for a number of years from > cisco to manage storage networking (fibre channel). The thing is > called Fabric Manager and I was thrilled that they supported pg for the > backend when I first installed. However, thei

Re: [GENERAL] PostgreSQL DBA in SPAAAAAAAACE

2011-12-20 Thread Merlin Moncure
On Tue, Dec 6, 2011 at 10:56 AM, Joe Miller wrote: > You may have seen this, but RedGate software is sponsoring a contest > to send a DBA on a suborbital space flight. > > And there is a PostgreSQL representativeme! > > https://www.dbainspace.com/finalists/joe-miller > > Voting is open for 7 d

Re: [GENERAL] pg_restore should restore the schema comments and the database properties

2011-12-20 Thread Alban Hertroys
On 20 December 2011 15:35, Adrian Klaver wrote: > To elaborate on my previous answer, search_path is in postgresql.conf because > it > is tied to the database cluster not a particular database. Not necessarily, it can also be tied to a schema or a role or (I assume) a specific database in the cl

Re: [GENERAL] PostgreSQL DBA in SPAAAAAAAACE

2011-12-20 Thread Alban Hertroys
On 20 December 2011 16:01, Merlin Moncure wrote: > On Tue, Dec 6, 2011 at 10:56 AM, Joe Miller wrote: > guess who won! :-D Ah cool. I'll wave when I get outside :) -- If you can't see the forest for the trees, Cut the trees and you'll see there is no forest. -- Sent via pgsql-general mailing

Re: [GENERAL] PostgreSQL DBA in SPAAAAAAAACE

2011-12-20 Thread Joe Miller
Thanks so much to everybody who voted. I really can't express my gratitude. I'd love to head to the pub and buy everybody a drink, but I think that might cost more than the flight. Joe On Tue, Dec 20, 2011 at 10:04 AM, Alban Hertroys wrote: > On 20 December 2011 16:01, Merlin Moncure wrote: >

Re: [GENERAL] pg_restore should restore the schema comments and the database properties

2011-12-20 Thread Adrian Klaver
On Tuesday, December 20, 2011 7:02:13 am Alban Hertroys wrote: > On 20 December 2011 15:35, Adrian Klaver wrote: > > To elaborate on my previous answer, search_path is in postgresql.conf > > because it is tied to the database cluster not a particular database. > > Not necessarily, it can also be

[GENERAL] How To Handle Hung Connections

2011-12-20 Thread Carlos Mennens
I'm attempting to delete a database that I've obviously not closed connections from cleanly. postgres=# DROP DATABASE filters; ERROR: database "filters" is being accessed by other users DETAIL: There are 4 other session(s) using the database. How exactly would one manage this issue from a Postg

Re: [GENERAL] How To Handle Hung Connections

2011-12-20 Thread Mike Blackwell
To se a list of backends for a database: select * from pg_stat_activity where datname = 'database_in_question'; To terminate a backend: select pg_terminate_backend(pid); Be sure you get the right ones... I like to revoke connect privileges for the database first, if I can't stop the applicatio

Re: [GENERAL] segfault with plproxy

2011-12-20 Thread Filip Rembiałkowski
W dniu 20 grudnia 2011 15:36 użytkownik Marko Kreen napisał: >> Is schema a part of function signature? > > Yes. Thanks again, that explains everything. In the meantime, depesz has a solution basing on application_name, not on username+schema as I tried. http://www.depesz.com/index.php/2011/1

[GENERAL] General coding question

2011-12-20 Thread jkells
General coding question. Can I insert a text string into a character varying column that contains a \ as is, meaning no escaping of the character or is this a bad practice? I.e: Column data == description

Re: [GENERAL] General coding question

2011-12-20 Thread David Johnston
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of jkells Sent: Tuesday, December 20, 2011 12:33 PM To: pgsql-general@postgresql.org Subject: [GENERAL] General coding question General coding question. Can I insert a text s

Re: [GENERAL] General coding question

2011-12-20 Thread Bill Moran
In response to jkells : > General coding question. Can I insert a text string into a character > varying column that contains a \ as is, meaning no escaping of the > character or is this a bad practice? > > I.e: Column data > ==

[GENERAL] PostgreSQL server architecture

2011-12-20 Thread James B. Byrne
We run a small in-house data centre for our various operations. Currently, we are moving applications from dedicated boxes to kvm based CentOS-6.1 virtual machines on a single CentOS-6.1 host. At issue is the question on how to handle the PostgreSQL instances that we currently have running on dif

[GENERAL] Postgres Logs question

2011-12-20 Thread akp geek
Hi All - Is there way that we write the logs specific to only one user in postgres? What I want to do is, Write the log files that are coming from one user or block the log entry for a pariticular user. Can you please help? We have postgres 9.0.4 Regards

Re: [GENERAL] PostgreSQL server architecture

2011-12-20 Thread Bill Moran
In response to "James B. Byrne" : > We run a small in-house data centre for our various > operations. Currently, we are moving applications from > dedicated boxes to kvm based CentOS-6.1 virtual machines > on a single CentOS-6.1 host. At issue is the question on > how to handle the PostgreSQL ins

Re: [GENERAL] pg crash shortly after 9.1.1 -> 9.1.2 upgrade

2011-12-20 Thread Tom Lane
Joseph Shraibman writes: > On 12/08/2011 12:54 AM, Tom Lane wrote: >> Joseph Shraibman writes: >>> All was fine until: >>> LOG: statement: select "_devel".cleanupEvent('10 minutes'::interval, >>> 'false'::boolean); >>> ERROR: could not open file "base/16406/2072097_fsm": Permission denied >> T

[GENERAL] out of memory error with loading pg_dumpall

2011-12-20 Thread Dara Olson
Greetings. I am attempting to create an exact copy of our production database/cluster on a different server for development. I created a dumpall file which is 8.7GB. When I attempt to run this in psql on the new server it seems okay and then I got a string of "invalid command \N" lines" and the

Re: [GENERAL] General coding question

2011-12-20 Thread jkells
On Tue, 20 Dec 2011 13:32:32 -0500, David Johnston wrote: > -Original Message- > From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of jkells Sent: > Tuesday, December 20, 2011 12:33 PM To: pgsql-general@postgresql.org > Subject: [GENERAL] Gene

Re: [GENERAL] General coding question

2011-12-20 Thread David Johnston
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of jkells Sent: Tuesday, December 20, 2011 3:42 PM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] General coding question On Tue, 20 Dec 2011 13:32:32 -0500, David Jo

Re: [GENERAL] Postgres Logs question

2011-12-20 Thread Chris Travers
On Tue, Dec 20, 2011 at 11:53 AM, akp geek wrote: > Hi All - > >    Is there way that we write the logs specific to only one user > in postgres? What I want to do is, Write the log files that are coming from > one user  or block the log entry for a pariticular user. Can you please > he

Re: [GENERAL] Escaping input from COPY

2011-12-20 Thread Josh Kupershmidt
On Mon, Dec 19, 2011 at 6:56 AM, Roger Leigh wrote: > I'd like to switch to COPY, which should be orders of > magnitude faster.  I see that DBD::Pg has an interface for > this, which looks just fine.  My problem is with how to > escape the data.  I need to use whatever escaping rules > are in use

[GENERAL] design help for performance

2011-12-20 Thread Culley Harrelson
I am bumping into some performance issues and am seeking help. I have two tables A and B in a one (A) to many (B) relationship. There are 1.4 million records in table A and 44 million records in table B. In my web application any request for a record from table A is also going to need a count of

Re: [GENERAL] PostgreSQL server architecture

2011-12-20 Thread Craig Ringer
On 21/12/2011 4:08 AM, Bill Moran wrote: In response to "James B. Byrne": We run a small in-house data centre for our various operations. Currently, we are moving applications from dedicated boxes to kvm based CentOS-6.1 virtual machines on a single CentOS-6.1 host. At issue is the question on

Re: [GENERAL] design help for performance

2011-12-20 Thread Misa Simic
Hi Culley, Have you tried to create fk together with index on fk column on table B? What are results? Would be good if you could send the query and explain analyze... Sent from my Windows Phone -- From: Culley Harrelson Sent: 21 December 2011 00:57 To: pgsql-general

Re: [GENERAL] PostgreSQL server architecture

2011-12-20 Thread John R Pierce
On 12/20/11 11:48 AM, James B. Byrne wrote: we are moving applications from dedicated boxes to kvm based CentOS-6.1 virtual machines on a single CentOS-6.1 host Database servers often end up with suboptimal performance on virtual IO hardware. This is especially true if they are sharing stora

Re: [GENERAL] design help for performance

2011-12-20 Thread David Johnston
Continued top-posting to remain consistent…. It isn’t that the application has outgrown the solution but rather the solution was never correct in the first place. You attempted pre-mature optimization and are getting burned because of it. The reference solution is simply: SELECT a.*, CO

Re: [GENERAL] design help for performance

2011-12-20 Thread Culley Harrelson
Thanks David. That was my original solution and it began to bog down the website so I resorted to demoralization 3 years ago This is an extremely high volume website. On Tue, Dec 20, 2011 at 4:27 PM, David Johnston wrote: > Continued top-posting to remain consistent…. > > ** ** > > It

Re: [GENERAL] Escaping input from COPY

2011-12-20 Thread Adrian Klaver
On Tuesday, December 20, 2011 3:56:14 pm Josh Kupershmidt wrote: > > This is really a question for the DBD::Pg folks, I think. Looking at: > http://search.cpan.org/~turnstep/DBD-Pg-2.16.1/Pg.pm#COPY_support > > It doesn't look like there is support for escaping COPY data. But > incidentally, I

Re: [GENERAL] out of memory error with loading pg_dumpall

2011-12-20 Thread Tom Lane
"Dara Olson" writes: > I am attempting to create an exact copy of our production database/cluster on > a different server for development. I created a dumpall file which is 8.7GB. > When I attempt to run this in psql on the new server it seems okay and then I > got a string of "invalid command

Re: [GENERAL] design help for performance

2011-12-20 Thread Alban Hertroys
On 21 Dec 2011, at 24:56, Culley Harrelson wrote: > Several years ago I added table_b_rowcount to table A in order to minimize > queries on table B. And now, as the application has grown, I am starting to > having locking problems on table A. Any change to table B requires the that > table_b_