Re: [GENERAL] High Availability Cluster

2014-12-03 Thread Sameer Kumar
On Thu, Dec 4, 2014 at 12:32 PM, Tatsuo Ishii wrote: > No. Just the implementation of watchdog has been changed (more > precisely new life check mode added). In recent versions (since 3.3) > it uses UDP packet for life check of pgpool, which is pretty much > similar to heartbeat. > > ​Thanks for

Re: [GENERAL] FW: getting error while running sql on mm_activealrm table

2014-12-03 Thread John R Pierce
On 12/3/2014 9:30 PM, M Tarkeshwar Rao wrote: I have found corrupted indexes are usually a sign that something is not well with the server. It is good to check and make sure memory, CPU's and hard drives are all happy and not reporting problems. I have found overheating servers to be particula

Re: [GENERAL] FW: getting error while running sql on mm_activealrm table

2014-12-03 Thread M Tarkeshwar Rao
Hi Adrian, Thanks Adrian for you quick reply. I am looking in this that why db came into this stage. --I have found overheating servers to be particularly prone to index corruption and if indexes can get corrupt one has to worry about data becoming ---corrupt too. Is the above statement true?

Re: [GENERAL] High Availability Cluster

2014-12-03 Thread Tatsuo Ishii
> On Thu, Nov 27, 2014 at 7:26 PM, Maila Fatticcioni > wrote: > >> I was wondering if there is another way to set up a complete cluster >> that would manage in case of failure: >> >> * the relocation of the VIP (virtual ip address) >> * the relocation of the main instance of Postgresql >> > > ​Co

Re: [GENERAL] recovering from "too many failures" wal error

2014-12-03 Thread Sameer Kumar
On Mon, Dec 1, 2014 at 10:59 PM, Andy Colson wrote: > We have a postgresql 9.2 cluster setup to do continuous wal archiving. >> We were archiving to a mount point that went offline. As a result the db >> could not archive the wal files, we ended up with many many errors in >> the logs indicating

Re: [GENERAL] Synchronous Replication Timeout

2014-12-03 Thread Sameer Kumar
On Fri, Nov 28, 2014 at 10:24 AM, Teresa Bradbury wrote: > I have a replication setup with a master and a single synchronous slave. > If the slave dies (or the network goes down) I would like any transaction > on the master that requires writing to fail so I can roll it back. At the > moment, whe

Re: [GENERAL] High Availability Cluster

2014-12-03 Thread Sameer Kumar
On Thu, Nov 27, 2014 at 7:26 PM, Maila Fatticcioni wrote: > I was wondering if there is another way to set up a complete cluster > that would manage in case of failure: > > * the relocation of the VIP (virtual ip address) > * the relocation of the main instance of Postgresql > ​Consider trying p

Re: [GENERAL] Postgres 9.2 PITR testing to before DROP DATABASE ends up removing file system files

2014-12-03 Thread Adrian Klaver
On 12/03/2014 03:52 PM, Joshua Boyd wrote: I tried that when I was testing .. if I stopped at the most recent insert/update/delete previous to the drop database (with telling it to include the change) it DIDN'T include the change (I assume because the commit timestamp was slightly after the trans

Re: [GENERAL] Postgres 9.2 PITR testing to before DROP DATABASE ends up removing file system files

2014-12-03 Thread Adrian Klaver
On 12/02/2014 03:50 PM, Joshua Boyd wrote: Having continued my research, the problem I encountered is the exact same that's been recorded here: https://www.marshut.net/kstxxk/pitr-failing-to-stop-before-drop-database.html I think I answered all the questions - please let me know if I missed

Re: [GENERAL] Postgres 9.2 PITR testing to before DROP DATABASE ends up removing file system files

2014-12-03 Thread Adrian Klaver
On 12/02/2014 03:50 PM, Joshua Boyd wrote: Having continued my research, the problem I encountered is the exact same that's been recorded here: https://www.marshut.net/kstxxk/pitr-failing-to-stop-before-drop-database.html I took the backup by following the procedures as laid forth in the cont

Re: [GENERAL] INSERT to partitioned table doesn't return row count

2014-12-03 Thread David G Johnston
Kris Deugau wrote > David G Johnston wrote: >> Going from recent memory this particular behavior complaint has now come >> up >> three times in the past six months - the main complaint previously is >> that >> given an insert trigger for the partition you have to copy, not move, the >> insert to th

Re: [GENERAL] INSERT to partitioned table doesn't return row count

2014-12-03 Thread Kris Deugau
David G Johnston wrote: >> http://www.postgresql.org/docs/9.3/interactive/sql-select.html >> >> table_name >> >> The name (optionally schema-qualified) of an existing table or >> view. If ONLY is specified before the table name, only that table is >> scanned. If ONLY is not specified, the ta

Re: [GENERAL] segmentation fault postgres 9.3.5 core dump perlu related ?

2014-12-03 Thread Tom Lane
"Day, David" writes: > We are developing on and running Postgres 9.3.5 on FreeBsd 10.0-p12. > We have been experiencing a intermittent postgres core dump which > Seems primarily to be associated with the the 2 functions below. > Given the onset of this problem, we suspect it has something to

Re: [GENERAL] INSERT to partitioned table doesn't return row count

2014-12-03 Thread David G Johnston
Adrian Klaver-4 wrote > On 12/03/2014 11:19 AM, Kris Deugau wrote: >> Is it possible to return the number of rows inserted to a partitioned >> table set up as per the examples on >> http://www.postgresql.org/docs/9.1/interactive/ddl-partitioning.html, in >> the same way as if you inserted directly

Re: [GENERAL] INSERT to partitioned table doesn't return row count

2014-12-03 Thread Adrian Klaver
On 12/03/2014 11:19 AM, Kris Deugau wrote: Is it possible to return the number of rows inserted to a partitioned table set up as per the examples on http://www.postgresql.org/docs/9.1/interactive/ddl-partitioning.html, in the same way as if you inserted directly into a target table? I can sort o

Re: [GENERAL] Merge rows based on Levenshtein distance

2014-12-03 Thread Michael Nolan
Have you considered using a soundex function to sort names into similarity groups? In my experience it works fairly well with Western European names, not quite as well with names from other parts of the world. It also doesn't deal well with many nicknames (Mike instead of Michael, etc.) -- Mike

[GENERAL] INSERT to partitioned table doesn't return row count

2014-12-03 Thread Kris Deugau
Is it possible to return the number of rows inserted to a partitioned table set up as per the examples on http://www.postgresql.org/docs/9.1/interactive/ddl-partitioning.html, in the same way as if you inserted directly into a target table? I can sort of see why it returns 0, because 0 rows are ac

Re: [GENERAL] Merge rows based on Levenshtein distance

2014-12-03 Thread mongoose
Hi Mike, I was planning to do something like David suggested: I would sort the rows based on name and then I would use a window (i.e. 100 rows) to compare each individual name to the previous 100. All I want to do is create groups of similar rows based on some criteria. -- View this message i

Re: [GENERAL] Merge rows based on Levenshtein distance

2014-12-03 Thread mongoose
Thanks for the help. I will give your code a try. Btw I know how to solve this in a different language but unfortunately I am a very rookie with databases. -- View this message in context: http://postgresql.nabble.com/Merge-rows-based-on-Levenshtein-distance-tp5828841p5829145.html Sent from th

Re: [GENERAL] Merge rows based on Levenshtein distance

2014-12-03 Thread Michael Nolan
I don't think you've defined your problem very clearly. Suppose you have 1000 names in your database. Are you planning to compare each name to the other 999 names to see which is closest? What if two names are equally close to a third name but not to each other, how do you decide which is better

Re: [GENERAL] Merge rows based on Levenshtein distance

2014-12-03 Thread David G Johnston
On Wed, Dec 3, 2014 at 9:14 AM, pinker [via PostgreSQL] < ml-node+s1045698n5829111...@n5.nabble.com> wrote: > There is nice extension in postgres: fuzzystrmatch > I have > used to calculate the distance. From documetation: > > SELECT l

Re: [GENERAL] Merge rows based on Levenshtein distance

2014-12-03 Thread David G Johnston
I play with it when I get a chance but you should at least try to code something. Dave On Wed, Dec 3, 2014 at 11:08 AM, mongoose [via PostgreSQL] < ml-node+s1045698n5829132...@n5.nabble.com> wrote: > David, > > Thanks for the useful feedback. Since I am not an experienced developer it > is too

Re: [GENERAL] Merge rows based on Levenshtein distance

2014-12-03 Thread mongoose
David, Thanks for the useful feedback. Since I am not an experienced developer it is too complicated for me to come up with the queries. Besides I wonder if this is going to be efficient to do this processing on PostgreSQL. -- View this message in context: http://postgresql.nabble.com/Merge-ro

Re: [GENERAL] Mistake in documentation? ANALYZE on partitioned tables

2014-12-03 Thread Tom Lane
pinker writes: > As I have read in documentation > that "If > you are using manual VACUUM or ANALYZE commands, don't forget that you need > to run them on each partition individually. A command like: ANALYZE > measurement; will o

Re: [GENERAL] Auto vacuum not running -- Could not bind socket for statistics collector

2014-12-03 Thread Tim Schäfer
Hi, > On December 3, 2014 at 5:04 PM Tom Lane wrote: > ... > which suggests that getaddrinfo() preferentially looks in /etc/hosts > before contacting any DNS server. So perhaps that "dig" call is not > telling you the real state of affairs, and what you need to do is > see if there's a bogus ent

Re: [GENERAL] Merge rows based on Levenshtein distance

2014-12-03 Thread pinker
There is nice extension in postgres: fuzzystrmatch I have used to calculate the distance. From documetation: SELECT levenshtein_less_equal('extensive', 'exhaustive',2); You can use it then with your group by query. -- View this

Re: [GENERAL] Auto vacuum not running -- Could not bind socket for statistics collector

2014-12-03 Thread Tom Lane
=?UTF-8?Q?Tim_Sch=C3=A4fer?= writes: >> On December 2, 2014 at 4:51 PM Tom Lane wrote: >> Yes, this will break autovacuum, because it won't have any way to find out >> what it should vacuum. The cause probably is a DNS issue: "localhost" >> isn't resolving to anything sensible. "dig localhost"

[GENERAL] Mistake in documentation? ANALYZE on partitioned tables

2014-12-03 Thread pinker
Hi! As I have read in documentation that "If you are using manual VACUUM or ANALYZE commands, don't forget that you need to run them on each partition individually. A command like: ANALYZE measurement; will only process the master

Re: [GENERAL] update several columns from function returning several values

2014-12-03 Thread Rémi Cura
Thanks, waiting for the 9.5 then =) Cheers, Rémi-C 2014-12-02 18:23 GMT+01:00 Tom Lane : > =?UTF-8?Q?R=C3=A9mi_Cura?= writes: > > IF I define a function returning several values , I can't use it to > update > > mutliple columns of a table at once. > > ... > > UPDATE test_update_m_values SET (gid

Re: [GENERAL] Auto vacuum not running -- Could not bind socket for statistics collector

2014-12-03 Thread Tim Schäfer
Hi, on the netstat question: it bound the default postgres port (5432) sucessfully on both interfaces (lo and eth0) it seems: postgres@ixion41:~/data> netstat -na | grep postg unix 2 [ ACC ] STREAM LISTENING 21156728 /var/run/postgresql/.s.PGSQL.5432 postgres@ixion41:~/data> netstat -na | grep 54

Re: Fwd: [GENERAL] Problem with pg_dump and decimal mark

2014-12-03 Thread Adrian Klaver
On 12/03/2014 12:23 AM, Eric Svenson wrote: Hi Adrian, thank you for your support. Here are the informations you requested I have already done that and found something strange: On the PC where the backup was done with pg_dump, all locale settings of Postgres were English/United S

Re: [GENERAL] FW: getting error while running sql on mm_activealrm table

2014-12-03 Thread Adrian Klaver
On 12/03/2014 03:07 AM, M Tarkeshwar Rao wrote: Hi all, We are getting following error message on doing any action on the table like(Select or open from pgadmin). Please suggest. http://dba.stackexchange.com/questions/31008/pg-dump-and-error-missing-chunk-number-0-for-toast-value Though the

Re: [GENERAL] Auto vacuum not running -- Could not bind socket for statistics collector

2014-12-03 Thread Adrian Klaver
On 12/03/2014 12:36 AM, Tim Schäfer wrote: Hi, On December 2, 2014 at 4:51 PM Tom Lane wrote: =?UTF-8?Q?Tim_Sch=C3=A4fer?= writes: After starting the server with pg_ctl start, I get the following entries in the logs: 2014-12-02 15:27:36 CET LOG: could not bind socket for statistics

Fwd: [GENERAL] Problem with pg_dump and decimal mark

2014-12-03 Thread Eric Svenson
Hi Adrian, thank you for your support. Here are the informations you requested > I have already done that and found something strange: > > On the PC where the backup was done with pg_dump, all locale settings of > Postgres were English/United States. (LC_COLLATE, LC_CTYPE, LC_MONETARY, > LC_NUME

Re: [GENERAL] Postgres 9.2 PITR testing to before DROP DATABASE ends up removing file system files

2014-12-03 Thread Joshua Boyd
Having continued my research, the problem I encountered is the exact same that's been recorded here: https://www.marshut.net/kstxxk/pitr-failing-to-stop-before-drop-database.html I took the backup by following the procedures as laid forth in the continuous archiving document ( http://www.postgre

Re: [GENERAL] TRUNCATE and CREATE TABLE LIKE for foreign tables

2014-12-03 Thread Albe Laurenz
sri harsha wrote: > Is it possible to implement TRUNCATE and CREATE TABLE LIKE for a foreign > table. Is there anyway i > can write a function to implement those queries in my FDW ?? This is currently not possible, it would need an extension to the FDW API. If you can come up with a good design,

[GENERAL] TRUNCATE and CREATE TABLE LIKE for foreign tables

2014-12-03 Thread sri harsha
Hi, Is it possible to implement TRUNCATE and CREATE TABLE LIKE for a foreign table. Is there anyway i can write a function to implement those queries in my FDW ?? Thanks, Harsha

[GENERAL] FW: getting error while running sql on mm_activealrm table

2014-12-03 Thread M Tarkeshwar Rao
Hi all, We are getting following error message on doing any action on the table like(Select or open from pgadmin). Please suggest. ERROR: missing chunk number 0 for toast value 54787 in pg_toast_2619 ** Error ** ERROR: missing chunk number 0 for toast value 54787 in pg_toast_2

[GENERAL] I did some testing of GIST/GIN vs BTree indexing…

2014-12-03 Thread Guyren Howe
Obviously, database benchmarking is basically a silly idea, because every workload, every hardware configuration, every schema are different, with very different consequences. Still, I was left with wondering when one should choose a BTree vs GIST or GIN (I didn’t even try to look at SP-GIST: a

Re: [GENERAL] Is "WITH () UPDATE" Thread Safe ?

2014-12-03 Thread Albe Laurenz
David G Johnston wrote: > Albe Laurenz *EXTERN* wrote >> Paul GOERGLER wrote: >>> I have a lot of tickets, i need to take a batch of tickets and process >>> them. >>> So the process is : >>> SELECT ONLY 100 tickets >>> PROCESS ticket >>> MARK THEM AS « done » >>> >>> I’m selecting the tickets with

Re: [GENERAL] Auto vacuum not running -- Could not bind socket for statistics collector

2014-12-03 Thread Tim Schäfer
Hi, > On December 2, 2014 at 4:51 PM Tom Lane wrote: > =?UTF-8?Q?Tim_Sch=C3=A4fer?= writes: > > After starting the server with pg_ctl start, I get the following entries in > > the > > logs: > > > 2014-12-02 15:27:36 CET LOG: could not bind socket for statistics > > collector: Cannot assig