Re: [GENERAL] Does Version 9.1 Streaming Replication Supports Multi-Master?

2012-01-18 Thread Koichi Suzuki
Yes it does, not for hot standby though. Each node can have streaming replication slave for recovery. Also, GTM has its own backup/recovery mechanism which provide no-loss failover when GTM fails. Regards; -- Koichi Suzuki # For XC to provide hot standby feature, we need to synchronize

Re: [GENERAL] Does Version 9.1 Streaming Replication Supports Multi-Master?

2012-01-18 Thread Simon Riggs
On Tue, Jan 17, 2012 at 6:33 PM, Fujii Masao wrote: > On Wed, Jan 18, 2012 at 3:09 AM, Jerry Richards > wrote: >> I know PostgreSQL version 9.1 supports  built-in streaming replication. >> Just wondering if that supports only a single-master or also multi-master >> implementation? > > Only a sing

Re: [GENERAL] Transaction ID wraparound, Oracle style

2012-01-18 Thread A.M.
On Jan 18, 2012, at 2:15 PM, Scott Marlowe wrote: > On Wed, Jan 18, 2012 at 11:21 AM, Igor Polishchuk > wrote: >> Here is an article on a recently discovered Oracle flaw, which allows SCN to >> reach its limit. >> http://www.computerworld.com/s/article/9223506/Fundamental_Oracle_flaw_revea >> l

Re: [GENERAL] Transaction ID wraparound, Oracle style

2012-01-18 Thread Scott Marlowe
On Wed, Jan 18, 2012 at 11:21 AM, Igor Polishchuk wrote: > Here is an article on a recently discovered Oracle flaw, which allows SCN to > reach its limit. > http://www.computerworld.com/s/article/9223506/Fundamental_Oracle_flaw_revea > led?taxonomyId=18&pageNumber=1 > > Please don't beat me for po

[GENERAL] Transaction ID wraparound, Oracle style

2012-01-18 Thread Igor Polishchuk
Here is an article on a recently discovered Oracle flaw, which allows SCN to reach its limit. http://www.computerworld.com/s/article/9223506/Fundamental_Oracle_flaw_revea led?taxonomyId=18&pageNumber=1 Please don't beat me for posting a link for an Oracle related article. If you despise a very no

Re: [GENERAL] scenario with a slow query

2012-01-18 Thread Tom Lane
Volodymyr Kostyrko writes: > Maybe I'm missing something but I have found a case when planner is > unoptimal. The planner knows next to nothing about optimizing FULL JOIN, and I would not recommend holding your breath waiting for it to get better about that, because there's basically no demand f

Re: [GENERAL] Table permissions

2012-01-18 Thread A.M.
On Jan 18, 2012, at 12:25 PM, salah jubeh wrote: > Hello, > > Thanks for the info, I have already solved this by writing the following > function. Also, i think it is better than changing the schema tables directly > > Regards > It doesn't look like the procedure handles grant options (W

Re: [GENERAL] Partial index does not make query faster

2012-01-18 Thread Tom Lane
Ruben Blanco writes: > I'm trying to reduce execution time on a query using a partial index, > but Postgres doesn't make a significant improvement, even when the > partial index is 30 times smaller than the index used currently. That doesn't really matter that much. The part of the index a given

Re: [GENERAL] Table permissions

2012-01-18 Thread salah jubeh
Hello, Thanks for the info, I have already solved this by writing the following function. Also, i think it is better than changing the schema tables directly Regards   CREATE OR REPLACE FUNCTION grant_permissions  (org_tbl TEXT  , new_tbl TEXT , change_owner BOOLEAN) RETURNS VOID AS $$    

Re: [GENERAL] Full text search - How to build a filtering dictionary

2012-01-18 Thread Antonio Franzoso
Thanks for reply, there is any simplest way? I have to do just a simple map (in a similar way of synonym dictionary), set the TSL_FILTER flag (if there's a map for a token) and then pass the normalized token to my own thesaurus dictionary. I'm working on Windows and I've to write a C library to

Re: [GENERAL] On duplicate ignore

2012-01-18 Thread Atul Goel
No way you can make sure at application level. Think in sense of an uncommitted row and other session inserting at the same moment in time. Thanks, Atul Goel -Original Message- From: Gnanakumar [mailto:gna...@zoniac.com] Sent: 18 January 2012 12:59 To: Atul Goel; pgsql-general@postgres

Re: [GENERAL] self referencing table.

2012-01-18 Thread David Salisbury
On 1/18/12 9:46 AM, David Salisbury wrote: On 1/17/12 6:00 PM, Chris Travers wrote: On Tue, Jan 17, 2012 at 4:31 PM, David Salisbury wrote: I've got a table: Taxa Column | Type +- id | integer | parent_id | integer | taxonomic_rank | character v

Re: [GENERAL] self referencing table.

2012-01-18 Thread David Salisbury
On 1/17/12 6:00 PM, Chris Travers wrote: On Tue, Jan 17, 2012 at 4:31 PM, David Salisbury wrote: I've got a table: Taxa Column |Type +- id | integer | parent_id | integer

Re: [GENERAL] Table permissions

2012-01-18 Thread A.M.
On Jan 18, 2012, at 8:48 AM, salah jubeh wrote: > Hello, > > I have create a table from another table such as > > CREATE TABLE tmp_XXX AS SELECT * FROM XXX; > > > The tmp_XXX tables has no permissions assigned to it and I want to assign > it with the same owner and access privileges o

Re: [GENERAL] Full text search - How to build a filtering dictionary

2012-01-18 Thread Oleg Bartunov
Antonio, you can see contrib/unaccent dictionary, which is a filtering dictionary. I have a page about it - http://mira.sai.msu.su/~megera/wiki/unaccent Oleg On Wed, 18 Jan 2012, Antonio Franzoso wrote: Hi all, I need to build a synonym dictionary that performs a normalization of tokens

[GENERAL] Full text search - How to build a filtering dictionary

2012-01-18 Thread Antonio Franzoso
Hi all, I need to build a synonym dictionary that performs a normalization of tokens just like a filtering dictionary does. I've searched for a filtering dictionary template but I've found it. Where Can I find it? Or, if there isn't such a template, How can I build a simple filter dictionary t

Re: [GENERAL] Redirect ERROR, FATAL and other messages

2012-01-18 Thread hubert depesz lubaczewski
On Wed, Jan 18, 2012 at 03:20:05AM -0800, pittgs wrote: > with "> logfile" > Can somebody give me a hint to solve my issue? errors are written not to stdout (which is redirected with >), but to stderr. which means, that you can redirect them, as with any other program, with 2>, like: psql ... > l

Re: [GENERAL] Redirect ERROR, FATAL and other messages

2012-01-18 Thread Jerry Sievers
pittgs writes: > Hello! > > I'm executing a postgres command from a C code, the command that I introduce > is the following: > > "sudo -u pgsql psql -p 3306 -d triage_dump -c 'insert into control select > *from uuid ' > logfile" > > In the logfile, the output is introduced, but certain lines are

Re: [GENERAL] Table permessions - solved

2012-01-18 Thread salah jubeh
I found this view information_schema.table_privileges Regards   From: salah jubeh To: pgsql Sent: Wednesday, January 18, 2012 2:48 PM Subject: [GENERAL] Table permessions Hello, I have create a table from another table such as CREATE TABLE tmp_

[GENERAL] scenario with a slow query

2012-01-18 Thread Volodymyr Kostyrko
Hi all. Maybe I'm missing something but I have found a case when planner is unoptimal. # Creating table create table test_stat(id smallint, count smallint, date date); # Filling table, sorry for php $insert = $db->prepare('insert into test_stat (id, count, date) values (?, 1, to_timestamp(?

[GENERAL] Redirect ERROR, FATAL and other messages

2012-01-18 Thread pittgs
Hello! I'm executing a postgres command from a C code, the command that I introduce is the following: "sudo -u pgsql psql -p 3306 -d triage_dump -c 'insert into control select *from uuid ' > logfile" In the logfile, the output is introduced, but certain lines are not, like for example: *ERROR:

[GENERAL] Table permessions

2012-01-18 Thread salah jubeh
Hello, I have create a table from another table such as CREATE TABLE tmp_XXX AS SELECT * FROM XXX;  The  tmp_XXX  tables has no permissions assigned to it and I  want to assign it with the same owner and access privileges  of XXX  table. I had a look on pg catalog tables  http://www.postgre

Re: [GENERAL] On duplicate ignore

2012-01-18 Thread Dmitriy Igrishin
Hey Gnanakumar, 2012/1/18 Gnanakumar > > Just create a unique index on EMAIL column and handle error if it comes > > Thanks for your suggestion. Of course, I do understand that this could be > enforced/imposed at the database-level at any time. But I'm trying to find > out whether this could b

Re: [GENERAL] On duplicate ignore

2012-01-18 Thread Gnanakumar
> Just create a unique index on EMAIL column and handle error if it comes Thanks for your suggestion. Of course, I do understand that this could be enforced/imposed at the database-level at any time. But I'm trying to find out whether this could be solved at the application layer itself. Any th

[GENERAL] Partial index does not make query faster

2012-01-18 Thread Ruben Blanco
Hi, folks: I'm trying to reduce execution time on a query using a partial index, but Postgres doesn't make a significant improvement, even when the partial index is 30 times smaller than the index used currently. Query plan returns a slightly higher cost (cost=0.00..327952.12) for the partial inde

Re: [GENERAL] On duplicate ignore

2012-01-18 Thread Atul Goel
Just create a unique index on EMAIL column and handle error if it comes Thanks, Atul Goel -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Gnanakumar Sent: 18 January 2012 11:04 To: pgsql-general@postgresql.org Subject:

[GENERAL] On duplicate ignore

2012-01-18 Thread Gnanakumar
Hi, Ours is a web-based application. We're trying to implement ON DUPLICATE IGNORE for one of our application table, named EMAILLIST. After a quick Google search, I'm finding the following "easy & convenient" single SQL statement syntax to follow with: INSERT INTO EMAILLIST (EMAIL) SELEC

Re: [GENERAL] Appending a newline to a column value - in a psql cronjob

2012-01-18 Thread Jasen Betts
On 2012-01-13, Alexander Farber wrote: > Hello! > > I'm using PostgreSQL 8.4.9 on CentOS 6.2 and with bash. > > The following cronjob works well for me > (trying to send a mail to myself - for moderation): > > 6 6 * * * psql -c "select > 'http://mysite/user.php?id='