[GENERAL] Compile docs on ArchLinux

2012-04-17 Thread Michael Paquier
a variable like DOCBOOKSTYLE? Thanks in advance! -- Michael Paquier http://michael.otacoo.com

Re: [GENERAL] Compile docs on ArchLinux

2012-04-18 Thread Michael Paquier
sure there is a trick able to solve that just by looking at the structure of arch files... Btw, I had another question: is it possible to compile postgres docs with docbook 4.5? At config step, it looks that only docbook 4.2 is supported. Regards, -- Michael Paquier http://michael.otacoo.com

Re: [GENERAL] Compile docs on ArchLinux

2012-04-18 Thread Michael Paquier
On Wed, Apr 18, 2012 at 11:08 PM, Tom Lane t...@sss.pgh.pa.us wrote: Michael Paquier michael.paqu...@gmail.com writes: is it possible to compile postgres docs with docbook 4.5? At config step, it looks that only docbook 4.2 is supported. If ArchLinux doesn't provide the 4.2 DTD, you ought

Re: [GENERAL] Compile docs on ArchLinux

2012-04-19 Thread Michael Paquier
On Wed, Apr 18, 2012 at 6:51 PM, hubert depesz lubaczewski dep...@depesz.com wrote: On Wed, Apr 18, 2012 at 01:25:14PM +0900, Michael Paquier wrote: Hi all, Under Arch, I am not able to compile Postgres docs. By having a look at config.log, it cannot find the docbook folder

Re: [GENERAL] Are there any options to parallelize queries?

2012-09-04 Thread Michael Paquier
be overkill at any rate. Yes it does. There are things implemented in Postgres-XC planner that allows to ship to remote nodes portion of the query if necessary. -- Michael Paquier http://michael.otacoo.com

Re: [GENERAL] PG Stats Collector

2013-05-12 Thread Michael Paquier
For such things documentation is your best friend. Please see inline. On Sun, May 12, 2013 at 4:30 PM, Arvind Singh arvin...@hotmail.com wrote: I need help in understanding the purpose of the following columns produced by PG stats collector in version 9.1 From pg_stat_database

Re: [GENERAL] Success stories of PostgreSQL implementations in different companies

2013-05-28 Thread Michael Paquier
On Tue, May 28, 2013 at 12:25 AM, ocalde...@solucionesaplicativas.comwrote: Thank you Wolfgang, just one question, what bio means? In the part that says 69 bio EUR... In this case, billions. -- Michael

Re: [GENERAL] Trouble with replication

2013-06-05 Thread Michael Paquier
On Thu, Jun 6, 2013 at 7:23 AM, David Greco david_gr...@harte-hanks.comwrote: On the master or on the slave, or on both? I thought shipping the archived WAL files from the master to the slave did this already? In your case you need to transfer the WAL files using streaming replication, so

Re: [GENERAL] Slave promotion failure

2013-06-06 Thread Michael Paquier
On Fri, Jun 7, 2013 at 1:37 AM, François Beausoleil franc...@teksol.infowrote: I can't seem to promote the slave: $ sudo -u postgres touch /var/lib/postgresql/9.1/main/recovery.done # log is silent This has no effect. recovery.conf is renamed to recovery.done internally by the server. If

Re: [GENERAL] Trouble with replication

2013-06-06 Thread Michael Paquier
On Thu, Jun 6, 2013 at 9:19 PM, David Greco david_gr...@harte-hanks.comwrote: Then what is the purpose to shipping the archived WAL files to the slave? i.e. if wal_keep_segments has to be high enough to cover any replication lag anyways, then should I even bother shipping them over? Oh. I

Re: [GENERAL] Can't increase shared_buffers for PostgreSQL on openSUSE 12.3

2013-06-14 Thread Michael Paquier
On Sat, Jun 15, 2013 at 5:46 AM, Joshua D. Drake j...@commandprompt.comwrote: The type of shared memory postgresql uses is rarely used by other systems. However, as I recall 9.3 resolves the shmmax issue as a whole so it won't be a problem. Yes, by reducing system v shared memory consumption:

Re: [GENERAL] json functions

2013-06-18 Thread Michael Paquier
On Wed, Jun 19, 2013 at 2:00 PM, Jayadevan M jayadevan.maym...@ibsplc.com wrote: I have PostgreSQL 9.2.1. I can see a few json functions under pg_catalog, json_send, for example. But I can’t find any documentation. Am I missing something? I am sure you are looking for that:

Re: [GENERAL] Efficiency of materialized views refresh in 9.3

2013-07-04 Thread Michael Paquier
On Fri, Jul 5, 2013 at 6:10 AM, Joe Van Dyk j...@tanga.com wrote: Hi, Is refreshing a materialized view in 9.3 basically: delete from mat_view; insert into mat_view select * from base_view; Nope. Here is some documentation:

Re: [GENERAL] Can't create plpython language

2013-07-04 Thread Michael Paquier
On Thu, Jul 4, 2013 at 6:26 PM, guxiaobo1982 guxiaobo1...@qq.com wrote: Hi, I am running PostgreSQL 9.2.4.1 (from EnterpriseDB) on CENTOS 5.9 X64 server, I got the following errors when trying to create the python language handler, can you help with this, thanks in advance. If this is PPAS,

Re: [GENERAL] decrease my query duration

2013-07-04 Thread Michael Paquier
On Fri, Jul 5, 2013 at 10:04 AM, bricklen brick...@gmail.com wrote: On Thu, Jul 4, 2013 at 5:26 PM, David Carpio dav...@consistentstate.com wrote: Also, can you supply the EXPLAIN (ANALYZE, BUFFERS) plan instead of the simple EXPLAIN plan? Then it might be interesting that you scan what is

Re: [GENERAL] Longest Common Subsequence in Postgres - Algorithm Challenge

2013-07-08 Thread Michael Paquier
On Tue, Jul 9, 2013 at 5:04 AM, Robert James srobertja...@gmail.com wrote: On 7/8/13, hubert depesz lubaczewski dep...@depesz.com wrote: On Mon, Jul 08, 2013 at 09:09:26AM -0400, Robert James wrote: I have two relations, where each relation has two fields, one indicating a name and one

Re: [GENERAL] Support for Foreign keys with arrays

2013-07-09 Thread Michael Paquier
On Tue, Jul 9, 2013 at 6:26 PM, itishree sukla itishree.su...@gmail.com wrote: Hello Every one, I have a requirement for support for foreign keys with arrays, which is not there in postgresql 9.2, however it is in development for 9.3, i can see there is some thread saying patch is available,

Re: [GENERAL] Support for Foreign keys with arrays

2013-07-10 Thread Michael Paquier
On Wed, Jul 10, 2013 at 3:10 PM, itishree sukla itishree.su...@gmail.com wrote: Thanks, not sure how to download and apply this patch, not getting any down load link. ? In the section Comments, some of the lines are referred by patch. Click on the latest one. You will be redirected to the email

Re: [GENERAL] pg recovery

2013-07-11 Thread Michael Paquier
On Thu, Jul 11, 2013 at 4:39 PM, Jayadevan M jayadevan.maym...@ibsplc.com wrote: I have postgresql streaming replication set up. I forgot to add an entry for trigger_file in recovery.conf. So I added that entry and did a pg_ctl reload. Recovery parameters are not GUC parameters, so doing a

Re: [GENERAL] pg recovery

2013-07-11 Thread Michael Paquier
On Thu, Jul 11, 2013 at 6:19 PM, Jayadevan M jayadevan.maym...@ibsplc.com wrote: Hi, jayadevan.maym...@ibsplc.com wrote: I have postgresql streaming replication set up. I forgot to add an entry for trigger_file in recovery.conf. So I added that entry and did a pg_ctl reload. Recovery

Re: [GENERAL] Using pg_start_backup() and pg_stop_backup()

2013-07-16 Thread Michael Paquier
On Tue, Jul 16, 2013 at 11:10 PM, David B Harris dbhar...@eelf.ddts.net wrote: Good afternoon all, I'm trying to use pg_start_backup() and pg_stop_backup() to create point-in-time backups. More specifically, I'm trying to use filesystem tools (notably rsync or an rsync-like tool) since the

Re: [GENERAL] Using pg_start_backup() and pg_stop_backup()

2013-07-16 Thread Michael Paquier
On Wed, Jul 17, 2013 at 8:24 AM, David B Harris dbhar...@eelf.ddts.net wrote: On Wed Jul 17, 08:12am +0900, Michael Paquier wrote: On Tue, Jul 16, 2013 at 11:10 PM, David B Harris dbhar...@eelf.ddts.net wrote: 4. Copy all logs from start of pg_start_backup() through to when

Re: [GENERAL] Using pg_start_backup() and pg_stop_backup()

2013-07-16 Thread Michael Paquier
On Wed, Jul 17, 2013 at 10:49 AM, John R Pierce pie...@hogranch.com wrote: On 7/16/2013 6:21 PM, David B Harris wrote: Actually though (if any PostgreSQL developers are paying attention), it might be useful to have a new WAL segment-managing behaviour. With the advent of the replication

Re: [GENERAL] Parameter for query

2013-07-16 Thread Michael Paquier
On Wed, Jul 17, 2013 at 1:25 PM, Robert James srobertja...@gmail.com wrote: Is there any way to set a variable or parameter for a query? I have a long query where a certain variable needs to be easy to change. I'd like to do something like: threshold = 10.3 SELECT... WHERE x

Re: [GENERAL] Build RPM from Postgres Source

2013-07-17 Thread Michael Paquier
On Wed, Jul 17, 2013 at 9:28 PM, Devrim GÜNDÜZ dev...@gunduz.org wrote: Hi, On Fri, 2013-07-12 at 14:37 -0700, ktewari1 wrote: Hi, I need to have some different settings(like NAMEDATALEN etc.) and that's why I'm trying to build postgres from the source and to create an rpm to be send

Re: [GENERAL] Viewing another role's search path?

2013-07-23 Thread Michael Paquier
On Tue, Jul 23, 2013 at 9:15 PM, Ian Lawrence Barwick barw...@gmail.comwrote: Is there some simple way of viewing the search path (or other role-specific setting) for a role different to the current role? Apart from querying 'pg_db_role_setting' directly? This one perhaps? select rolname,

Re: [GENERAL] Speed up Switchover

2013-07-26 Thread Michael Paquier
On Fri, Jul 26, 2013 at 3:00 PM, Samrat Revagade revagade.sam...@gmail.comwrote: secondary without having to rsync the data as it can take up to 10 hours. pg_rewind (https://github.com/vmware/pg_rewind) is what you need. But I think it has a problem regarding the hint bits which Robert Hass

Re: [GENERAL] xlog min recovery request ... is past current point ...

2013-08-04 Thread Michael Paquier
On Fri, Aug 2, 2013 at 11:33 PM, Alberto Bussolin alberto.busso...@edistar.com wrote: Hi, i was testing a point in time recovery on a postgres 9.1.9. When processing the xlog i found out these log messages (on postgres.log): postgres@postgres[[local]] FATAL: the database system is

Re: [GENERAL] dblink / Insert several records into remote table

2013-08-05 Thread Michael Paquier
On Mon, Aug 5, 2013 at 6:22 PM, P. Broennimann peter.broennim...@gmail.com wrote: Hello I'd like to use dblink to insert records (several) from a local table to a remote table. Is it possible to do this in one statement? Something like: insert into remotetable select col1, col2, col3

Re: [GENERAL] inserting huge file into bytea cause out of memory

2013-08-07 Thread Michael Paquier
On Wed, Aug 7, 2013 at 3:56 PM, Albe Laurenz laurenz.a...@wien.gv.at wrote: liuyuanyuan wrote: By the way, my project is about migrating Oracle data of BLOB type to PostgreSQL database. The out of memory error occurred between migrating Oracle BLOB to PostgreSQL bytea. Another question, if I

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] 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:

Re: [GENERAL] Replication delay

2013-08-11 Thread Michael Paquier
On Sun, Aug 11, 2013 at 5:51 AM, ascot.m...@gmail.com ascot.m...@gmail.com wrote: Hi, I have a pair of PG servers, a master and a replica, all read-write queries are handled by the master, read-only ones are by the replica. From time to time the replica itself is too busy, all read-only

Re: [GENERAL] Getting list of supported types in Postgres

2013-08-14 Thread Michael Paquier
On Thu, Aug 15, 2013 at 6:00 AM, Bruce Momjian br...@momjian.us wrote: Try psql -E, and run the \dT command to see the query it uses. You have also the following commands: - ¥dT+, all types with addition information like its size ('var' is for example variable length) - ¥dTS+, this includes also

Re: [GENERAL] pg_basebackup from new master's slave then recovery from new master.

2013-08-18 Thread Michael Paquier
(Including the typo mistake mentioned in the 2nd email) On Sat, Aug 17, 2013 at 8:47 PM, Piotr Gasidło qua...@barbara.eu.org wrote: All on 9.3beta2. Current setup: server1 (MASTER) - server2 (SLAVE) - server3 (SLAVE) server2 is hot_standby and gets WALs from server1 server3 is hot_standby

Re: [GENERAL] Bug in psql (\dd query)

2013-08-22 Thread Michael Paquier
On Wed, Aug 21, 2013 at 11:34 PM, Ivan Radovanovic radovano...@gmail.com wrote: On 08/21/13 16:03, Tom Lane napisa: Problem is if you create table in schema other than public (I am not sure if \dd should show comments only for objects in public schema, I assumed not?) db=# create schema

Re: [GENERAL] Unique constraint and unique index

2013-08-22 Thread Michael Paquier
On Thu, Aug 22, 2013 at 2:46 AM, Ivan Radovanovic radovano...@gmail.com wrote: Just to verify: - when unique index is created row is added only to pg_index table but not to pg_constraint table (although in fact that index is behaving like constraint on table) Yep. postgres=# create table foo

Re: [GENERAL] Temp files on Commit

2013-08-22 Thread Michael Paquier
On Fri, Aug 23, 2013 at 12:44 AM, bricklen brick...@gmail.com wrote: On Thu, Aug 22, 2013 at 8:40 AM, Tom Lane t...@sss.pgh.pa.us wrote: There is some setting that controls whether such messages appear at all Is it log_temp_files? Exactly. More reference here:

Re: [GENERAL] Using of replication by initdb for both nodes?

2013-08-30 Thread Michael Paquier
On Thu, Aug 29, 2013 at 11:06 PM, Bocap kakalot...@yahoo.com wrote: 1. Instead of using pg_basebackup for standby DB, i initdb for both standby and primary. 2. Create recovery.conf in standby DB, and start both nodes. Now it work fine for me, but is it sure that no problem? A standby node

Re: [GENERAL] My Experiment of PG crash when dealing with huge amount of data

2013-08-30 Thread Michael Paquier
On Fri, Aug 30, 2013 at 6:10 PM, 高健 luckyjack...@gmail.com wrote: In log, I can see the following: LOG: background writer process (PID 3221) was terminated by signal 9: Killed Assuming that no users on your server manually killed this process, or that no maintenance task you implemented did

Re: [GENERAL] Old record migration to another table made the db slower

2013-09-06 Thread Michael Paquier
On Thu, Sep 5, 2013 at 6:05 PM, Tomas Vondra t...@fuzzy.cz wrote: On 5 Září 2013, 8:52, Arun P.L wrote: Actual intention of the migration of old records was to speed up the original_data_table which is used frequently by users. How can I get this problem get this fixed? What are the steps to

Re: [GENERAL] How to check if any WAL file is missing in archive folder

2013-09-06 Thread Michael Paquier
On Fri, Sep 6, 2013 at 4:04 PM, Albe Laurenz laurenz.a...@wien.gv.at wrote: ascot.m...@gmail.com wrote: I am planing to backup archived WAL files from master to another machine, is there a way to check and make sure the backup archive file are all good and no any file missing or corrupted?

Re: [GENERAL] PK referenced function

2013-09-06 Thread Michael Paquier
On Fri, Sep 6, 2013 at 10:26 PM, Agustin Larreinegabe alarre...@gmail.com wrote: I want to know if exists a postgres function or some easy way to know if a PK in a table is already referenced in another table/tables. psql has all you want for that. For example in this case: =# create table aa (a

Re: [pgeu-general] [GENERAL] Call for design: PostgreSQL mugs

2013-09-07 Thread Michael Paquier
On Sat, Sep 7, 2013 at 7:01 PM, Raymond O'Donnell r...@iol.ie wrote: On 07/09/2013 01:34, Berend Tober wrote: Peter Geoghegan wrote: On Thu, Sep 5, 2013 at 8:22 AM, Merlin Moncure mmonc...@gmail.com wrote: I'm still partial to this guy:

Re: [GENERAL] Levenshtein Distance with more than 255 characters

2013-09-07 Thread Michael Paquier
On Sat, Sep 7, 2013 at 6:28 AM, Janek Sendrowski jane...@web.de wrote: Do you know the destination. I cant find it. Here it is: $ find . -name *.[c|h] | xgrep MAX_LEVENSHTEIN_STRLEN ./contrib/fuzzystrmatch/levenshtein.c:#define MAX_LEVENSHTEIN_STRLEN255

Re: [GENERAL] 9.2 Replication in Ubuntu ; need help

2013-09-12 Thread Michael Paquier
On Thu, Sep 12, 2013 at 7:53 AM, AI Rumman rumman...@gmail.com wrote: psql 2013-09-12 14:48:04 UTC FATAL: the database system is starting up I configured replication for Centos so many times and followed those steps. Is there something I am missing? Perhaps hot_standby = on in the slave's

Re: [GENERAL] Moving from 9.2 to 9.3

2013-09-18 Thread Michael Paquier
On Wed, Sep 18, 2013 at 5:00 AM, Jayadevan M maymala.jayade...@gmail.com wrote: When I upgraded from 9.2 to 9.3, I copied the postgresql.conf and pg_hba.conf files form 9.2 installation and used those. Is that likely to cause any issues? Since 9.2, unix_socket_directory has been renamed to

Re: [GENERAL] Number of WAL segment

2013-09-21 Thread Michael Paquier
On Tue, Sep 17, 2013 at 2:35 PM, tdev457 idzo...@gmail.com wrote: Thanks, I am confused now.When checkpoint_segment is set to 3 there are 7 WAL segments in pg_xlog.When I set checkpoint_segments to 10 there are 11 WAL segments. The maximum number of WAL files is defined by this formula: (2 +

Re: [GENERAL] Number of WAL segment

2013-09-21 Thread Michael Paquier
On Tue, Sep 17, 2013 at 9:46 PM, tdev457 idzo...@gmail.com wrote: Hi, I am using PostgreSQL 8.3.8!!! How can I increase number of WAL segments in pg_xlog??? Current settings are: checkpoint_segments=10 checkpoint_completion_target=0.5 WAL segments are generated every 10 min and I want to

[GENERAL] Re: [GENERAL] pg_upgrade unrecognized configuration parameter “unix_socket_directory”

2013-09-21 Thread Michael Paquier
On Wed, Sep 18, 2013 at 11:35 AM, Clodoaldo Neto clodoaldo.pinto.n...@gmail.com wrote: I'm trying to upgrade Postgresql from 9.2 to 9.3 in Fedora 18 using this command as the postgres user $ pg_upgrade -b /bin -B /usr/pgsql-9.3/bin -d /var/lib/pgsql/data -D /var/lib/pgsql/9.3/data/ -j 2 -u

Re: [GENERAL] How to create recurrence schedule event?

2013-09-23 Thread Michael Paquier
On Tue, Sep 24, 2013 at 3:55 AM, Raymond O'Donnell r...@iol.ie wrote: There isn't a built-in scheduler in PostgreSQL - the usual advice is to use cron to execute a query via the psql client, or to install and use pgAgent. Or with a 9.3 server to use a background worker that could do the job for

Re: [GENERAL] how to tell master from replica

2013-09-25 Thread Michael Paquier
On Thu, Sep 26, 2013 at 8:53 AM, Scott Ribe scott_r...@elevated-dev.com wrote: Assuming a master replica set up using streaming replication, hot standby, 9.3. I'd like to have a single script on both machines distinguish whether it's running on the machine with the master or replica, and

Re: [GENERAL] [HACKERS] Who is pgFoundery administrator?

2013-10-02 Thread Michael Paquier
On Wed, Oct 2, 2013 at 5:37 PM, KONDO Mitsumasa kondo.mitsum...@lab.ntt.co.jp wrote: Who is pgFoundery administrator or board member now? I would like to send e-mail them. At least, it does not have information and support page in pgFoundery homepage. Why don't you consider github as a

Re: [GENERAL] Feature request: support queries with returning on simple views with automatic update

2013-10-11 Thread Michael Paquier
it would be great if i could simply write 'insert into simple_view returning col1' or 'insert into simple_view returning col2' and postgres would make the magic behind. You can do it with 9.3~ servers already. Here is an example: =# create table aa (a int); CREATE TABLE =# insert into aa

Re: [GENERAL] declare constraint as valid

2013-10-12 Thread Michael Paquier
On Thu, Oct 10, 2013 at 3:44 AM, Torsten Förtsch torsten.foert...@gmx.net wrote: Hi, assuming a constraint is added to a table as NOT VALID. Now I know it IS valid. Can I simply declare it as valid by update pg_constraint set convalidated='t' where conrelid=(select c.oid

Re: [GENERAL] Need some help on Performance 9.0.4

2013-10-12 Thread Michael Paquier
On Sat, Oct 12, 2013 at 12:56 AM, akp geek akpg...@gmail.com wrote: We have been running 4 of our applications on 9.0.4, which we are planning to update the database 9.2.2 by the year end. we have the streaming replication also running 9.2.4 has fixed a severe security problem. If you do not

Re: [GENERAL] Is there something like a limited superuser to give to a db-assistant?

2013-10-24 Thread Michael Paquier
On Fri, Oct 25, 2013 at 10:53 AM, Andreas maps...@gmx.net wrote: Hi, how can I give a db-assistant the rights to create and drop schemas, tables, views ... BUT keep him out of certain existing schemas and tables? Depending on what you want to do, you will have to use a combination GRANT and

Re: [GENERAL] Need help how to manage a couple of daily DB copies.

2013-10-24 Thread Michael Paquier
On Fri, Oct 25, 2013 at 10:53 AM, Andreas maps...@gmx.net wrote: Hi, I'd like to set up a DB-Server that keeps copies of our productive db for an external db-assistant. He should prepare chores on the test-server and mail the sql scripts to me. I'll look over those scripts and run them

Re: [GENERAL] what checksum algo?

2013-11-13 Thread Michael Paquier
On Thu, Nov 14, 2013 at 12:58 AM, Scott Ribe scott_r...@elevated-dev.com wrote: What checksum algorithm wound up in 9.3? (I found Simon Riggs 12/2011 submittal using Fletcher's, Michael Paquier's 7/2013 post stating CRC32 reduced to 16, and another post online claiming that it was changed

Re: [GENERAL] Tuning 9.3 for 32 GB RAM

2013-11-14 Thread Michael Paquier
On Thu, Nov 14, 2013 at 10:44 PM, Alexander Farber alexander.far...@gmail.com wrote: sysctl.conf: kernel.shmmax=17179869184 kernel.shmall=4194304 You do not need those settings in sysctl.conf since 9.3 as consumption of V shared memory has been reduced with this commit:

Re: [GENERAL] Install pg_trgm from source

2013-11-15 Thread Michael Paquier
On Fri, Nov 15, 2013 at 10:00 PM, Janek Sendrowski jane...@web.de wrote: Hi, I like to change the source code of the pg_trgm extension a little bit. Where can I get the source code and how do I compile it? If you have fetched a tarball of Postgres or git copy, simply have a look in

Re: [GENERAL] Postgres as In-Memory Database?

2013-11-17 Thread Michael Paquier
On Sun, Nov 17, 2013 at 8:25 PM, Stefan Keller sfkel...@gmail.com wrote: How can Postgres be used and configured as an In-Memory Database? Does anybody know of thoughts or presentations about this NoSQL feature - beyond e.g. Perspectives on NoSQL from Gavin Roy at PGCon 2010)? Given, say 128

Re: [GENERAL] PG replication across DataCenters

2013-11-22 Thread Michael Paquier
On Fri, Nov 22, 2013 at 10:03 PM, Kaushal Shriyan kaushalshri...@gmail.com wrote: I am not sure i understand the difference between async and sync replication and on what scenarios i should use async or sync replication. Does it mean if it is within same DC then sync replication is the best and

Re: [GENERAL] PG replication across DataCenters

2013-11-22 Thread Michael Paquier
On Fri, Nov 22, 2013 at 9:44 PM, Albe Laurenz laurenz.a...@wien.gv.at wrote: Torsten Förtsch wrote: Don't use synchronous replication if you have a high transaction rate and a noticable network latency between the sites. Wait for the next bugfix release, since a nasty bug has just been

Re: [GENERAL] PG replication across DataCenters

2013-11-23 Thread Michael Paquier
On Fri, Nov 22, 2013 at 11:46 PM, Albe Laurenz laurenz.a...@wien.gv.at wrote: Michael Paquier wrote: On Fri, Nov 22, 2013 at 10:03 PM, Kaushal Shriyan kaushalshri...@gmail.com wrote: I am not sure i understand the difference between async and sync replication and on what scenarios i should

Re: [GENERAL] shared_buffers and temp_buffers why manual and code are different?

2013-11-23 Thread Michael Paquier
On Sat, Nov 23, 2013 at 4:30 PM, Tianyin Xu t...@cs.ucsd.edu wrote: Hi, I want to tune the memory usage of PG (9.3.1) on my environment. I'm really confused by the following two configuration parameters, shared_buffers, temp_buffers, Take shared_buffers as the example, the manual says,

Re: [GENERAL] Fwd: row_to_json() with numerical indices in stead of associative indices

2013-11-30 Thread Michael Paquier
On Sat, Nov 30, 2013 at 11:48 PM, Tjibbe tji...@rijpma.org wrote: Hello there, Is it possible to add an parameter for the function row_to_json()? So you can choose for: numerical indices: [1, true, string, null] associative indices: [f1:1,f2: true, f3:string,f4: null] The this extra

Re: [GENERAL] [HACKERS] [pgrpm-HACKERS]SPEC file for PostgreSQL

2013-12-06 Thread Michael Paquier
That On Fri, Dec 6, 2013 at 7:08 PM, Sameer Kumar sameer.ku...@ashnik.comwrote: Hi, I am trying to do a custom build (and generate binary and source RPM) package for PostgreSQL. I know community already has a RPM package, but I am trying to do a custom build. I am using attached SPEC

Re: [Postgres-xc-general] [GENERAL] Tuple not found error during Index creation

2013-12-09 Thread Michael Paquier
On Tue, Dec 10, 2013 at 7:17 AM, Sandeep Gupta gupta.sand...@gmail.com wrote: We are trying to trace cause and potential solution of tuple not found error with postgres-xc. The problem happens when indexing a large file. It seems the autovaccum locks certain cache pages that the indexer tries

Re: [GENERAL] Replication: GZIP compression in WAL sender/receiver processes communication?

2013-12-09 Thread Michael Paquier
On Tue, Dec 10, 2013 at 8:13 AM, Dmitry Koterov dmi...@koterov.ru wrote: Hello. Is there a way to compress the traffic between master and slave during the replication?.. The streaming gzip would be quite efficient for that. (WAL archiving is not too good for this purpose because of high lag.

Re: [Postgres-xc-general] [GENERAL] Tuple not found error during Index creation

2013-12-10 Thread Michael Paquier
On Tue, Dec 10, 2013 at 11:00 PM, Mason Sharp msh...@translattice.com wrote: In our StormDB fork (now TransLattice Storm) I made some changes to address some issues that were uncovered with XC. I am not sure if it will address this specific issue above, but in most cases we make it an error

Re: [Postgres-xc-general] [GENERAL] Tuple not found error during Index creation

2013-12-10 Thread Michael Paquier
On Wed, Dec 11, 2013 at 1:17 PM, Sandeep Gupta gupta.sand...@gmail.com wrote: Hi Michael, I can provide the table schema and the data over which indexing almost always fails with tuple not found error. Would this be of help. The other issue is that file is 3.2GB so we would have work some

Re: [GENERAL] validate synatax

2013-12-11 Thread Michael Paquier
On Wed, Dec 11, 2013 at 9:11 PM, Szymon Guz mabew...@gmail.com wrote: This would simply be as complicated as the database itself, and I'm sure that if I had to implement such a validator, I would just finish with embedding the query in a transaction rolled back at the end, and run it on some

Re: [GENERAL] build from source with MSVC

2013-12-11 Thread Michael Paquier
On Wed, Dec 11, 2013 at 7:20 PM, Philipp Kraus philipp.kr...@tu-clausthal.de wrote: I must build the pg library from sources under MSVC 2010 and later 2012. Under OSX Linux I call the configure / make tools and I can build the lib well, but is there a project structure for building under

Re: postgresql.org inconsistent (Re: [GENERAL] PG replication across DataCenters)

2013-12-11 Thread Michael Paquier
On Thu, Dec 12, 2013 at 3:19 AM, Wolfgang Keller felip...@gmx.net wrote: postgresql-xc is not postgresql, its a fork. It would at least merit being mentioned in the doc, just like other forks or whatever you may call it, as long as they're open-source. You seem to not realize how many

Re: [GENERAL] Multi Master Replication

2013-12-18 Thread Michael Paquier
On Thu, Dec 19, 2013 at 7:12 AM, Scott Marlowe scott.marl...@gmail.com wrote: On Wed, Dec 18, 2013 at 1:16 PM, John R Pierce pie...@hogranch.com wrote: that sort of replication is very problematic. its virtually impossible to maintain ACID (Atomicity, Consistency, Isolation, Durability) and

Re: [GENERAL] Multi Master Replication

2013-12-18 Thread Michael Paquier
On Thu, Dec 19, 2013 at 2:05 PM, Scott Marlowe scott.marl...@gmail.com wrote: Sharding with plproxy is pretty easy and can scale hugely. Yeah indeed, the writable postgres_fdw could also be used as a solution, if designed carefully. -- Michael -- Sent via pgsql-general mailing list

Re: [GENERAL] Multi Master Replication

2013-12-19 Thread Michael Paquier
On Thu, Dec 19, 2013 at 11:18 PM, Chris Travers chris.trav...@gmail.com wrote: On Thu, Dec 19, 2013 at 6:52 AM, Wolfgang Keller felip...@gmx.net wrote: 2. With sync replication, you have coordination problems and therefore it is never (at least IME) a win compared to master-slave

Re: [GENERAL] Multi Master Replication

2013-12-19 Thread Michael Paquier
On Fri, Dec 20, 2013 at 8:48 AM, Michael Paquier michael.paqu...@gmail.com wrote: On Thu, Dec 19, 2013 at 11:18 PM, Chris Travers chris.trav...@gmail.com wrote: On Thu, Dec 19, 2013 at 6:52 AM, Wolfgang Keller felip...@gmx.net wrote: 2. With sync replication, you have coordination

Re: [GENERAL] Is it advisable to pg_upgrade directly from 9.0 to 9.3?

2013-12-19 Thread Michael Paquier
On Thu, Dec 19, 2013 at 10:07 PM, Laurentius Purba lpu...@sproutloud.com wrote: Hi Greg, I just wanted to know if you were able successfully upgrading from 9.0 to 9.3. I have been doing this upgrading this past week, but always ended up with unsuccessful upgrade. It will be great if you

Re: [GENERAL] Best way to sync possibly corrupted data?

2013-12-19 Thread Michael Paquier
On Fri, Dec 20, 2013 at 5:28 AM, Anand Kumar, Karthik karthik.anandku...@classmates.com wrote: HI, We have an issue with possibly corrupt data in our postgresql server. Errors like: ERROR: index photos_p00_n2 contains unexpected zero page at block 0 ERROR: invalid page header in block

Re: [GENERAL] Do all Postgres queries touch Shared_Buffers at some point?

2013-12-29 Thread Michael Paquier
On Sun, Dec 29, 2013 at 9:05 PM, Shiv Sharma shiv.sharma.1...@gmail.com wrote: I am puzzled about the extent to which shared_bufferes is used for different queries. Do _all_ queries touch shared buffers at some point of their execution? Many of our warehouse queries are seq_scan followed by

Re: [GENERAL] pg_dump dumps EVENT TRIGGER owned by extension

2013-12-31 Thread Michael Paquier
On Tue, Dec 31, 2013 at 5:33 AM, Moshe Jacobson mo...@neadwerx.com wrote: On Mon, Dec 30, 2013 at 2:02 PM, Tom Lane t...@sss.pgh.pa.us wrote: I've committed fixes for these Will these fixes appear in 9.3.3? Yes. -- Michael -- Sent via pgsql-general mailing list

Re: [GENERAL] Dynamic SQL - transition from ms to pg

2014-01-05 Thread Michael Paquier
On Mon, Jan 6, 2014 at 2:13 PM, Erik Darling edarlin...@gmail.com wrote: Hi, I've been developing for MS SQL around four years. I'm starting out with some work in Postgresql next week, and I'd like to know if there's any equivalent way to do something like this (from my word press)

Re: [GENERAL] AutoVacuum Daemon

2014-01-07 Thread Michael Paquier
On Mon, Dec 30, 2013 at 11:02 PM, Leonardo M. Ramé l.r...@griensu.com wrote: On 2013-12-30 13:45:43 +, Haribabu kommi wrote: On 30 December 2013 19:11 Leonardo M. Ramé wrote: Hi, I want know if I should run the auto-vacuum daemon (from /etc/init.d/) or it runs automatically and

Re: [GENERAL] question on parallelism

2014-01-07 Thread Michael Paquier
On Thu, Jan 2, 2014 at 2:29 PM, Chris Travers chris.trav...@gmail.com wrote: On Wed, Jan 1, 2014 at 7:35 PM, Andrew McIntyre amcint...@m-m.com wrote: does postgres have this capability? specifically local intrapartition?

Re: [GENERAL] Do I have to free storage in a UDF if I raise an error?

2014-01-07 Thread Michael Paquier
On Tue, Jan 7, 2014 at 12:46 AM, Stephen Woodbridge wood...@swoodbridge.com wrote: On 1/6/2014 10:00 AM, Pfuntner, John wrote: If I've done a palloc() to get storage inside a user-defined function and raise an error using ereport(), should I be using pfree() to release the storage before the

Re: [GENERAL] wal archive peak during pg_dump

2014-01-09 Thread Michael Paquier
On Thu, Jan 9, 2014 at 7:42 PM, Willy-Bas Loos willy...@gmail.com wrote: Hi, I've set up hot standby slaves for a couple of clusters. The wal is cleaned up after use, i don't use it as a backup (yet). It seems that the amount of wal peaks shortly after midnight, when pg_dump is running. It

Re: [GENERAL] question about checksum in 9.3

2014-01-13 Thread Michael Paquier
On Tue, Jan 14, 2014 at 1:50 AM, Mike Broers mbro...@gmail.com wrote: Hello, I am in the process of planning a 9.3 migration of postgres and I am curious about the checksum features available. In my test 9.3 instance it seemed like this feature provides a log entry of the exact database/oid of

Re: [GENERAL] non-zero xmax yet visible

2014-01-14 Thread Michael Paquier
On Wed, Jan 15, 2014 at 1:26 AM, Ming Li mli89...@gmail.com wrote: I'm a little bit confused by the meaning of xmax. The documentation at http://www.postgresql.org/docs/current/static/ddl-system-columns.html says xmax The identity (transaction ID) of the deleting transaction, or zero for

Re: [GENERAL] pg_basebackup failing

2014-01-14 Thread Michael Paquier
On Wed, Jan 15, 2014 at 6:53 AM, Alan Nilsson anils...@apple.com wrote: Could someone give me some insight to the following error message: [mqsql06:/Volumes/SQL_Set] _postgres% pg_basebackup --user=replicate --host=mqsql03 -xP -Fp --pgdata=pgsql 19439890/65873894 kB (29%), 1/1 tablespace

Re: [GENERAL] pg_basebackup failing

2014-01-15 Thread Michael Paquier
On Wed, Jan 15, 2014 at 8:05 PM, Sameer Kumar sameer.ku...@ashnik.comwrote: The error you are seeing is triggered because this relation file exceeds MAX_TAR_MEMBER_FILELEN or 8GB for a single tar member, which is as well the norm for tar. I thought PostgreSQL would break the file if it

Re: [GENERAL] Correct query to check streaming replication lag

2014-01-20 Thread Michael Paquier
On Tue, Jan 21, 2014 at 12:41 PM, Sameer Kumar sameer.ku...@ashnik.comwrote: On Mon, Jan 20, 2014 at 1:53 PM, Granthana Biswas granth...@zedo.comwrote: Yes we already do that. Count the number of ready wal files. I guess a better place to check would be pg_stat_replication Check this

Re: [GENERAL] Correct query to check streaming replication lag

2014-01-20 Thread Michael Paquier
On Tue, Jan 21, 2014 at 1:30 PM, Sameer Kumar sameer.ku...@ashnik.comwrote: On Tue, Jan 21, 2014 at 12:12 PM, Michael Paquier michael.paqu...@gmail.com wrote: Mind you, here is a simple suggestion: SELECT application_name, pg_xlog_location_diff(sent_location, flush_location

Re: [GENERAL] Correct query to check streaming replication lag

2014-01-20 Thread Michael Paquier
On Tue, Jan 21, 2014 at 2:33 PM, Sameer Kumar sameer.ku...@ashnik.com wrote: We are already using the following query: SELECT CASE WHEN pg_last_xlog_receive_location( ) = pg_last_xlog_replay_location() THEN 0 ELSE EXTRACT (EPOCH FROM now() - pg_last_xact_replay_timestamp()) END AS

Re: [GENERAL] pg_dump: dumpBlobs(): could not open large object: ERROR: large object 27729547 does not exist

2014-01-25 Thread Michael Paquier
On Fri, Jan 24, 2014 at 10:33 PM, Manoj Agarwal m...@ockham.be wrote: Hi, I have a Postgresql-7.4.19 database in SQL_ASCII Encoding format. You should really consider an upgrade first... As mentioned by Kevin this version is outdated. The latest versions of pg_dump support servers down to

Re: [GENERAL] Fully-automatic streaming replication failover when master dies?

2014-01-26 Thread Michael Paquier
On Mon, Jan 27, 2014 at 12:10 PM, Sameer Kumar sameer.ku...@ashnik.comwrote: Dmitry Koterov wrote: PostgreSQL supports synchronous multi-master, MongoDB supports write concern, but this causes a performance penalty). Anyways I doubt that PostgreSQL supports synchronous multi-master

Re: [GENERAL] Fully-automatic streaming replication failover when master dies?

2014-01-26 Thread Michael Paquier
On Mon, Jan 27, 2014 at 12:35 PM, Sameer Kumar sameer.ku...@ashnik.comwrote: On Mon, Jan 27, 2014 at 11:24 AM, Michael Paquier michael.paqu...@gmail.com wrote: PostgreSQL supports synchronous multi-master, MongoDB supports write concern, but this causes a performance penalty). Anyways I

Re: [GENERAL] Composite type

2014-01-27 Thread Michael Paquier
On Mon, Jan 27, 2014 at 2:02 AM, antono124 g.antonopoulos...@gmail.com wrote: Lets say that we have 2 tables. Create Table table1 Of type1 Create Table table2 Of type2 I want to refer the first table in the second. I want to reference the whole table not only one field, so something like

Re: [GENERAL] Reindexing and tablespaces

2014-01-30 Thread Michael Paquier
On Fri, Jan 31, 2014 at 1:24 PM, alexandros_e alexandros...@gmail.com wrote: Hello to all, I have done ALTER DATABASE [database_name] SET default_tablespace = [new_tablespace]; I am wondering, if I reindex this entire DB would the indexes automatically moved into the [new_tablespace] or will

  1   2   3   4   5   6   >