Re: [GENERAL] PG replication across DataCenters

2013-11-22 Thread Michael Paquier
just been fixed btw: http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=98f58a30c1beb6ec0870d6520f49fb40d9d0b566 Regards, -- Michael -- 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] PG replication across DataCenters

2013-11-23 Thread Michael Paquier
On Fri, Nov 22, 2013 at 11:46 PM, Albe Laurenz wrote: > Michael Paquier wrote: >> On Fri, Nov 22, 2013 at 10:03 PM, Kaushal Shriyan >> wrote: >>> I am not sure i understand the difference between async and sync replication >>> and on what scenarios i should us

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

2013-11-23 Thread Michael Paquier
ile the min is 128KB. But from the code, you can clearly see that > it's not the case. There is no exact default value. The default is usually 128MB, but it can be lower depending of what initdb decides. Regards, -- Michael -- 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] Fwd: row_to_json() with numerical indices in stead of associative indices

2013-11-30 Thread Michael Paquier
#x27;string', NULL)) > ); You could rename your function to_num_json to row_to_json and trick search_path to include it in your client depending on the schema where the new function is as two functions with the same name but different arguments can live together. IMO, you are right to do that

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

2013-12-06 Thread Michael Paquier
If I were you, I'd simply take the community spec and modify it for my needs, it is already really complete and contains automatic management of for example translation files, smth that is always a pain to maintain manually. Regards, -- Michael

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

2013-12-09 Thread Michael Paquier
ec of the machine you are using, I am sure that i wouldn't be able to reproduce that on my laptop though. The core team has access to more powerful machines. Also: Postgres-XC 1.1.0 is based on Postgres 9.2.4. -- Michael -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org)

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

2013-12-09 Thread Michael Paquier
ote that there is also a patch pending for 9.4 that would make possible the compression of full page writes, reducing globally the amount of WAL produced by server in exchange of some CPU work to compress and decompress the data. -- Michael -- Sent via pgsql-general mailing list (pgsql-general

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

2013-12-10 Thread Michael Paquier
ould be restricted though to regressions, and compilation. pg_upgrade or isolation tests are not really working... Regards, -- Michael -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

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

Re: [GENERAL] validate synatax

2013-12-11 Thread Michael Paquier
cutions. Regards, -- Michael -- 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] build from source with MSVC

2013-12-11 Thread Michael Paquier
the tools and scripts of msvc are in src/tools/msvc. > So how can I build the postgres library (shared / static version) under MSVC? And here are more references from the docs: http://www.postgresql.org/docs/9.3/static/install-windows-full.html Regards, -- Michael -- Sent via pgsql-general mai

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

2013-12-11 Thread Michael Paquier
iki list the one below is just easier for everybody: http://wiki.postgresql.org/wiki/Replication,_Clustering,_and_Connection_Pooling Perhaps this list is not completely up-to-date, but not adding that in the core documentation facilitates the work of core maintainers. It gives you all the in

Re: [GENERAL] Multi Master Replication

2013-12-18 Thread Michael Paquier
be solved with a couple of Postgres servers using a single-master, multiple-slave approach, or by simply design a system that can do data sharding among a set of Postgres servers to achieve some kind of write scalability. Regards, -- Michael -- Sent via pgsql-general mailing list (pgsql-genera

Re: [GENERAL] Multi Master Replication

2013-12-18 Thread Michael Paquier
On Thu, Dec 19, 2013 at 2:05 PM, Scott Marlowe 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 (pgsql-general@postgresql.

Re: [GENERAL] Multi Master Replication

2013-12-19 Thread Michael Paquier
s been tuned when doing scaling testing with it: partition user and adress tables, replicate stock and item tables. Regards, -- Michael -- 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] Multi Master Replication

2013-12-19 Thread Michael Paquier
On Fri, Dec 20, 2013 at 8:48 AM, Michael Paquier wrote: > On Thu, Dec 19, 2013 at 11:18 PM, Chris Travers > wrote: >> >> >> >> On Thu, Dec 19, 2013 at 6:52 AM, Wolfgang Keller 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
great if you can share you knowledge on this. It would be even better if you use this thread to report the problems you are seeing, such as someone could help you going through this upgrade process. Regards, -- Michael -- Sent via pgsql-general mailing list (pgsql-general@postgresql.o

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

2013-12-19 Thread Michael Paquier
able to get a clean dump. Such block errors happen because of hardware issues, so you are not safe from additional failures that might happen while you do a copy of the existing data folder to a new system. Regards, -- Michael -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) T

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

2013-12-29 Thread Michael Paquier
efinitions of the database objects. So simply everything that is a relation and contains physical data might be in shared buffers. Views for example do not enter in this category. You could for example use pg_buffercache to have a look at what contains the shared buffers: http://www.postgresql.o

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 wrote: > > On Mon, Dec 30, 2013 at 2:02 PM, Tom Lane wrote: >> >> I've committed fixes for these > > > Will these fixes appear in 9.3.3? Yes. -- Michael -- Sent via pgsql-general mailing list (pgsql-general@po

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

2014-01-05 Thread Michael Paquier
l function, language which is pretty handy when generating queries on-the-fly in a procedure like what you are looking for: http://www.postgresql.org/docs/devel/static/plpgsql.html Regards, -- Michael

Re: [GENERAL] AutoVacuum Daemon

2014-01-07 Thread Michael Paquier
spawns an autovacuum process which will take care of >> vacuuming. >> > > Thanks, that's easier than I thought. This parameter is on by default since 8.3, so you don't really need to touch it yourself normally. Regards, -- Michael -- 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] question on parallelism

2014-01-07 Thread Michael Paquier
the case of XC, it is worth noting that a query can take advantage of parallelism on a sequential scan only roughly for sharded tables. In the case of replicated table, query is usually simply pushed to one singke remote node, making the scan occur on this single node. Regards, -- Michael -- S

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

2014-01-07 Thread Michael Paquier
ill be automatically freed when transaction finishes by either a commit or an abort. When calling ereport the transaction will be automatically aborted, hence free'ing the memory. Have a look here for more details: http://www.postgresql.org/docs/devel/static/xfunc-c.html#AEN54284 Regards, -- Michael -- 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] wal archive peak during pg_dump

2014-01-09 Thread Michael Paquier
would be interesting to see with xlogdump what is the WAL generated. Regards, -- Michael -- 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] question about checksum in 9.3

2014-01-13 Thread Michael Paquier
ata_checksums that allow you to check with a psql client if checksums are used on a server. Regards, -- Michael -- 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] non-zero xmax yet visible

2014-01-14 Thread Michael Paquier
session > So in this case, xmax is equal to xmin. I've also seen cases where > xmax is larger than xmin and the row is visible. With the isolation level read committed, changes committed by other sessions during a transaction are visible. > Is this an expected behavior? How shall w

Re: [GENERAL] pg_basebackup failing

2014-01-14 Thread Michael Paquier
mehow? Partitions on the parent table. Regards, -- Michael -- 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] pg_basebackup failing

2014-01-15 Thread Michael Paquier
e if it grows beyond 1GB (1GB is > segment size which one can modify while compiling). Am I missing something > or have I got it totally wrong? > No, you are missing nothing. Thanks for reminding :) (This is settable with ./configure --with-segsize) So the build has been done with some uncommon option. Regards, -- Michael

Re: [GENERAL] to_date() and invalid dates

2014-01-20 Thread Michael Nolan
Thomas, try this: '2013-02-31'::date -- Mike Nolan On Mon, Jan 20, 2014 at 7:44 AM, Thomas Kellerer wrote: > Hi, > > I asked this a while back already: > >select to_date('2013-02-31', '-mm-dd'); > > will not generate an error (unlike e.g. Oracle) > > > However in the release notes of 9

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

2014-01-20 Thread Michael Paquier
_location, flush_location) AS replay_delta, sync_priority, sync_state FROM pg_stat_replication ORDER BY replay_delta ASC, application_name; Regards -- Michael

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 wrote: > > 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, >

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

2014-01-20 Thread Michael Paquier
- (x'''||'FF00'||'''::bigint * x'''||xlog2||'''::bigint + x'''||offset2||'''::bigint)'; EXECUTE SQL into diff; /* Return the value in numeric by explicit casting */ RETURN diff::numeric; END; $function$; Source: http://vibhorkumar.wordpress.com/2013/02/18/pg_xlog_location_diff-function-for-postgreqsqlppas/ -- Michael

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

2014-01-25 Thread Michael Paquier
wn to 7.4 so an upgrade is doable. Regards, -- Michael -- 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] Fully-automatic streaming replication failover when master dies?

2014-01-26 Thread Michael Paquier
us multi-master" > Postgres core taken as such does not support multi-master. The fork of PostgreSQL called Postgres-XC somewhat does, for OLTP applications. Regards, -- Michael

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 wrote: > > 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 performan

Re: [GENERAL] Composite type

2014-01-27 Thread Michael Paquier
t null e | ty1 | Indexes: "t2_pkey" PRIMARY KEY, btree (d) Foreign-key constraints: "t2_e_fkey" FOREIGN KEY (e) REFERENCES t1(c) Regards, -- Michael -- 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] Reindexing and tablespaces

2014-01-30 Thread Michael Paquier
e] or will they remain in > the tablespace they were originally created on; They remain on the tablespace they have been created on. Note as well that the new value of default_tablespace takes effect only after reloading the session. Regards, -- Michael -- Sent via pgsql-general mailing list (

Re: [GENERAL] pg_basebackup on standby node failed

2014-01-31 Thread Michael Paquier
ecord called XLOG_BACKUP_END once it is done. Only pg_basebackup is able to take backups from a standby because it uses the replication protocol to take the backup and bypasses the WAL record by waiting that all the needed WAL files have been archived. So use pg_basebackup for a standby :) Regards, --

Re: [GENERAL] Fwd: lots of errors from fmgr.h when I try to write a C UDF

2014-02-01 Thread Michael Paquier
lated modules require the libraries and headers in place to compile. You could have those things installed with a server, multiple servers or even nothing running. Regards, -- Michael -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://ww

Re: [GENERAL] Postgresql multidimensional arrays cast fail

2014-02-01 Thread Michael Paquier
$# s $1%type; $# BEGIN $# FOREACH s SLICE 1 IN ARRAY $1 LOOP $# RETURN NEXT s; $# END LOOP; $# RETURN; $# END; $# $function$ -# LANGUAGE plpgsql IMMUTABLE; CREATE FUNCTION =# select reduce_dim(data[1:1]) from aa; reduce_dim {1,2} (1 row) Regards, -- Michael

Re: [GENERAL] pg_basebackup on standby node failed

2014-02-03 Thread Michael Paquier
t -P, that works to create tar files in the /backupDir but > pg_basebackup -D /backupDir -Ft -P -X s will fail with: > pg_basebackup: wal streaming can only be used in plain mode I see no problem with this error message. You are trying to create a tarball and to stream xlog files at the same time

[GENERAL] Ordering Results by a Supplied Order

2014-02-05 Thread Michael Sacket
lient application. In any case, I've often found that to be cumbersome, but I think I've come up with a solution that some of you may find useful. Regards, Michael -- Lets start by creating a new table. CREATE TABLE my_items ( "rid" serial NOT NULL, "position

Re: [GENERAL] Ordering Results by a Supplied Order

2014-02-06 Thread Michael Sacket
On Feb 6, 2014, at 2:23 AM, Vik Fearing wrote: > On 02/06/2014 04:16 AM, Michael Sacket wrote: >> Often times I find it necessary to work with table rows in a specific, >> generally user-supplied order. It could be anything really that requires an >> ordering that can&

Re: [GENERAL] Ordering Results by a Supplied Order

2014-02-07 Thread Michael Sacket
On Feb 6, 2014, at 12:57 PM, Gavin Flower wrote: > On 07/02/14 05:43, Michael Sacket wrote: >> On Feb 6, 2014, at 2:23 AM, Vik Fearing wrote: >> >>> On 02/06/2014 04:16 AM, Michael Sacket wrote: >>>> Often times I find it necessary to work with table rows

Re: [GENERAL] WAL archive on slave

2014-02-09 Thread Michael Paquier
dn't be archived on the slave, seen as > they show up in the directory? > WAL files are only replayed on a slave, not archived. Regards -- Michael

Re: [GENERAL] Better Connection Statistics

2014-02-09 Thread Michael Paquier
atistic, or view that provides any of this. > > For the basic connection information, you could parse the Postgres logs, > assuming > you are being verbose enough to capture everything. In this case, a log parser like pgbadger would help for sure. -- Michael -- Sent via pgsql-general

Re: [GENERAL] Xlogdump compiling error : undefined reference to `ber_sockbuf_io_udp'

2014-02-12 Thread Michael Paquier
directly contact the maintainer xlogdump if you begin playing with it. Saying that, I'd guess that the output of s/d/r means tablespace/database/relation. So if you cannot find those oids it means that they have been deleted at a point later than the record you are looking at. Regards, -- Mich

Re: [GENERAL] Xlogdump compiling error : undefined reference to `ber_sockbuf_io_udp'

2014-02-13 Thread Michael Paquier
age: > newroot: > offset > reuse_page: > seq > split_l: > split_l_root: > split_r: > split_r_root: > standby > update(init): > update: Even if it is easy to guess to which WAL operations all those terms refer to, referring to the source code is easier IMO: https://

Re: [GENERAL] How to continue streaming replication after this error?

2014-02-23 Thread Michael Paquier
to actually update a slave before the master or replication is broken. -- Michael

Re: [GENERAL] pgrestore command

2014-02-28 Thread Michael Paquier
is hard to tell without any details... Regards, -- Michael -- 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] pgrestore command

2014-03-01 Thread Michael Paquier
On Sat, Mar 1, 2014 at 3:23 AM, John R Pierce wrote: > On 2/28/2014 5:06 AM, Michael Paquier wrote: >> >> You could expect a loss of 20% at I/O level by using a virtualized >> environment compared to a physical server with similar hardware (rule >> of thumb, num

Re: [GENERAL] Moving data from M$ JetDB file to Postgres on Linux

2014-03-01 Thread Michael Nolan
I think that PHP has modules (eg, PEAR) that can read MS Access database files, and once you have it in an array you can create INSERT statements for PostgreSQL, including cleaning up any data format issues (eg, dates of 00-00-) -- Mike Nolan On Fri, Feb 28, 2014 at 6:21 PM, Rich Shepard wrot

Re: [GENERAL] How to recovery failed master after failover

2014-03-04 Thread Michael Paquier
n reconnect it. Depending on the size of data in server, this could take some time because of network latency and if you create a new base backup, especially if both nodes are on different (distant?) servers. -- Michael -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] Mysterious DB reset

2014-03-06 Thread Michael Nolan
On 3/6/14, Israel Brewster wrote: > LOG: received smart shutdown request > LOG: autovacuum launcher shutting down > LOG: shutting down > LOG: database system is shut down > > However, there are no timestamps on any of the entries (can I fix that?) Yes, change the log_line_prefix in the pos

Re: [GENERAL] There is bug in PCS 0.9.26: configure pacemaker resource agent for PG stream replication

2014-03-07 Thread Michael Paquier
erlabs.org/mailman/listinfo/pacemaker Regards, -- Michael -- 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] pg_worker and notify

2014-03-16 Thread Michael Paquier
com/michaelpq/pg_workers Here is for example one bgworker sending NOTIFY messages automatically, this might help you as well: https://github.com/michaelpq/pg_workers/tree/master/hello_notify Regards, -- Michael -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

Re: [GENERAL] Alter column with views depended on it without drop views

2014-03-19 Thread Michael Paquier
tion: begin; drop view v1; [...] alter table tab alter column col set data type mytype; create view v1 as select blabla; [...] commit; Regards, -- Michael -- 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] High Level Committers Wanted

2014-03-19 Thread Michael Paquier
There may be enough funds to really create a high-tech-funky suit like that :) -- Michael -- 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] Backup WAL Replication Server

2014-03-20 Thread Michael Paquier
rything is here: http://www.postgresql.org/docs/devel/static/backup.html Roughly, taking periodic base backups and maintaining WAL archives is the way to go. Regards -- Michael -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www

Re: [GENERAL] Trimming transaction logs after extended WAL archive failures

2014-03-27 Thread Michael Paquier
r tables that are large enough to matter can easily run > through the night. Yep, depending on your application needs you could actually avoid any periodic VACUUM FULL-like operations that need an exclusive lock on the objects it is cleaning by making autovacuum more aggressive. This makes your house cle

Re: [GENERAL] is there a way to dump the version of extensions

2014-03-28 Thread Michael Paquier
lable with server is created. You could always correct by hand the dump file created though, just be sure that the version of the extension you are compiling is compatible with the server you are going to load the dump to. Regards, -- Michael -- Sent via pgsql-general mailing list (pgsql-general@

[GENERAL] The result of the last function call overwrites the result of previous function calls

2014-03-28 Thread Michael Ainsworth
n_path_f('{"foods":["Cheese","Ham","Potato"]}', path) from ztmp.json_path_test My question is: Can someone please enlighten me as to why the result of the last function call overwrites the results to the previous function calls? Michael Ainsworth ABR

Re: [GENERAL] How do you find the row count for all your tables in Postgres?

2014-04-07 Thread Michael Paquier
for > all db tables in psql 7.4.3 ? The documentation of 7.4 does not mention explicitely what are the columns of this view, but connecting to a 7.4 server and issuing "¥d pg_stat_user_tables" would help and you might be able to get an equivalent of what you are trying to do. -- Mi

Re: [GENERAL] import .sql file into PostgreSQL database

2014-04-07 Thread Michael Paquier
anyone helps me out. Thanks! As you mentionned "¥i $FILE" (as is psql -f $FILE) is just fine, as you are getting a permission error just be sure that the user that is using the client application has a read access to the sql file you are trying to use. -- Michael -- Sent via pgsql-gener

Re: [GENERAL] import .sql file into PostgreSQL database

2014-04-09 Thread Michael Paquier
ad the SQL file. On Windows, you need either to play with icacls to set some read permissions or you can change it directly using the properties menu findable by right-clicking on the culprit file. -- Michael -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make ch

Re: [GENERAL] Problem with query

2014-04-11 Thread Michael Nolan
On 4/11/14, Chris Curvey wrote: > On Fri, Apr 11, 2014 at 1:50 PM, Susan Cassidy < > susan.cass...@decisionsciencescorp.com> wrote: > >> I have a query with several joins, where I am searching for specific data >> in certain columns. Have you tried running each of your joins separately to see if

Re: [GENERAL] streaming replication and recovery

2014-04-13 Thread Michael Paquier
T pg_is_in_recovery();" returns true if server is still performing recovery operations. -- Michael -- 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] shared memory allocation - C function

2014-04-16 Thread Michael Paquier
ving a look at contrib/pg_stat_statements which is a good example? -- Michael

Re: [GENERAL] pg_stat_replication.state: streaming/catchup

2014-04-21 Thread Michael Paquier
der state". > But that does not tell me anything. > When a standby connects for the first time to a primary, it is not yet synchronized, this is the "catchup" phase. Once the lag between the standby and the master is reduced to zero for the first time, replication state changes to "streaming". -- Michael

Re: [GENERAL] pg_stat_replication.state: streaming/catchup

2014-04-21 Thread Michael Paquier
On Mon, Apr 21, 2014 at 8:34 PM, Torsten Förtsch wrote: > On 21/04/14 13:18, Michael Paquier wrote: > s there a difference in the protocol used in those phases? Maybe the > catchup phase is optimized for bulk throughput? > There is no difference AFAIK, the same replication protocol i

Re: [GENERAL] Make basebackup use low level API and rsync

2014-04-21 Thread Michael Paquier
hy this happen? May be we should not use rsync or there is something > impotent we missed ? > What is the version used? Recovery is not able to handle properly the redo for an XLOG record related to btree. -- Michael

Re: [GENERAL] WAL archiving from a standby backup strategy Postgresql 9.3

2014-04-24 Thread Michael Paquier
ernative ways like rsync, >> lsyncd etc. Does anyone tried to go this path and eventually share his >> experience. > > 9.3 introduced a cascading replication feature [1] that allows you to > stream WAL from standbys to other standbys. Picky correction: cascading replication has

[GENERAL] Ingres to Postgres migration

2014-04-30 Thread Michael Bostock
Hi, We are using an old version of Ingres (3.0.1) and I have been asked to investigate the possibility of migrating to PostgreSQL (9.3.4). I was just wondering if there is any general advice you can give me or if there are any details/tools that will help with the migration. Thanks, Mike

Re: [GENERAL] Ingres to Postgres migration

2014-04-30 Thread Michael Bostock
tically but none worked very well. With the \copy >> command you really have all you need. >> >> >> >> >> On Wed, Apr 30, 2014 at 8:06 AM, Michael Bostock > <mailto:bostoc...@gmail.com>> wrote: >> >> Hi, >> We are using an old version of

Re: [GENERAL] WAL Replication + PITR

2014-04-30 Thread Michael Paquier
sql.org/docs/devel/static/warm-standby-failover.html If you are looking for some ways to automate that with some HA solutions, there is always some information here: https://wiki.postgresql.org/wiki/High_Availability Regards, -- Michael -- Sent via pgsql-general mailing list (pgsql-general@postgresq

Re: [GENERAL] importing a messy text file

2014-04-30 Thread Michael Paquier
Pgloader be an option? http://tapoueh.org/pgloader/ Or pg_bulkload? Contrary to the in-core COPY, it can filter "incorrect" tuple data at the line level. -- Michael -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Building Postgres using mingw

2014-05-07 Thread Michael Paquier
the build dependencies at hand. Something obvious that I may be missing? Is it better to give up with mingw and switch to msvc? Regards, -- Michael -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql

Re: [GENERAL] Building Postgres using mingw

2014-05-07 Thread Michael Paquier
On Wed, May 7, 2014 at 10:26 AM, Jeff Janes wrote: > On Wed, May 7, 2014 at 8:27 AM, Michael Paquier > wrote: >> >> Hi all, >> >> Following some instructions on the wiki and the docs, I am trying to >> compile the code using minwg: >> https://wi

Re: [GENERAL] How to fix lost synchronization with server

2014-05-08 Thread Michael Paquier
e more resources. https://wiki.postgresql.org/wiki/Running_%26_Installing_PostgreSQL_On_Native_Windows https://wiki.postgresql.org/wiki/Building_With_MinGW Regards, -- Michael -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription

Re: [GENERAL] materialised views vs unlogged table (also, ize vs ise)

2014-05-18 Thread Michael Paquier
ou can tackle this limitation in the upcoming 9.4 by using REFRESH CONCURRENTLY, a unique index being necessary on the materialized view. -- Michael -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref

Re: [GENERAL] "Service user account 'postgres' could not be created" -- 8.4.2-1 and Active Directory on Windows08 R2

2011-04-19 Thread Michael Gould
With R2, I had to install using the admin account.  I got those errors before.  It worked once I used a admin account.  If that doesn't work you might want to try turning UAC off, do the install and then turn back on.   Best Regards Michael Gould   "Greg Corradini" w

Re: [GENERAL] SSDs with Postgresql?

2011-04-26 Thread Michael Nolan
On Thu, Apr 21, 2011 at 10:33 AM, Florian Weimer wrote: > * Greg Smith: > > > The fact that every row update can temporarily use more than 8K means > > that actual write throughput on the WAL can be shockingly large. The > > smallest customer I work with regularly has a 50GB database, yet they >

Re: [GENERAL] PHP and PostgreSQL 9.0, pg_connect fails to connect

2011-04-27 Thread Michael Nolan
On Wed, Apr 27, 2011 at 10:42 AM, Thomas Harold wrote: > On 4/27/2011 9:16 AM, Thomas Harold wrote: > >> - SELinux is running, but there are no denied messages in >> /var/log/audit/audit.log and no setroubleshooting alerts in >> /var/log/messages either. >> >> > Well, interestingly enough it is SE

Re: [GENERAL] PostgreSQL Core Team

2011-04-27 Thread Michael Glaesemann
On Apr 27, 2011, at 14:48, Dave Page wrote: > I'm pleased to announce that effective immediately, Magnus Hagander > will be joining the PostgreSQL Core Team. Congratulations, Magnus! Michael Glaesemann grzm seespotcode net -- Sent via pgsql-general mailing list (pg

[GENERAL] Rearranging simple where clauses

2011-05-04 Thread Michael Graham
nd to doing it or is there some deeper reasons? It's not really important I'm just curious. Cheers, -- Michael Graham -- 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] Rearranging simple where clauses

2011-05-04 Thread Michael Graham
s the benefit. But in terms of driving the planner don't we always want to be looking to move all the constants to one side of the expression since the planner seems to like those? -- Michael Graham -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to you

Re: [GENERAL] Rearranging simple where clauses

2011-05-04 Thread Michael Graham
e side of a WHERE-condition operator exactly matches an index, so > you'd need to be looking for places where rearrangement could make > that happen. The reason I never showed you any was because I don't have any I was just curious. But yeah making one side match an index exactly is pr

Re: [GENERAL] Query to return every 1st Sat of a month between two dates

2011-05-11 Thread Michael Nolan
On Wed, May 11, 2011 at 10:22 AM, Alex - wrote: > Hi, > is there an easy way to return the date of every first Saturday of a month > in a data range i.e. 2011-2013 > > This is one way to do it:, there are others: select '2011-01-01'::date + s.a as dates from generate_series(0,1095) as s(a) wher

Re: [GENERAL] length of return value of to_char()

2011-05-20 Thread Michael Glaesemann
iteral --- ' 0011' (1 row) Compare using Fill Mode (FM): postgres=# SELECT quote_literal(to_char(11, 'FM0999')); quote_literal --- '0011' (1 row) See the documentation for more details: <http://www.postgresql.org/docs/9.0/interactive/funct

Re: [GENERAL] counterintuitive behaviour in pl/pgsql

2011-05-21 Thread Michael Glaesemann
4 5 6 (6 rows) It looks like it's just column names stomping on variable names, which is a known issue. This is why a lot of developers (including myself) have conventions of prefixing parameters and variable names (I use in_ for input parameters, v_ for internally defined variables). Michael Glaesemann grzm seespotcode net -- 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] counterintuitive behaviour in pl/pgsql

2011-05-21 Thread Michael Glaesemann
On May 21, 2011, at 13:44, Pavel Stehule wrote: > 2011/5/21 Michael Glaesemann : >> >> It looks like it's just column names stomping on variable names, which is a >> known issue. This is why a lot of developers (including myself) have >> conventions of prefixi

[GENERAL] Where are plpy.execute python commands issued?

2011-05-22 Thread Michael McInnis
ecute("SELECT * FROM my_table", 5) Thanks Michael McInnis 6033 44th Ave. N.E. Seattle, WA 98115 206 517-4701

[GENERAL] invalid byte sequence for encoding "UTF8"

2011-06-02 Thread BRUSSER Michael
essentially the same thing on the database before dumping it. I am looking for advice, hopefully the "best technique" if there is one, any suggestion is appreciated. Thanks, Michael. This email and any attachments are intended solely for the use of the individual or entity to whom

[GENERAL] Invalid byte sequence for encoding "UTF8": 0xedbebf

2011-06-15 Thread BRUSSER Michael
of them, but I never got it right. Is there a way to find the records with the text field containing Unicode bytes "0xedbebf"? Unfortunately this is a very old version 7.3.10 Thank you. Michael. This email and any attachments are intended solely for the use of the individual or enti

Re: [GENERAL] Invalid byte sequence for encoding "UTF8": 0xedbebf

2011-06-15 Thread BRUSSER Michael
On June 15, 2011 01:18:27 PM BRUSSER Michael wrote: > Unless there's no other options I don't want to use sed or break file into > pieces, if possible, -- >> iconv loads everything into RAM. You can use "split", conver

Re: [GENERAL] Invalid byte sequence for encoding "UTF8": 0xedbebf

2011-06-16 Thread BRUSSER Michael
-Original Message- From: Albe Laurenz [mailto:laurenz.a...@wien.gv.at] Sent: Thursday, June 16, 2011 5:16 AM To: BRUSSER Michael; pgsql-general@postgresql.org Subject: RE: [GENERAL] Invalid byte sequence for encoding "UTF8": 0xedbebf BRUSSER Michael wrote: > Is there a wa

Re: [GENERAL] pipe text to copy statement stdin input

2011-06-21 Thread Michael Glaesemann
ql` as a non-interactive > command may not be possible. Right? Use a .pgpass file Michael Glaesemann grzm seespotcode net -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] postgresql and encfs?

2011-06-22 Thread Michael Nolan
Has anyone successfully used encfs with postgresq recently? I'm not sure if this is specifically a postgresql problem, but I'm trying to get postgresql to run on an encrypted file system that is a copy of my live data directory tree (after a shutdown, of course) and am getting the following errors

Re: [GENERAL] postgresql and encfs?

2011-06-22 Thread Michael Nolan
On Wed, Jun 22, 2011 at 3:48 PM, Tom Lane wrote: > Michael Nolan writes: > > Has anyone successfully used encfs with postgresq recently? > > > PANIC: could not open file "pg_xlog/00010009000D" (log file > 9, > > segment 13): Invalid argume

<    7   8   9   10   11   12   13   14   15   16   >