Re: [GENERAL] How to avoid Force Autovacuum

2013-08-09 Thread Vishalakshi Navaneethakrishnan
Hi All, select * from pg_database where datname = 'template0'; -[ RECORD 1 ]-+ datname | template0 datdba| 10 encoding | 6 datcollate| en_US.UTF-8 datctype | en_US.UTF-8 datistemplate | t datallowconn | f datconnlimit | -1

Re: [GENERAL] How to avoid Force Autovacuum

2013-08-09 Thread Sergey Konoplev
On Thu, Aug 8, 2013 at 10:59 PM, Vishalakshi Navaneethakrishnan nvishalak...@sirahu.com wrote: Now the problem is autovacuum.. why it was invoked and increased the load? How to avoid this? Upgrade to the latest minor version 9.2.4 first. -- Kind regards, Sergey Konoplev PostgreSQL Consultant

[GENERAL] How to contact Planet PostgreSQL

2013-08-09 Thread Jakob Egger
Hello, I'd like to apologise if this is off-topic, but does anybody know how to reach the planet.postgresql.org team? I'd like to report a bug with their RSS feed. It has invalid RSS and doesn't work in my Feed Reader. Details:

[GENERAL] Recovery.conf and PITR

2013-08-09 Thread ascot.m...@gmail.com
Hi, I am trying PITR in a test machine (same PG version 9.2.4 same O/S Ubuntu 12.04 64 bit). All archived WAL files are shipped and saved in /var/pgsql/data/archive, the latest transaction txid of them is 75666. I want to recover PG at a point of time that if XIDs are equal or smaller than

Re: [GENERAL] Recovery.conf and PITR

2013-08-09 Thread Gabriele Bartolini
Hello, On Fri, 9 Aug 2013 16:09:49 +0800, ascot.m...@gmail.com ascot.m...@gmail.com wrote: postgres=# select txid_current(); txid_current -- 75666 (1 row) Can you please advise? WAL contains REDO log information, which means only COMMITTED transactions will be

Re: [GENERAL] Recovery.conf and PITR

2013-08-09 Thread Luca Ferrari
On Fri, Aug 9, 2013 at 10:09 AM, ascot.m...@gmail.com ascot.m...@gmail.com wrote: Hi, I am trying PITR in a test machine (same PG version 9.2.4 same O/S Ubuntu 12.04 64 bit). All archived WAL files are shipped and saved in /var/pgsql/data/archive, the latest transaction txid of them is

Re: [GENERAL] Postgres won't start

2013-08-09 Thread Oliver Elphick
On 9 August 2013 02:49, Tom Lane t...@sss.pgh.pa.us wrote: I wonder whether we shouldn't change the syslogger to emit something to stderr when it takes over logging, saying logging is now redirected to someplace. Shouldn't you also, or instead, log to stderr just before leaving it, in case

[GENERAL] archive folder housekeeping

2013-08-09 Thread ascot.m...@gmail.com
Hi, I have enabled archive in PG (v 9.2.4): archive_mode = on archive_command = 'test ! -f /usr/local/pgsql/data/archive/%f cp %p /usr/local/pgsql/data/archive/%f' I know that pg_xlog folder is maintained by PostgreSQL automatically, when the pg_xlog folder hits to certain limit (pg_xlog

Re: [GENERAL] How to contact Planet PostgreSQL

2013-08-09 Thread Raymond O'Donnell
On 09/08/2013 09:04, Jakob Egger wrote: Hello, I'd like to apologise if this is off-topic, but does anybody know how to reach the planet.postgresql.org team? I'd like to report a bug with their RSS feed. It has invalid RSS and doesn't work in my Feed Reader. Details:

Re: [GENERAL] archive folder housekeeping

2013-08-09 Thread Albe Laurenz
ascot.m...@gmail.com wrote: I have enabled archive in PG (v 9.2.4): archive_mode = on archive_command = 'test ! -f /usr/local/pgsql/data/archive/%f cp %p /usr/local/pgsql/data/archive/%f' I know that pg_xlog folder is maintained by PostgreSQL automatically, when the pg_xlog folder

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

2013-08-09 Thread Don Parris
On Thu, Aug 8, 2013 at 8:42 PM, Tom Lane t...@sss.pgh.pa.us wrote: 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

Re: [GENERAL] Recovery.conf and PITR

2013-08-09 Thread wd
Try add these settings, pause_at_recovery_target=true recovery_target_inclusive=false On Fri, Aug 9, 2013 at 4:09 PM, ascot.m...@gmail.com ascot.m...@gmail.comwrote: Hi, I am trying PITR in a test machine (same PG version 9.2.4 same O/S Ubuntu 12.04 64 bit). All archived WAL files are

Re: [GENERAL] Recovery.conf and PITR

2013-08-09 Thread Luca Ferrari
On Fri, Aug 9, 2013 at 12:40 PM, wd w...@wdicc.com wrote: Try add these settings, pause_at_recovery_target=true Be warned that this would require a manual completion of the recovery and requires hot_standby that is not specified in the original post. recovery_target_inclusive=false Uhm...I

Re: [GENERAL] archive folder housekeeping

2013-08-09 Thread Ian Lawrence Barwick
2013/8/9 ascot.m...@gmail.com ascot.m...@gmail.com: Is there any PG manual command available to remove archived files by (archive) date/time? pg_archivecleanup might be of use to you: http://www.postgresql.org/docs/current/static/pgarchivecleanup.html Regards Ian Barwick -- Sent via

Re: [GENERAL] Recovery.conf and PITR

2013-08-09 Thread ascot.m...@gmail.com
On 9 Aug 2013, at 7:09 PM, Luca Ferrari wrote: Uhm...I guess the problem is not about the txid being included or not: the recovery target was 75634 and the transaction 75666 appeared, so the problem seems to be an out-of-order commit of the transactions. In such case making the inclusive

[GENERAL] Recovery.conf and PITR by recovery_target_time

2013-08-09 Thread ascot.m...@gmail.com
Hi, I am trying another way to test PITR: by recovery_target_time. The test machine has the same PG version 9.2.4 and same O/S Ubuntu 12.04 64 bit.All archived WAL files are shipped and saved in /var/pgsql/data/archive, the latest time stamp of them is 2013-08-09 19:30:01, the full hot

Re: [GENERAL] archive folder housekeeping

2013-08-09 Thread Michael Paquier
On Fri, Aug 9, 2013 at 9:12 PM, Ian Lawrence Barwick barw...@gmail.com wrote: 2013/8/9 ascot.m...@gmail.com ascot.m...@gmail.com: Is there any PG manual command available to remove archived files by (archive) date/time? pg_archivecleanup might be of use to you:

[GENERAL] plpgsql FOR LOOP CTE problem ?

2013-08-09 Thread Day, David
Hi, I am working on a plpgsql function that is not acting as I would hope. I am working with the Postgres 9.3 beta load and would like to solicit some feedback. Looking at the outermost for loop of the function below, If I run this CTE query from the psql command line I am returned what I

Re: [GENERAL] Recovery.conf and PITR by recovery_target_time

2013-08-09 Thread Albe Laurenz
ascot.m...@gmail.com wrote: I am trying another way to test PITR: by recovery_target_time. The test machine has the same PG version 9.2.4 and same O/S Ubuntu 12.04 64 bit.All archived WAL files are shipped and saved in /var/pgsql/data/archive, the latest time stamp of them is

Re: [GENERAL] Read data from WAL

2013-08-09 Thread Andres Freund
On 2013-07-15 13:34:01 +, 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 information about

Re: [GENERAL] plpgsql FOR LOOP CTE problem ?

2013-08-09 Thread Pavel Stehule
2013/8/9 Day, David d...@redcom.com: Hi, I am working on a plpgsql function that is not acting as I would hope. I am working with the Postgres 9.3 beta load and would like to solicit some feedback. Looking at the outermost for loop of the function below, If I run this CTE query

Re: [GENERAL] Recovery.conf and PITR by recovery_target_time

2013-08-09 Thread ascot.m...@gmail.com
hi 16:47:12 SELECT pg_start_backup('hot_backup'); tar cfP the PG data folder SELECT pg_stop_backup(); regards On 9 Aug 2013, at 9:55 PM, Albe Laurenz wrote: ascot.m...@gmail.com wrote: I am trying another way to test PITR: by recovery_target_time. The test machine has the same PG

Re: [GENERAL] plpgsql FOR LOOP CTE problem ?

2013-08-09 Thread Tom Lane
Day, David d...@redcom.com writes: Looking at the outermost for loop of the function below, If I run this CTE query from the psql command line I am returned what I expect for values for translator_id and the Aggregating MIN functions. I restore the experimental data and now run the

[GENERAL] bi-directional syncing help request

2013-08-09 Thread Paula Kirsch
Hi. I'm looking for suggestions for the best solution to the following situation. I have a database roughly 300 meg with 30 tables. For fieldwork, a copy is running on my mac laptop where I can pull up information and add new entries. The data analysis and further development is done back at

Re: [GENERAL] bi-directional syncing help request

2013-08-09 Thread Bèrto ëd Sèra
if it's only you using it, all you need to do is switch master and server so that server is the one box you are currently on. If both boxes produce data at the same time you need a lot of work to manage row versioning. On 9 August 2013 15:27, Paula Kirsch pl.kir...@gmail.com wrote: Hi. I'm

Re: [GENERAL] bi-directional syncing help request

2013-08-09 Thread Bèrto ëd Sèra
sorry, half asleep and typing rubbish. --all you need to do is switch master and slave so that master is the one box you are currently on On 9 August 2013 15:35, Bèrto ëd Sèra berto.d.s...@gmail.com wrote: if it's only you using it, all you need to do is switch master and server so that

Re: [GENERAL] Here is my problem

2013-08-09 Thread David Johnston
Basavaraj wrote Now i want to insert data to the table the format should be id | marks -- 1 |50 1 |30 1 |30 2 |... the actual query is insert into table(id,marks) values(1,unnest(array[marks])) But we should not use array and unnest but i

Re: [GENERAL] Postgres won't start

2013-08-09 Thread Tom Lane
Oliver Elphick o...@lfix.co.uk writes: On 9 August 2013 02:49, Tom Lane t...@sss.pgh.pa.us wrote: I wonder whether we shouldn't change the syslogger to emit something to stderr when it takes over logging, saying logging is now redirected to someplace. Shouldn't you also, or instead, log to

Re: [GENERAL] Postgres won't start

2013-08-09 Thread Tom Lane
... btw, were you able to resolve your original problem? What was it? regards, tom lane -- 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] bi-directional syncing help request

2013-08-09 Thread bricklen
On Fri, Aug 9, 2013 at 7:36 AM, Bèrto ëd Sèra berto.d.s...@gmail.comwrote: --all you need to do is switch master and slave so that master is the one box you are currently on That probably isn't a reasonable solution, considering the OP mentioned that she was not a professional DBA. Setting up

Re: [GENERAL] bi-directional syncing help request

2013-08-09 Thread Bèrto ëd Sèra
not sure having to write stuff any time you do even the smallest thing on your table is more reasonable of taking the pain to write (or ask friends to help you writing) a couple of bash scripts that will do the job forever. But then again, this is true if and only if she is the one and only user

Re: [GENERAL] bi-directional syncing help request

2013-08-09 Thread Bèrto ëd Sèra
or you can just take a full dump from one box and import it on the other any time you switch. If it's not a big db it should probably be quicker than any alternative approach. On 9 August 2013 16:10, Bèrto ëd Sèra berto.d.s...@gmail.com wrote: not sure having to write stuff any time you do

Re: [GENERAL] bi-directional syncing help request

2013-08-09 Thread bricklen
On Fri, Aug 9, 2013 at 8:12 AM, Bèrto ëd Sèra berto.d.s...@gmail.comwrote: or you can just take a full dump from one box and import it on the other any time you switch. If it's not a big db it should probably be quicker than any alternative approach. A pg_dump from one system or the other

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

2013-08-09 Thread Quentin Hartman
This pair of servers aren't replacing anything, they are new, empty servers. Before starting the slave at all, I'm copying the entire data filestructure over to it via rsync. I'm doing almost exactly what is described here:

Re: [GENERAL] bi-directional syncing help request

2013-08-09 Thread Bèrto ëd Sèra
A pg_dump from one system or the other will effectively overwrite the database it is restored to, so any changes in one system or the other will be lost yes, as said, the pre-condition is that she is the one and only possible data producer. On 9 August 2013 16:24, bricklen brick...@gmail.com

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

2013-08-09 Thread Quentin Hartman
A bit of an aside, but you also might want to change that CREATE EXTENSION ltree; to CREATE EXTENSION IF NOT EXISTS ltree; That way your script won't error out if the extension is already enabled. On Fri, Aug 9, 2013 at 3:57 AM, Don Parris parri...@gmail.com wrote: On Thu, Aug 8, 2013 at

Re: [GENERAL] How to avoid Force Autovacuum

2013-08-09 Thread Kevin Grittner
Vishalakshi Navaneethakrishnan nvishalak...@sirahu.com wrote: select * from pg_database where datname = 'template0'; -[ RECORD 1 ]-+ datname   | template0 datdba    | 10 encoding  | 6 datcollate    | en_US.UTF-8 datctype  | en_US.UTF-8

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

2013-08-09 Thread Quentin Hartman
OK, figured this out. I had it start copying the pg_xlog directory as well when doing the initial sync. I realized this is also the first time I've setup replication from scratch using 9.2. All my other 9.2 pairs were setup on either 9.0 or 9.1, and have been upgraded from there with replication

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

2013-08-09 Thread Don Parris
On Fri, Aug 9, 2013 at 11:49 AM, Quentin Hartman qhart...@direwolfdigital.com wrote: A bit of an aside, but you also might want to change that CREATE EXTENSION ltree; to CREATE EXTENSION IF NOT EXISTS ltree; That way your script won't error out if the extension is already enabled. Thanks

[GENERAL] Here is my problem

2013-08-09 Thread Basavaraj
Now i want to insert data to the table the format should be id | marks -- 1 |50 1 |30 1 |30 2 |... the actual query is insert into table(id,marks) values(1,unnest(array[marks])) But we should not use array and unnest but i want in this format pls help.. --

Re: [GENERAL] How to avoid Force Autovacuum

2013-08-09 Thread Jeff Janes
On Wed, Aug 7, 2013 at 2:46 AM, Vishalakshi Navaneethakrishnan nvishalak...@sirahu.com wrote: Hi All, We have one production database server , having 6 DBs, Postgres 9.2.1 version. You should probably upgrade to 9.2.4. ... log_autovacuum_min_duration = 0 That is good for debugging. But

Re: [GENERAL] How to avoid Force Autovacuum

2013-08-09 Thread Jeff Janes
On Fri, Aug 9, 2013 at 9:06 AM, Kevin Grittner kgri...@ymail.com wrote: Vishalakshi Navaneethakrishnan nvishalak...@sirahu.com wrote: select * from pg_database where datname = 'template0'; -[ RECORD 1 ]-+ datname | template0 datdba| 10

Re: [GENERAL] plpgsql FOR LOOP CTE problem ?

2013-08-09 Thread Day, David
Hi Tom, That's a good thought on the duplicated variable names. The two table involved do have many common column names But the inputs are explicitly referencing tables on the inserts. Would not seem to be possible to confuse them. In trying to make a simplified test case, I came across

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

2013-08-09 Thread Rob Sargent
On 08/08/2013 04:57 PM, Don Parris wrote: On Thu, Aug 8, 2013 at 5:45 PM, Rob Sargent robjsarg...@gmail.com mailto: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

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

2013-08-09 Thread Jeff Janes
On Fri, Aug 9, 2013 at 8:33 AM, Quentin Hartman qhart...@direwolfdigital.com wrote: This pair of servers aren't replacing anything, they are new, empty servers. That should be 'empty server', singular. Before starting the slave at all, I'm copying the entire data filestructure over to it via

[GENERAL] earthdistance

2013-08-09 Thread Olivier Chaussavoine
I develope a project openbarter that needs to match objects based on a maximum distance between their positions on earth. I saw that the documentation of the extension earthdistance was interesting, but the promise was not in the code. It would be nice to have these functions available

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

2013-08-09 Thread Jeff Janes
On Fri, Aug 9, 2013 at 9:54 AM, Quentin Hartman qhart...@direwolfdigital.com wrote: OK, figured this out. I had it start copying the pg_xlog directory as well when doing the initial sync. I realized this is also the first time I've setup replication from scratch using 9.2. All my other 9.2

[GENERAL] c++ convert wchar_t to UTF-8 for DB

2013-08-09 Thread ciifrance...@tiscali.it
Hello all, I write with reference to the message readable at http://www.postgresql.org/message-id/4bf575e6.5060...@hogranch.com I am in the situation described in the message. I have a char* in C++ and i want to put in my db, but most of the non ASCII charachers are broken. So i used wchar_t,

[GENERAL] Need Help

2013-08-09 Thread nandan
Hello All ; Please help me in knowing below queries which are in Mysql to Postgresql. 1. SELECT user,host,password FROM mysql.user WHERE password = ''; SET PASSWORD FOR user@host = PASSWORD ('newpass'); 2. SELECT user,host,password FROM mysql.user WHERE user = ''; DELETE FROM

Re: [GENERAL] c++ convert wchar_t to UTF-8 for DB

2013-08-09 Thread John R Pierce
On 8/7/2013 8:49 AM, ciifrance...@tiscali.it wrote: http://www.postgresql.org/message-id/4bf575e6.5060...@hogranch.com I am in the situation described in the message. except linux isn't windows, and you're probably not using GBK encoding for your database, so ... what exactly is the 'same'

Re: [GENERAL] Need Help

2013-08-09 Thread John R Pierce
On 8/9/2013 10:59 AM, nandan wrote: Hello All ; Please help me in knowing below queries which are in Mysql to Postgresql. 1. SELECT user,host,password FROM mysql.user WHERE password = ''; SET PASSWORD FOR user@host = PASSWORD ('newpass'); postgres has no concept of user@host.

Re: [GENERAL] plpgsql FOR LOOP CTE problem ?

2013-08-09 Thread Day, David
A complete self contained test case: example of the problem with my FOR LOOP using a COMMON table expression. Again this is version 9.3beta Any comments Thanks CREATE SCHEMA test CREATE TABLE test.tmm ( name character varying, tu_id integer NOT NULL DEFAULT 1, translator_id integer

Re: [GENERAL] Pl/Python runtime overhead

2013-08-09 Thread Peter Eisentraut
On 8/7/13 10:43 AM, Seref Arikan wrote: When a pl/python based function is invoked, does it keep a python runtime running across calls to same function? That is, if I use connection pooling, can I save on the python runtime initialization and loading costs? The Python interpreter is

Re: [GENERAL] bi-directional syncing help request

2013-08-09 Thread Kevin Grittner
bricklen brick...@gmail.com wrote: On Fri, Aug 9, 2013 at 7:36 AM, Bèrto ëd Sèra berto.d.s...@gmail.com wrote: --all you need to do is switch master and slave so that master is the one box you are currently on That probably isn't a reasonable solution, considering the OP mentioned that she

Re: [GENERAL] incremental dumps

2013-08-09 Thread Jeff Janes
On Thu, Aug 1, 2013 at 1:59 AM, haman...@t-online.de wrote: Hi, I want to store copies of our data on a remote machine as a security measure. Can you describe what your security concerns are? Are you worried about long-lasting malicious tampering with the data that you need to be able to

Re: [GENERAL] plpgsql FOR LOOP CTE problem ?

2013-08-09 Thread Adrian Klaver
On 08/09/2013 02:18 PM, Day, David wrote: A complete self contained test case: example of the problem with my FOR LOOP using a COMMON table expression. Again this is version 9.3beta Any comments Got it past the error by: Changing: drow test.tmm%ROWTYPE; -- deleted row holder to: drow

Re: [GENERAL] incremental dumps

2013-08-09 Thread Michael Nolan
On 8/1/13, haman...@t-online.de haman...@t-online.de wrote: Hi, I want to store copies of our data on a remote machine as a security measure. Wolfgang 2 questions: 1. How secure is the remote site? 2. How much data are we talking about? -- Mike Nolan -- Sent via pgsql-general mailing

Re: [GENERAL] plpgsql FOR LOOP CTE problem ?

2013-08-09 Thread Tom Lane
Day, David d...@redcom.com writes: A complete self contained test case: example of the problem with my FOR LOOP using a COMMON table expression. Ah, I see the problem. It's got nothing particularly to do with CTEs; rather, your temporary variable is of the wrong rowtype: drow

Re: [GENERAL] Snapshot backups

2013-08-09 Thread Bruce Momjian
On Wed, Jul 31, 2013 at 08:24:46AM -0400, Tom Lane wrote: Alban Hertroys haram...@gmail.com writes: That begs the question what happens in case of a crash or (worse) a partial crash when multiple file systems are involved. As long as the OS+hardware honors the contract of fsync(),

Re: [GENERAL] Type to to_char(d, 'J')?

2013-08-09 Thread Bruce Momjian
On Wed, Jul 31, 2013 at 11:09:22AM +0200, Marc Dahn wrote: Dear list, Section 9.8 of the postgres (9.1) documentation says, on the patterns for to_char(timestamp, pattern),: J Julian Day (days since November 24, 4714 BC at midnight) This leaves open the question of what's actually

Re: [GENERAL] Dump file created with pg_dump cannot be restored with psql

2013-08-09 Thread gilroy
For that matter, for the first time we tried enforcing some of the rules of CFs this time, and I'd like to hear if people think that helped. I think he merit of fast promote is - allowing quick connection by skipping checkpoint and its demerit is - taking little bit longer when crash-recovery

Re: [GENERAL] earthdistance

2013-08-09 Thread Brent Wood
You might install Postgis to implement very powerful spatial functionality that can easily do what you are asking (plus a whole lot more). http://www.postgis.org Now that v2 installs as a Postgres extension, it is more closely coupled with the underlying database. Brent Wood Programme leader:

Re: [GENERAL] earthdistance

2013-08-09 Thread Uwe Schroeder
How accurate do you need it? My website has a lot of local listing stuff based on a distance from the viewer and I use the earthdistance module in contrib to do it. Given, it's not accurate enough to calculate a surgical missile strike, but for within 20 miles type of things it's good enough

Re: [GENERAL] earthdistance

2013-08-09 Thread John R Pierce
On 8/9/2013 5:18 PM, Brent Wood wrote: You might install Postgis to implement very powerful spatial functionality that can easily do what you are asking (plus a whole lot more). indeed, PostGIS is the logical answer, but the OP specifically stated he wanted the functionality without