[GENERAL] PostgreSQL and cgroup

2013-09-09 Thread 高健
Hello: Sorry for disturbing, In order to make my question clear, I wrote this one as a seperate question. If using cgroup, I can find wget work well. But , for postgresql, when I deal huge amount of data, it still report out of memory error. In fact I hope postgresql can work under a limit

[GENERAL] Making substrings uppercase

2013-09-09 Thread Oliver Kohll - Mailing Lists
Hello, Given a string with certain words surrounded by stars, e.g. The *quick* *brown* fox jumped over the *lazy* dog can you transform the words surrounded by stars with uppercase versions, i.e. The QUICK BROWN fox jumped over the LAZY dog Given text in a column sentence in table sentences,

Re: [GENERAL] Sum of columns

2013-09-09 Thread Marc Mamin
hi, in addition to the others comments, you can also remove ELSE 0 from your query. It will result in NULL values that are discarded by SUM. regards, Marc Mamin From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of jane...@web.de Sent: Montag,

[GENERAL] Hello,

2013-09-09 Thread fumihisa . suzuki
Hello, initdb fails as follows: initdb.exe -A md5 -D C:\Program Files\...\postgresql\data -E UTF-8 -- locale C -U postgres --pwfile=C:\Program Files\...\postgresql\pwfile. txt The files belonging to this database system will be owned by user u1. This user must also own the server process.

Re: [GENERAL] PK referenced function

2013-09-09 Thread Agustin Larreinegabe
This is what I did with your help, So with this function you can know if a PK in table_from is referenced in x table with CONSTRAINT FOREIGN KEY Just if someone needs CREATE OR REPLACE FUNCTION referenced_in ( in_id bigint, in_schema_from varchar, in_table_from varchar ) RETURNS TABLE (

Re: [GENERAL] Hello,

2013-09-09 Thread Adrian Klaver
On 09/09/2013 05:55 AM, fumihisa.suz...@justsystems.com wrote: Hello, initdb fails as follows: initdb.exe -A md5 -D C:\Program Files\...\postgresql\data -E UTF-8 -- locale C -U postgres --pwfile=C:\Program Files\...\postgresql\pwfile. txt The files belonging to this database system will

Re: [GENERAL] Making substrings uppercase

2013-09-09 Thread David Johnston
Oliver Kohll - Mailing Lists wrote select regexp_replace(sentence,'\*(.*?)\*','' || upper('\1'),'g') from sentences; Yeah, you cannot embed a function-call result in the replace with section; it has to be a literal (with the group insertion meta-sequences allowed of course). I see two possible

Re: [GENERAL] Call for design: PostgreSQL mugs

2013-09-09 Thread Marc Mamin
Hi, this is not an elephant (to fake Magritt) http://enculturation.gmu.edu/3_2/images/magritte1.jpg or an elephant breast-feeding its babies to illustrate replication. but better ask someone else for the painting ;-) regards, Marc Mamin -Original Message- From:

Re: [GENERAL] Making substrings uppercase

2013-09-09 Thread Oliver Kohll - Mailing Lists
On 9 Sep 2013, at 14:41, David Johnston pol...@yahoo.com wrote: Oliver Kohll - Mailing Lists wrote select regexp_replace(sentence,'\*(.*?)\*','' || upper('\1'),'g') from sentences; Yeah, you cannot embed a function-call result in the replace with section; it has to be a literal (with the

Re: [GENERAL] are WAL file segment boundaries a point of consistency?

2013-09-09 Thread Jeff Janes
On Fri, Sep 6, 2013 at 1:26 PM, John Lumby johnlu...@hotmail.com wrote: We use logshipping replication,and have recently noticed a nasty bug where, in certain very rare cases, the primary archive_command program will fail to send the WAL file to the standby but report good return code 0

Re: [GENERAL] Call for design: PostgreSQL mugs

2013-09-09 Thread Quentin Hartman
On Mon, Sep 9, 2013 at 10:09 AM, Mike Christensen m...@kitchenpc.comwrote: How about something incredibly cheesy like SELECT * FROM Mug; I dig this. Black mug with this in white on one side, and a postgres logo in white on the other side. I'd buy one... One thing I have not seen discussed

Re: [GENERAL] Streaming replication slave crash

2013-09-09 Thread Mahlon E. Smith
[piggybackin' on older (seeming very similar) thread...] On Fri, Mar 29, 2013, Quentin Hartman wrote: Yesterday morning, one of my streaming replication slaves running 9.2.3 crashed with the following in the log file: 2013-03-28 12:49:30 GMT WARNING: page 1441792 of relation

Re: [GENERAL] Call for design: PostgreSQL mugs

2013-09-09 Thread Scott Marlowe
A couple ideas: A system diagram type thing with various app servers / languages, all connected to a central postgresql server, subtitled All paths lead to PostgreSQL PostgreSQL: Spend your money on hardware, not license fees. A timeline for pgsql showing all the major releases and what they

Re: [GENERAL] Call for design: PostgreSQL mugs

2013-09-09 Thread patrick keshishian
On 9/3/13, Andreas 'ads' Scherbaum adsm...@wars-nicht.de wrote: PostgreSQL folks! We are looking for the next big thing. Actually, it's a bit smaller: a new design for mugs. So far we had big blue elephants, small blue elephants, frosty elephants, white SQL code on black mugs ... Now it's

Re: [GENERAL] Call for design: PostgreSQL mugs

2013-09-09 Thread patrick keshishian
On 9/9/13, John R Pierce pie...@hogranch.com wrote: On 9/9/2013 1:22 PM, patrick keshishian wrote: If printing inside the mug is too difficult, cost prohibitive, then stick with the smiling elephant at the outside bottom of the mug. as I rarely see mugs with anything printed on the bottom, I

Re: [GENERAL] psql client memory usage

2013-09-09 Thread Ryan Kelly
On Mon, Sep 09/09/13, 2013 at 01:56:33PM -0700, Alan Nilsson wrote: On Sep 6, 2013, at 6:56 AM, Merlin Moncure mmonc...@gmail.com wrote: On Fri, Sep 6, 2013 at 8:19 AM, Tim Kane tim.k...@gmail.com wrote: Ahh. All these years (albeit sporadic), I never knew about FETCH_COUNT. That makes

Re: [GENERAL] Call for design: PostgreSQL mugs

2013-09-09 Thread John R Pierce
On 9/9/2013 1:22 PM, patrick keshishian wrote: If printing inside the mug is too difficult, cost prohibitive, then stick with the smiling elephant at the outside bottom of the mug. as I rarely see mugs with anything printed on the bottom, I suspect this too would add significantly to the

Re: [GENERAL] psql client memory usage

2013-09-09 Thread Alan Nilsson
On Sep 6, 2013, at 6:56 AM, Merlin Moncure mmonc...@gmail.com wrote: On Fri, Sep 6, 2013 at 8:19 AM, Tim Kane tim.k...@gmail.com wrote: Ahh. All these years (albeit sporadic), I never knew about FETCH_COUNT. That makes sense. Thanks muchly. Not your fault: FETCH_COUNT is a hack IMO. The

[GENERAL] Migrate from mysql

2013-09-09 Thread Florent THOMAS
Hy folks, I'm trying to migrate a database running on mysql for the famous www.redmine.org from mysql to postgresql. I was looking for ressources and I found this : http://www.olimpiks.ru/2011/03/redmine-mysqlpostgresql-converter.html The process is almost perfect except for the binary datas.

Re: [GENERAL] Call for design: PostgreSQL mugs

2013-09-09 Thread Basil Bourque
Other folks posted much more clever and original ideas than mine here. But for a mug I would actually enjoy seeing on my desk daily… -- Lift the rounded-corner blue bar off the top of the PostgreSQL.org web site: http://www.postgresql.org/ and wrap around a white mug. So, the left-handed

Re: [GENERAL] Migrate from mysql

2013-09-09 Thread Merlin Moncure
On Mon, Sep 9, 2013 at 5:15 PM, Florent THOMAS mailingl...@tdeo.fr wrote: Hy folks, I'm trying to migrate a database running on mysql for the famous www.redmine.org from mysql to postgresql. I was looking for ressources and I found this :

Re: [GENERAL] select DISTINCT

2013-09-09 Thread pg noob
Thank you Kevin and Jeff for the responses. These are very helpful. On Fri, Sep 6, 2013 at 10:48 PM, Jeff Janes jeff.ja...@gmail.com wrote: On Friday, September 6, 2013, pg noob wrote: Hi all, I'm curious about some of the query estimates that I'm seeing with queries that use DISTINCT.

[GENERAL] help getting a backtrace from 9.2 on Ubuntu 13.04?

2013-09-09 Thread Chris Curvey
I have a production server running PG 8.4 on RHEL6. I have a development server running PG 9.2 on Ubuntu 13.04. Periodically, I like to take a dump of the production server and load it on the development machine. But I'm having troubles with the 9.2 server crashing when I'm restoring the

Re: [GENERAL] Migrate from mysql

2013-09-09 Thread Adrian Klaver
On 09/09/2013 03:15 PM, Florent THOMAS wrote: Hy folks, I'm trying to migrate a database running on mysql for the famous www.redmine.org from mysql to postgresql. I was looking for ressources and I found this : http://www.olimpiks.ru/2011/03/redmine-mysqlpostgresql-converter.html The process is

Re: [GENERAL] help getting a backtrace from 9.2 on Ubuntu 13.04?

2013-09-09 Thread John R Pierce
On 9/9/2013 7:00 AM, Chris Curvey wrote: any idea where I go from here? don't develop on a newer version of the database than you are deploying on. *maybe* you can use the pgdump from 8.4 to connect to and dump the 9.2 database, but the 9.2 dump is NOT guaranteed to generate 8.4 compatible

Re: [GENERAL] help getting a backtrace from 9.2 on Ubuntu 13.04?

2013-09-09 Thread John R Pierce
On 9/9/2013 4:53 PM, John R Pierce wrote: On 9/9/2013 7:00 AM, Chris Curvey wrote: any idea where I go from here? don't develop on a newer version of the database than you are deploying on. *maybe* you can use the pgdump from 8.4 to connect to and dump the 9.2 database, but the 9.2 dump

Re: [GENERAL] Call for design: PostgreSQL mugs

2013-09-09 Thread Cyclix
I like Basil's idea, and I would add some sort of a catchy or similar line at the top (but inside) of the blue bar with something like the following: I did nothing today, and still got paid, thanks to PG :-) Cheers, cyclix On 09/10/2013 07:07 AM, Basil Bourque wrote: Other folks posted much

Re: [GENERAL] help getting a backtrace from 9.2 on Ubuntu 13.04?

2013-09-09 Thread Marcin Mańk
On Mon, Sep 9, 2013 at 4:00 PM, Chris Curvey ccur...@zuckergoldberg.comwrote: But I'm having troubles with the 9.2 server crashing when I'm restoring the dump. I'm using the 9.2 version of pg_dump. I've tried restoring a custom-format dump with pg_restore, and I've tried restoring a

Re: [GENERAL] Call for design: PostgreSQL mugs

2013-09-09 Thread Sam Hahn
How about * Postgres -the Linux of Data (or) * The Linux of DBs ?? On 9/8/2013 4:51 PM, Bret Stern wrote: PostgreSQL - (the worlds database)

Re: [GENERAL] PostgreSQL and cgroup

2013-09-09 Thread 高健
Now let me reply it myself. When I changed memory.limit_in_bytes=300M, it worked. memeory before sql statment execution and after sql statement execution is: [postgres@cent6 Desktop]$ free -m total used free sharedbuffers cached Mem: 2006537

Re: [GENERAL] Call for design: PostgreSQL mugs

2013-09-09 Thread John R Pierce
On 9/9/2013 5:39 PM, Sam Hahn wrote: How about * Postgres -the Linux of Data (or) * The Linux of DBs ugh no.if anything, Mysql is the Linux of data. PostgreSQL is more like the BSD of Data. -- john r pierce 37N 122W somewhere on the

Re: [GENERAL] Call for design: PostgreSQL mugs

2013-09-09 Thread Gavin Flower
On 10/09/13 13:21, John R Pierce wrote: On 9/9/2013 5:39 PM, Sam Hahn wrote: How about * Postgres -the Linux of Data (or) * The Linux of DBs ugh no.if anything, Mysql is the Linux of data. PostgreSQL is more like the BSD of Data. -- john r pierce

Re: [GENERAL] Call for design: PostgreSQL mugs

2013-09-09 Thread patrick keshishian
On Monday, September 9, 2013, Gavin Flower wrote: On 10/09/13 13:21, John R Pierce wrote: On 9/9/2013 5:39 PM, Sam Hahn wrote: How about Postgres -the Linux of Data  (or) The Linux of DBs ugh no.    if anything, Mysql is the Linux of data. PostgreSQL is more like the BSD of Data.

Re: [GENERAL] Streaming replication slave crash

2013-09-09 Thread Jeff Davis
On Mon, 2013-09-09 at 13:04 -0700, Mahlon E. Smith wrote: After some wild googlin' research, I saw the index visibility map fix for 9.2.1. We did pg_upgrade in-between versions, but just to be sure I wasn't somehow carrying corrupt data across versions (?), I went ahead and VACUUMed

Re: [GENERAL] Call for design: PostgreSQL mugs

2013-09-09 Thread John R Pierce
On 9/9/2013 6:42 PM, Gavin Flower wrote: More people have heardof Linux compared to BSD, and the Linux market share is growing faster than BSD's! if you rate things by market share, then you'd compare it with MS Windows, or iOS. lets not go there. -- john r pierce