Re: [GENERAL] Adding ip4r to Postgresql core?

2013-08-08 Thread Chris Travers
On Wed, Aug 7, 2013 at 9:44 PM, Tom Lane t...@sss.pgh.pa.us wrote: Alvaro Herrera alvhe...@2ndquadrant.com writes: Tom Lane wrote: That's been proposed before, and rejected before, on the grounds that since it doesn't support IPv6 its days are numbered. Actually, that's not true. Ah,

Re: [GENERAL] Self referencing composite datatype

2013-08-08 Thread Alban Hertroys
On Aug 8, 2013, at 4:11, Sergey Konoplev gray...@gmail.com wrote: create table node as ( id integer primary key, r integer, s integer, children integer[] element references node ); so you could download 9.3rc2 and experimant with it. Now (on =9.2.x) you can create the table without

Re: [GENERAL] Self referencing composite datatype

2013-08-08 Thread Sergey Konoplev
On Wed, Aug 7, 2013 at 11:38 PM, Alban Hertroys haram...@gmail.com wrote: On Aug 8, 2013, at 4:11, Sergey Konoplev gray...@gmail.com wrote: create table node as ( id integer primary key, r integer, s integer, children integer[] ); and check integrity by triggers. Or, instead of

Re: [GENERAL] Self referencing composite datatype

2013-08-08 Thread Chris Travers
On Wed, Aug 7, 2013 at 11:38 PM, Alban Hertroys haram...@gmail.com wrote: On Aug 8, 2013, at 4:11, Sergey Konoplev gray...@gmail.com wrote: create table node as ( id integer primary key, r integer, s integer, children integer[] element references node ); so you could download

Re: [GENERAL] Replication Postgre Oracle

2013-08-08 Thread Jayadevan M
Hi, From Oracle to PostgreSQL, you could have a look at Goldengate. It does not support PostgreSQL as the source database. Regards, Jayadevan On Wed, Aug 7, 2013 at 1:54 PM, BOUVARD Aurélien aurelien.bouv...@supinfo.com wrote: Hi all, ** ** My compagny would like to configure

Re: [GENERAL] Incremental backup with RSYNC or something?

2013-08-08 Thread Kallon Weingarten
Hi Ben, Are you able to post these scripts?

Re: [GENERAL] How to prevent clear screen when query finish ?

2013-08-08 Thread Condor
On 2013-08-07 19:01, Adrian Klaver wrote: On 08/07/2013 08:53 AM, Condor wrote: Hello, sorry for dumb question, did any one can tell me how the hell I can remove clear screen after finish the sql query from console ? This probably have some idea, but for me look like very ... not good idea.

Re: [GENERAL] How to prevent clear screen when query finish ?

2013-08-08 Thread Chris Travers
I think you mean PAGER, not PAPER. I usually do this: PAGER=more psql This will set it for the connection, and it lets me use less as a pager by default elsewhere. You might also see what you can do to set it locally if you want to change it for everything. Cheers, Hristo S. -- Adrian

Re: [GENERAL] How to prevent clear screen when query finish ?

2013-08-08 Thread Alban Hertroys
On 7 August 2013 18:01, Adrian Klaver adrian.kla...@gmail.com wrote: On 08/07/2013 08:53 AM, Condor wrote: http://www.postgresql.org/docs/9.2/interactive/app-psql.html pager Controls use of a pager program for query and psql help output. If the environment variable PAGER is set, the output

Re: [GENERAL] Performance of ORDER BY RANDOM to select random rows?

2013-08-08 Thread hubert depesz lubaczewski
On Thu, Aug 08, 2013 at 12:01:17PM +1000, Victor Hooi wrote: I'm just wondering if this is still the case? Yes. Order by random() is and, most likely, will be slow. Not sure if there is any engine that could make it fast. I just ran those benchmarks on my system (Postgres 9.2.4), and using

[GENERAL] setting high value for wal_keep_segments

2013-08-08 Thread AI Rumman
Hi, I am going to sync slave with my master which is almost 500 G. I am not using archive directory instead of I am using wal files for streaming. As it may take almost 3 hours, I am thinking of setting up 400 for wal_keep_segments where I have enough space available. Without the space issue,

Re: [GENERAL] setting high value for wal_keep_segments

2013-08-08 Thread Jov
no problem if you have enough space. we have set it to 4096 one year ago,everything is OK. jov 在 2013-8-8 下午9:26,AI Rumman rumman...@gmail.com写道: Hi, I am going to sync slave with my master which is almost 500 G. I am not using archive directory instead of I am using wal files for streaming.

Re: [GENERAL] How to prevent clear screen when query finish ?

2013-08-08 Thread Adrian Klaver
On 08/08/2013 12:09 AM, Condor wrote: On 2013-08-07 19:01, Adrian Klaver wrote: On 08/07/2013 08:53 AM, Condor wrote: Thank you, last question: How I can find where is set this ENV ? because: I can't see this variable PAPER but yes, \pset paper work for connection. If you don't

[GENERAL] How to find transaction ID

2013-08-08 Thread ascot.m...@gmail.com
Hi, I am trying some restore tools, can you advise how to find the latest transaction ID in PostgreSQL and the transaction ID at a particular Point-In-Time? regards -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] How to find transaction ID

2013-08-08 Thread Glyn Astill
From: ascot.m...@gmail.com ascot.m...@gmail.com To: PostgreSQL general pgsql-general@postgresql.org Cc: ascot.m...@gmail.com Sent: Thursday, 8 August 2013, 14:52 Subject: [GENERAL] How to find transaction ID Hi, I am trying some restore tools,  can you advise how to find the latest

[GENERAL] DB transactions when browser freezes

2013-08-08 Thread dafNi zaf
Hello to everybody, I started to upload (via phpPgAdmin) to a local server a huge file (20GB) in order to fill up a database. The uploding completed and the transactions started. But unfortunately, my browser crashed/freezed in the middle of the transactions. I wanted to know, given that the

Re: [GENERAL] DB transactions when browser freezes

2013-08-08 Thread Adrian Klaver
On 08/08/2013 07:33 AM, dafNi zaf wrote: Hello to everybody, I started to upload (via phpPgAdmin) to a local server a huge file (20GB) in order to fill up a database. The uploding completed and the transactions started. But unfortunately, my browser crashed/freezed in the middle of the

Re: [GENERAL] How to find transaction ID

2013-08-08 Thread Glyn Astill
From: Glyn Astill glynast...@yahoo.co.uk To: ascot.m...@gmail.com ascot.m...@gmail.com; PostgreSQL general pgsql-general@postgresql.org Cc: Sent: Thursday, 8 August 2013, 15:20 Subject: Re: [GENERAL] How to find transaction ID From: ascot.m...@gmail.com ascot.m...@gmail.com To:

Re: [GENERAL] DB transactions when browser freezes

2013-08-08 Thread Alban Hertroys
On 8 August 2013 16:33, dafNi zaf dza...@gmail.com wrote: Hello to everybody, I started to upload (via phpPgAdmin) to a local server a huge file (20GB) in order to fill up a database. The uploding completed and the transactions started. But unfortunately, my browser crashed/freezed in the

Re: [GENERAL] DB transactions when browser freezes

2013-08-08 Thread David Johnston
dafNi wrote Should I assume that the transactions keep running? Never assume...or at least try and verify those assumptions when possible. To verify this assumption: Connect to the DB directly as a super-user and run this (or something similar): SELECT procpid, current_query, client_addr,

Re: [GENERAL] DB transactions when browser freezes

2013-08-08 Thread Ian Lawrence Barwick
2013/8/8 dafNi zaf dza...@gmail.com: Hello to everybody, I started to upload (via phpPgAdmin) to a local server a huge file (20GB) in order to fill up a database. 20GB is a lot to be uploading from a browser, even in this day and age. Is the web server configured to accept uploads of that

Re: [GENERAL] DB transactions when browser freezes

2013-08-08 Thread dafNi zaf
i execute it periodically and sometimes there is a transaction and other times it's idle: INSERT INTO traces VALUES (.) or IDLE in transaction So it's still running.. even thought there is some idle time. Thank you very much! On Thu, Aug 8, 2013 at 5:46 PM, David Johnston

Re: [GENERAL] DB transactions when browser freezes

2013-08-08 Thread dafNi zaf
its a huge file with such queries: BEGIN; INSERT INTO traces VALUES (.); . . . COMMIT; Anyway, I managed to see that the transactions still occure like David Johnston sugested. And luckily the browser is alive now after one hour that it had been freezed... thank you very much for the

Re: [GENERAL] DB transactions when browser freezes

2013-08-08 Thread dafNi zaf
yes, I altered the php.ini file in /etc/php5/apache2/ directory in order to accept huge files. The uploading has been completed and the transactions started. I can now see the transactions using either: ps aux | grep postgres (via command line) or the solution David Johnston sugested. Thank

Re: [GENERAL] setting high value for wal_keep_segments

2013-08-08 Thread bricklen
On Thu, Aug 8, 2013 at 6:23 AM, AI Rumman rumman...@gmail.com wrote: Hi, I am going to sync slave with my master which is almost 500 G. I am not using archive directory instead of I am using wal files for streaming. As it may take almost 3 hours, I am thinking of setting up 400 for

Re: [GENERAL] setting high value for wal_keep_segments

2013-08-08 Thread AI Rumman
Yeah, I already set it like that and it works. Thanks. On Thu, Aug 8, 2013 at 11:59 AM, bricklen brick...@gmail.com wrote: On Thu, Aug 8, 2013 at 6:23 AM, AI Rumman rumman...@gmail.com wrote: Hi, I am going to sync slave with my master which is almost 500 G. I am not using archive

Re: [GENERAL] How to avoid Force Autovacuum

2013-08-08 Thread Kevin Grittner
Vishalakshi Navaneethakrishnan nvishalak...@sirahu.com wrote: We have one production database server , having 6 DBs, Postgres 9.2.1 version. There were some fixes for autovacuum problems in 9.2.3.  Some other fixes will be coming when 9.2.5 is released.  Many of your problems are likely to go

[GENERAL] system catalog to check if auto vacuum is disabled for a particular table

2013-08-08 Thread Prabhjot Sheena
Guys i am using postgresql 9.2. How can i check if a particular table has auto vacuum disabled manually or not. Which system catalog can get me this information? Thanks

Re: [GENERAL] system catalog to check if auto vacuum is disabled for a particular table

2013-08-08 Thread Igor Neyman
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Prabhjot Sheena Sent: Thursday, August 08, 2013 2:36 PM To: pgsql-general@postgresql.org Subject: [GENERAL] system catalog to check if auto vacuum is disabled for a particular table Guys i am using

Re: [GENERAL] Pl/Python runtime overhead

2013-08-08 Thread Seref Arikan
Thanks Sergey, This is going to help for sure. I'll also look at the url. What I've been trying to understand is when python runtime is invoked during the function execution (lifecycle?) . Maybe looking at plpython's source may help get an understanding of that. Regards Seref On Thu, Aug 8,

[GENERAL] How To Install Extension Via Script File?

2013-08-08 Thread Don Parris
Hi all, I have a database that uses the ltree extension. I typically create a new database like so (as a normal user), using my script file: CREATE DATABASE mydb WITH TEMPLATE template0 ENCODING 'UTF8'; And then su to postgres, login and install the ltree extension on mydb. Then I logout of my

Re: [GENERAL] How To Install Extension Via Script File?

2013-08-08 Thread Thomas Kellerer
Don Parris wrote on 08.08.2013 23:13: And to be able to run it from the Bash prompt (as securely as possible). I thought I could add the commands and run the create script by doing: sudo -u postgres psql -U user -W -d mydb --file=/home/user/dev/mydb_create.sql I thought that, running my

Re: [GENERAL] How To Install Extension Via Script File?

2013-08-08 Thread Rob Sargent
On 08/08/2013 03:13 PM, Don Parris wrote: Hi all, I have a database that uses the ltree extension. I typically create a new database like so (as a normal user), using my script file: CREATE DATABASE mydb WITH TEMPLATE template0 ENCODING 'UTF8'; And then su to postgres, login and install

[GENERAL] Postgres won't start

2013-08-08 Thread Oliver Elphick
Linux Mint (from Ubuntu) version 9.1. Postgres will no longer start, but I cannot find out why. Command line: $ /usr/lib/postgresql/9.1/bin/pg_ctl start -D /home/postgresql/9.1/main -l /var/log/postgresql/postgresql-9.1-main.log -s -w -o '-c config_file=/etc/postgresql/9.1/main/postgresql.conf'

Re: [GENERAL] Postgres won't start

2013-08-08 Thread Adrian Klaver
On 08/08/2013 03:02 PM, Oliver Elphick wrote: Linux Mint (from Ubuntu) version 9.1. Postgres will no longer start, but I cannot find out why. So anything happen between the last time it started and now?: Upgrade of Postgres? Upgrade of Mint? Something else? Command line: $

Re: [GENERAL] Postgres won't start

2013-08-08 Thread Adrian Klaver
On 08/08/2013 03:17 PM, Oliver Elphick wrote: I tried to change the listen_addresses line in postgresql.conf, by adding an IPv6 address. On meeting problems I tried changing it back. What problems? Have you run ps to see if there is another instance of Postgres running? Currently it says:

Re: [GENERAL] How To Install Extension Via Script File?

2013-08-08 Thread John R Pierce
On 8/8/2013 2:13 PM, Don Parris wrote: I thought I could add the commands and run the create script by doing: sudo -u postgres psql -U user -W -d mydb --file=/home/user/dev/mydb_create.sql I thought that, running my script as the superuser, it would have the privileges necessary to install

Re: [GENERAL] How To Install Extension Via Script File?

2013-08-08 Thread Don Parris
On Thu, Aug 8, 2013 at 5:44 PM, Thomas Kellerer spam_ea...@gmx.net wrote: Don Parris wrote on 08.08.2013 23:13: And to be able to run it from the Bash prompt (as securely as possible). I thought I could add the commands and run the create script by doing: sudo -u postgres psql -U user -W

Re: [GENERAL] How To Install Extension Via Script File?

2013-08-08 Thread Don Parris
On Thu, Aug 8, 2013 at 5:45 PM, Rob Sargent robjsarg...@gmail.com wrote: On 08/08/2013 03:13 PM, Don Parris wrote: Hi all, I have a database that uses the ltree extension. I typically create a new database like so (as a normal user), using my script file: CREATE DATABASE mydb WITH

Re: [GENERAL] How To Install Extension Via Script File?

2013-08-08 Thread Don Parris
On Thu, Aug 8, 2013 at 6:30 PM, John R Pierce pie...@hogranch.com wrote: On 8/8/2013 2:13 PM, Don Parris wrote: I thought I could add the commands and run the create script by doing: sudo -u postgres psql -U user -W -d mydb --file=/home/user/dev/mydb_** create.sql I thought that, running

Re: [GENERAL] Postgres won't start

2013-08-08 Thread Oliver Elphick
To start with, it worked but the pg_hba.conf entry appeared to be wrong. I tried changing that and then the current problem started. I tried listen_addresses = '*'; then back to just 'localhost'. Since I have maximum logging enabled, I don't think it is getting as far as reading the

Re: [GENERAL] Postgres won't start

2013-08-08 Thread Adrian Klaver
On 08/08/2013 04:02 PM, Oliver Elphick wrote: To start with, it worked but the pg_hba.conf entry appeared to be wrong. I tried changing that and then the current problem started. I tried listen_addresses = '*'; then back to just 'localhost'. Since I have maximum logging enabled, I don't

Re: [GENERAL] Read data from WAL

2013-08-08 Thread Bruce Momjian
On Mon, Jul 15, 2013 at 01:34:01PM +, Baldur Þór Emilsson wrote: Thank you all for your responses. I'm aware of xlogdump but I'm afraid it does not help me with readign the data in the WAL. It is mainly for debugging or educational purposes (citing the docs) and it outputs a lot of

Re: [GENERAL] How to avoid Force Autovacuum

2013-08-08 Thread Sergey Konoplev
On Thu, Aug 8, 2013 at 11:18 AM, Kevin Grittner kgri...@ymail.com wrote: There were some fixes for autovacuum problems in 9.2.3. Some other fixes will be coming when 9.2.5 is released. Many of your problems are likely to go away by staying up-to-date on minor releases. By setting this so

[GENERAL] Weird error when setting up streaming replication

2013-08-08 Thread Quentin Hartman
I'm going through all my usual steps for setting up streaming replication on a new pair of servers. Modify configs as appropriate, rsync data from master to slave, etc. I have this all automated with chef, and it has been pretty bulletproof for awhile. However, today, I ran into this when starting

Re: [GENERAL] Weird error when setting up streaming replication

2013-08-08 Thread Michael Paquier
On Fri, Aug 9, 2013 at 8:55 AM, Quentin Hartman qhart...@direwolfdigital.com wrote: 2013-08-08 23:47:30 GMT LOG: WAL file is from different database system 2013-08-08 23:47:30 GMT DETAIL: WAL file database system identifier is 5909892614333033983, pg_control database system identifier is

Re: [GENERAL] How To Install Extension Via Script File?

2013-08-08 Thread Tom Lane
Don Parris parri...@gmail.com writes: When I try a simple psql -U postgres -W - just to initiate the psql session, I get: psql: FATAL: Peer authentication failed for user postgres It's like my regular user cannot connect as the postgres user. You're right, it can't, if you've selected peer

Re: [GENERAL] Performance of ORDER BY RANDOM to select random rows?

2013-08-08 Thread Sergey Konoplev
On Wed, Aug 7, 2013 at 7:01 PM, Victor Hooi victorh...@yahoo.com wrote: also seems to suggest that using ORDER BY RANDOM() will perform poorly on Postgres. I'm just wondering if this is still the case? I just ran those benchmarks on my system (Postgres 9.2.4), and using ORDERY BY RANDOM did

Re: [GENERAL] Postgres won't start

2013-08-08 Thread Tom Lane
Oliver Elphick o...@lfix.co.uk writes: Linux Mint (from Ubuntu) version 9.1. Postgres will no longer start, but I cannot find out why. Command line: $ /usr/lib/postgresql/9.1/bin/pg_ctl start -D /home/postgresql/9.1/main -l /var/log/postgresql/postgresql-9.1-main.log -s -w -o '-c

Re: [GENERAL] Postgres won't start

2013-08-08 Thread Brar Piening
On 9 August 2013 01:02, Oliver Elphick wrote: Since I have maximum logging enabled, I don't think it is getting as far as reading the configuration files - that is not mentioned in the log. I regularly run into problems when some editor adds a UTF-8 BOM to pg_hba.conf or