Re: [GENERAL] how can I get back superuser back?

2011-03-11 Thread Jov
single-user mode solve my problem.thank you ,Bruce! 在 2011-3-11 下午6:35,"Bruce Momjian" 写道: > Jov wrote: >> hi pgers >> >> I use pg9.0.3 and do some mistake which cause my superuser >> non-super,is there any way I can get back the superuser privilege? the >> superuser is the only super in my pg serv

Re: [GENERAL] Huge spikes in number of connections doing "PARSE"

2011-03-11 Thread Gurjeet Singh
On Fri, Mar 11, 2011 at 11:13 AM, Noah Misch wrote: > > gdb -ex=bt /path/to/bin/postgres $pid > I've used this on production systems to debug issues like this one, and > I've > never observed damage. The exact effect of debugger attach/detach may be > OS/kernel-dependent, so it's hard to make

Re: [GENERAL] How do you change the size of the WAL files?

2011-03-11 Thread runner
>> > Our WAL files are 16 Mb in size each. I cannot find where you >> > configure them to make them larger. 16 Mb is too small for our >> > instalation. If necessary, I can rebuild the entire cluster. Our >> > DBA initialized a new cluster and specified a larger WAL size but it >> > stayed

Re: [GENERAL] Huge spikes in number of connections doing "PARSE"

2011-03-11 Thread hubert depesz lubaczewski
On Fri, Mar 11, 2011 at 11:13:43AM -0500, Noah Misch wrote: > gdb -ex=bt /path/to/bin/postgres $pid http://depesz.com/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] How do you change the size of the WAL files?

2011-03-11 Thread Andrew Sullivan
On Fri, Mar 11, 2011 at 12:58:30PM -0500, runner wrote: > My boss is used to using Oracle where you can set the size of the files. So your boss wants this because a system with a completely different architecture works that way? Heck, I'd like the Nokia phone I bought recently as an experiment

Re: [GENERAL] How do you change the size of the WAL files?

2011-03-11 Thread Andrew Sullivan
On Fri, Mar 11, 2011 at 12:44:24PM -0500, runner wrote: > 16 Mb is too small for our instalation. How do you know that? (I can think of cases where this is true, but it's rarer than you may think and it has some nasty side effects.) A -- Andrew Sullivan a...@crankycanuck.ca -- Sent via pg

Re: [GENERAL] How to convert ByteA to Large Objects

2011-03-11 Thread loamy
Brilliant Sam! I'm migrating a Firebird legacy app into Postgres, and your SQL works well. Question - the number of bytes is not specified in the write - could this be an issue? lowrite appears undocumented (as opposed to lo_write). -- View this message in context: http://postgresql.1045698.n5

Re: [GENERAL] How do you change the size of the WAL files?

2011-03-11 Thread Nicholson, Brad (Toronto, ON, CA)
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of runner Sent: Friday, March 11, 2011 2:31 PM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] How do you change the size of the WAL files? >> > Our WAL files are 16 Mb in size each. I cannot

Re: [GENERAL] How do you change the size of the WAL files?

2011-03-11 Thread runner
>> > Our WAL files are 16 Mb in size each. I cannot find where you >> > configure them to make them larger. 16 Mb is too small for our >> > instalation. If necessary, I can rebuild the entire cluster. Our >> > DBA initialized a new cluster and specified a larger WAL size but it >> > stay

Re: [GENERAL] How do you change the size of the WAL files?

2011-03-11 Thread Joshua D. Drake
On Fri, 2011-03-11 at 12:51 -0500, Bruce Momjian wrote: > runner wrote: > > > > > > > > Our WAL files are 16 Mb in size each. I cannot find where you > > configure them to make them larger. 16 Mb is too small for our > > instalation. If necessary, I can rebuild the entire cluster. Our > >

Re: [GENERAL] How do you change the size of the WAL files?

2011-03-11 Thread Bruce Momjian
runner wrote: > > >> Our WAL files are 16 Mb in size each. I cannot find where you > > > > >> configure them to make them larger. 16 Mb is too small for our > > >> instalation. If necessary, I can rebuild the entire cluster. Our > > >> DBA initialized a new cluster and specified a lar

Re: [GENERAL] How do you change the size of the WAL files?

2011-03-11 Thread Merlin Moncure
On Fri, Mar 11, 2011 at 11:58 AM, runner wrote: > We are doing continuous archiving and we have thousands of these 16 Mb > archive files on disk. > > My boss is used to using Oracle where you can set the size of the files. > > He'd rather have fewer but larger archive files. What advantage is the

Re: [GENERAL] How do you change the size of the WAL files?

2011-03-11 Thread runner
>> Our WAL files are 16 Mb in size each. I cannot find where you >> configure them to make them larger. 16 Mb is too small for our >> instalation. If necessary, I can rebuild the entire cluster. Our >> DBA initialized a new cluster and specified a larger WAL size but it >> stayed at

Re: [GENERAL] How do you change the size of the WAL files?

2011-03-11 Thread Bruce Momjian
runner wrote: > > > > Our WAL files are 16 Mb in size each. I cannot find where you > configure them to make them larger. 16 Mb is too small for our > instalation. If necessary, I can rebuild the entire cluster. Our > DBA initialized a new cluster and specified a larger WAL size but it >

[GENERAL] How do you change the size of the WAL files?

2011-03-11 Thread runner
Our WAL files are 16 Mb in size each. I cannot find where you configure them to make them larger. 16 Mb is too small for our instalation. If necessary, I can rebuild the entire cluster. Our DBA initialized a new cluster and specified a larger WAL size but it stayed at 16 Mb. Any info o

Re: [GENERAL] Huge spikes in number of connections doing "PARSE"

2011-03-11 Thread Noah Misch
On Fri, Mar 11, 2011 at 04:13:52PM +0100, hubert depesz lubaczewski wrote: > On Fri, Mar 11, 2011 at 03:03:55AM -0500, Noah Misch wrote: > > On Wed, Mar 09, 2011 at 09:38:07PM +0100, hubert depesz lubaczewski wrote: > > > So. every now and then (couple of times per day at most). I see hundreds > >

[GENERAL] ERROR: Failed with error 22007-invalid value "" for "mm" vacuumdb

2011-03-11 Thread akp geek
Hi All - I am getting the following error message when I was doing the vacuum ERROR: Failed with error 22007-invalid value "" for "mm" I am not able to interpret the error. Can you please help? Thank you

Re: [GENERAL] Why length(to_char(1::integer, '9')) = 2 ?

2011-03-11 Thread Bruce Momjian
Dmitriy Igrishin wrote: > 2011/3/10 Bruce Momjian > > > Dmitriy Igrishin wrote: > > > dmitigr=> SELECT '>'||to_char(0.1, '0.9')||'<' AS v; > > > v > > > > > > > 0.1< > > > > > > dmitigr=> SELECT '>'||to_char(0.1, 'FM0.9')||'<' AS v; > > >v > > > --- > > > >

Re: [GENERAL] Huge spikes in number of connections doing "PARSE"

2011-03-11 Thread hubert depesz lubaczewski
On Fri, Mar 11, 2011 at 03:03:55AM -0500, Noah Misch wrote: > On Wed, Mar 09, 2011 at 09:38:07PM +0100, hubert depesz lubaczewski wrote: > > So. every now and then (couple of times per day at most). I see hundreds > > (800-900) of connections in "PARSE" state. > > > > I did notice one thing. > >

Re: [GENERAL] sort mem: size in RAM vs size on Disk

2011-03-11 Thread Igor Neyman
> -Original Message- > From: mark [mailto:dvlh...@gmail.com] > Sent: Thursday, March 10, 2011 9:37 AM > To: pgsql-general@postgresql.org > Subject: sort mem: size in RAM vs size on Disk > > Hi all, > > > I am wondering if anyone has any estimates on how much larger > a working set for

Re: [GENERAL] Compare an integer to now() - interval '3 days'

2011-03-11 Thread Vibhor Kumar
On Mar 11, 2011, at 6:44 PM, Alexander Farber wrote: > from drupal_field_data_field_gender g, drupal_users u > where g.field_gender_value='Robot' and > u.uid=g.entity_id and u.created::timestamp > now() - interval '1 day'; > ERROR: cannot cast type integer to timestamp without time zone Use to

Re: [GENERAL] Compare an integer to now() - interval '3 days'

2011-03-11 Thread Szymon Guz
On 11 March 2011 14:14, Alexander Farber wrote: > > # select u.uid, u.name, u.created > from drupal_field_data_field_gender g, drupal_users u > where g.field_gender_value='Robot' and > u.uid=g.entity_id and u.created::timestamp > now() - interval '1 day'; > ERROR: cannot cast type integer to tim

Re: [GENERAL] Compare an integer to now() - interval '3 days'

2011-03-11 Thread David Johnston
You need to determine how the integer value in "created" in calculated and massage either it and/or "now()" into the same format so that you can compare and manipulate them. There is likely no simple CAST expression you can use but instead have to perform math operations on the values. Since crea

[GENERAL] Compare an integer to now() - interval '3 days'

2011-03-11 Thread Alexander Farber
Hello, I've installed Drupal 7.0 on CentOS 5.5 + PostgreSQL 8.4.7 and have added a SPAM-trap - a field Gender which can be Robot/Male/Female: http://preferans.de/user/register Now I'm trying to delete all spammers, who haven't changed the default value of Gender = Robot since at least 3 days: #

Re: [GENERAL] Upgrading using streaming replication

2011-03-11 Thread Bruce Momjian
Damien Churchill wrote: > On 11 March 2011 12:04, Magnus Hagander wrote: > > On Fri, Mar 11, 2011 at 12:58, Damien Churchill wrote: > >> Hi there, > >> > >> I have done quite a bit of searching but have been unable to find any > >> way to do this. I am quite keen to use PostgreSQL 9.0's streaming

Re: [GENERAL] Upgrading using streaming replication

2011-03-11 Thread Bruce Momjian
Magnus Hagander wrote: > On Fri, Mar 11, 2011 at 13:02, Bruce Momjian wrote: > > Damien Churchill wrote: > >> Hi there, > >> > >> I have done quite a bit of searching but have been unable to find any > >> way to do this. I am quite keen to use PostgreSQL 9.0's streaming > >> replication to create

Re: [GENERAL] Upgrading using streaming replication

2011-03-11 Thread Damien Churchill
On 11 March 2011 12:04, Magnus Hagander wrote: > On Fri, Mar 11, 2011 at 12:58, Damien Churchill wrote: >> Hi there, >> >> I have done quite a bit of searching but have been unable to find any >> way to do this. I am quite keen to use PostgreSQL 9.0's streaming >> replication to create a master/s

Re: [GENERAL] Upgrading using streaming replication

2011-03-11 Thread Magnus Hagander
On Fri, Mar 11, 2011 at 13:02, Bruce Momjian wrote: > Damien Churchill wrote: >> Hi there, >> >> I have done quite a bit of searching but have been unable to find any >> way to do this. I am quite keen to use PostgreSQL 9.0's streaming >> replication to create a master/slave write/read setup. Howe

Re: [GENERAL] Upgrading using streaming replication

2011-03-11 Thread Magnus Hagander
On Fri, Mar 11, 2011 at 12:58, Damien Churchill wrote: > Hi there, > > I have done quite a bit of searching but have been unable to find any > way to do this. I am quite keen to use PostgreSQL 9.0's streaming > replication to create a master/slave write/read setup. However I am > unsure of an upgr

Re: [GENERAL] Upgrading using streaming replication

2011-03-11 Thread Bruce Momjian
Damien Churchill wrote: > Hi there, > > I have done quite a bit of searching but have been unable to find any > way to do this. I am quite keen to use PostgreSQL 9.0's streaming > replication to create a master/slave write/read setup. However I am > unsure of an upgrade procedure whilst using stre

[GENERAL] Upgrading using streaming replication

2011-03-11 Thread Damien Churchill
Hi there, I have done quite a bit of searching but have been unable to find any way to do this. I am quite keen to use PostgreSQL 9.0's streaming replication to create a master/slave write/read setup. However I am unsure of an upgrade procedure whilst using streaming replication that doesn't yield

Re: [GENERAL] how can I get back superuser back?

2011-03-11 Thread Bruce Momjian
Jov wrote: > hi pgers > > I use pg9.0.3 and do some mistake which cause my superuser > non-super,is there any way I can get back the superuser privilege? the > superuser is the only super in my pg server ,without it ,I will not > able to create new user or new database. You can modify pg_hba.conf

[GENERAL] how can I get back superuser back?

2011-03-11 Thread Jov
hi pgers I use pg9.0.3 and do some mistake which cause my superuser non-super,is there any way I can get back the superuser privilege? the superuser is the only super in my pg server ,without it ,I will not able to create new user or new database. thank you! -- Sent via pgsql-general mailing li

Re: [GENERAL] equivalent of mysql's SET type?

2011-03-11 Thread Dmitriy Igrishin
2011/3/11 Merlin Moncure > On Thu, Mar 10, 2011 at 4:13 PM, Dmitriy Igrishin > wrote: > > 2011/3/9 John R Pierce > >> > >> On 03/08/11 5:06 PM, Reece Hart wrote: > >>> > >>> I'm considering porting a MySQL database to PostgreSQL. That database > >>> uses MySQL's SET type. Does anyone have advic

Re: [GENERAL] Huge spikes in number of connections doing "PARSE"

2011-03-11 Thread Noah Misch
On Wed, Mar 09, 2011 at 09:38:07PM +0100, hubert depesz lubaczewski wrote: > So. every now and then (couple of times per day at most). I see hundreds > (800-900) of connections in "PARSE" state. > > I did notice one thing. > > we do log output of ps axo > user,pid,ppid,pgrp,%cpu,%mem,rss,lstart,