[GENERAL] postgresql-9.5.3 compilation on Solaris SPARC

2016-05-19 Thread Venkata Balaji N
Hi, "make" command is generating the following error while compiling postgresql-9.5.3 on Solaris SPARC. I tried compiling 9.2 and 9.3, works fine. This is only happening on 9.5. ../../src/port/libpgport_srv.a ../../src/common/libpgcommon_srv.a -lnsl -lrt -lsocket -lm -o postgres Undefined

Re: [GENERAL] PostgreSQL with BDR - PANIC: could not create replication identifier checkpoint

2016-05-19 Thread Martín Marqués
El 19/05/16 a las 16:15, Cameron Smith escribió: > I'd agree: most likely a file system problem. Is there any hope that this > file could be re-built? > > My current plan is to use bdr_part_by_node_names to remove the failing node > and then rebuild it from a fresh backup (and probably on a

Re: [GENERAL] Debugging a backend stuck consuming CPU

2016-05-19 Thread Tom Lane
"k...@rice.edu" writes: > The stack trace just appeared to be what I would expect while a 'DISCARD ALL' > command was being run: > #0 0x0073bc7c in MemoryContextSetParent () > #1 0x0073bde3 in MemoryContextDelete () > #2 0x0054e3a9 in

Re: [GENERAL] PostgreSQL with BDR - PANIC: could not create replication identifier checkpoint

2016-05-19 Thread Cameron Smith
I'd agree: most likely a file system problem. Is there any hope that this file could be re-built? My current plan is to use bdr_part_by_node_names to remove the failing node and then rebuild it from a fresh backup (and probably on a new server). Thank you for your help! Cameron Smith

Re: [GENERAL] Debugging a backend stuck consuming CPU

2016-05-19 Thread k...@rice.edu
On Thu, May 19, 2016 at 09:58:45AM -0400, Tom Lane wrote: > "k...@rice.edu" writes: > > I am investigating a problem with a backend that appears to be stuck > > and spinning while performing a "DISCARD ALL" command. The system is > > running an older release 9.2.2. > > You do

Re: [GENERAL] PQcancel may hang in the recv call

2016-05-19 Thread Tom Lane
"David G. Johnston" writes: > On Thu, May 19, 2016 at 3:32 PM, Tom Lane wrote: >> I do not recall anyone ever reporting something similar --- and that code >> has been like that for a long time. > ​I'd take Tom's word over mine :)​ Well, my

Re: [GENERAL] PQcancel may hang in the recv call

2016-05-19 Thread David G. Johnston
On Thu, May 19, 2016 at 3:32 PM, Tom Lane wrote: > Peter Juhasz writes: > > > Is this known? > > I do not recall anyone ever reporting something similar --- and that code > has been like that for a long time. > > ​I'd take Tom's word over mine :)​

Re: [GENERAL] PQcancel may hang in the recv call

2016-05-19 Thread Tom Lane
Peter Juhasz writes: > We've found a situation where canceling a query may cause the client to > hang, possibly indefinitely. This can happen if the network connection > fails in a specific way. > ... > However, if the network fails in a way that the connection appears to

Re: [GENERAL] PQcancel may hang in the recv call

2016-05-19 Thread David G. Johnston
On Thu, May 19, 2016 at 10:37 AM, Peter Juhasz wrote: > Hi all, > > this is somewhat involved so please bear with me. > > We've found a situation where canceling a query may cause the client to > hang, possibly indefinitely. This can happen if the network connection >

Re: [GENERAL] PostgreSQL with BDR - PANIC: could not create replication identifier checkpoint

2016-05-19 Thread Christoph Moench-Tegeder
## Cameron Smith (csm...@stereodllc.com): > t:2016-05-19 01:14:51.668 UTC d= p=144 a=PANIC: could not create replication > identifier checkpoint "pg_logical/checkpoints/8-F3923F98.ckpt.tmp": Invalid > argument > t:2016-05-19 01:14:51.671 UTC d= p=9729 a=WARNING: could not create >

Re: [GENERAL] PostgreSQL with BDR - PANIC: could not create replication identifier checkpoint

2016-05-19 Thread Alvaro Herrera
Cameron Smith wrote: > t:2016-05-19 01:14:51.668 UTC d= p=144 a=PANIC: could not create replication > identifier checkpoint "pg_logical/checkpoints/8-F3923F98.ckpt.tmp": Invalid > argument This line corresponds to the following code in BDR's 9.4.4

[GENERAL] PostgreSQL with BDR - PANIC: could not create replication identifier checkpoint

2016-05-19 Thread Cameron Smith
Hi PostgreSQL community: We have a three node postgresql BDR set up. One of our nodes went down due to a power issue. After bringing the server back online the OS reported the need to repair some files. Once this completed and we restarted the postgresql service, we noticed that it was

Re: [GENERAL] Londiste 3 pgq events_1_1 table huge

2016-05-19 Thread Saiful Muhajir
This has happened to us where we have dead or unmanaged consumer. Turns out londiste is keeping the event even if the consumer is unreachable. This is to ensure that the consumer gets what it should. To clean this up, delete the unused/dead consumer, with qadmin or manually if necessary. The

[GENERAL] PQcancel may hang in the recv call

2016-05-19 Thread Peter Juhasz
Hi all, this is somewhat involved so please bear with me. We've found a situation where canceling a query may cause the client to hang, possibly indefinitely. This can happen if the network connection fails in a specific way. The reason for this lies in the way the PQcancel function (which

Re: [GENERAL] Debugging a backend stuck consuming CPU

2016-05-19 Thread Merlin Moncure
On Thu, May 19, 2016 at 8:46 AM, k...@rice.edu wrote: > Hi PostgreSQL community, > > I am investigating a problem with a backend that appears to be stuck > and spinning while performing a "DISCARD ALL" command. The system is > running an older release 9.2.2. Are there any bugs that

Re: [GENERAL] PG wire protocol question

2016-05-19 Thread Merlin Moncure
On Wed, May 18, 2016 at 5:05 AM, Boszormenyi Zoltan wrote: > 2016-05-17 15:29 keltezéssel, Albe Laurenz írta: >> >> Boszormenyi Zoltan wrote: >>> >>> it was a long time I have read this list or written to it. >>> >>> Now, I have a question. This blog post was written about 3 years

Re: [GENERAL] Debugging a backend stuck consuming CPU

2016-05-19 Thread k...@rice.edu
On Thu, May 19, 2016 at 09:58:45AM -0400, Tom Lane wrote: > "k...@rice.edu" writes: > > I am investigating a problem with a backend that appears to be stuck > > and spinning while performing a "DISCARD ALL" command. The system is > > running an older release 9.2.2. > > You do

Re: [GENERAL] Debugging a backend stuck consuming CPU

2016-05-19 Thread Adrian Klaver
On 05/19/2016 06:46 AM, k...@rice.edu wrote: Hi PostgreSQL community, I am investigating a problem with a backend that appears to be stuck and spinning while performing a "DISCARD ALL" command. The system is running an older release 9.2.2. Are there any bugs that could be causing this behavior?

Re: [GENERAL] Debugging a backend stuck consuming CPU

2016-05-19 Thread Tom Lane
"k...@rice.edu" writes: > I am investigating a problem with a backend that appears to be stuck > and spinning while performing a "DISCARD ALL" command. The system is > running an older release 9.2.2. You do realize that the current release in that series is 9.2.17. > Are there

[GENERAL] Debugging a backend stuck consuming CPU

2016-05-19 Thread k...@rice.edu
Hi PostgreSQL community, I am investigating a problem with a backend that appears to be stuck and spinning while performing a "DISCARD ALL" command. The system is running an older release 9.2.2. Are there any bugs that could be causing this behavior? How can I tell what the process is actually

Re: [GENERAL] first_value/last_value

2016-05-19 Thread David G. Johnston
On Thu, May 19, 2016 at 7:10 AM, Alexey Bashtanov wrote: > As for the original question unfortunately the way from an extension to > postgres core is not too easy > and normally requires an extension to become popular and to be included in > postgres distribution as a contrib

Re: [GENERAL] Use of array_agg and array string on inner query

2016-05-19 Thread shankha
I got the query: SELECT c1, c2, ARRAY_TO_STRING(ARRAY_AGG((SELECT t3.c1 FROM s.t1 as t3 JOIN s.t1 as t2 ON t3.c3 = t2.c2)), ',') FROM s.t1 t1 GROUP BY c1; DROP SCHEMA s CASCADE; Thanks for all the help. Thanks Shankha Banerjee On Wed, May 18, 2016 at 2:40 PM, David G. Johnston

Re: [GENERAL] Londiste 3 pgq events_1_1 table huge

2016-05-19 Thread Rene .
Queue - Event are stored in queue tables i.e queues. Several producers can write into same queue and several consumers can read from the queue. Events are kept in queue until all the consumers have seen them. Maybe you have some inactive consumers holding a event tables. qadmin -h -p 5432 -U

Re: [GENERAL] Londiste 3 pgq events_1_1 table huge

2016-05-19 Thread Leonardo M . Ramé
El 18/05/16 a las 19:03, Rene . escribió: Hi, Check for long running Idle in transaction sessions. Idle in transaction sessions may holding events table from cleaning itself up. If there is more then days long running idle in transaction sessions, kill them, event table should be cleaned

Re: [GENERAL] first_value/last_value

2016-05-19 Thread Alexey Bashtanov
Hello Tom, I agree such functions are very useful, as they allow you to use ordinary aggregation functions such as sum/max/avg along with first/last ones (traditionally served by DISTINCT ON or LIMIT) in the same group-by node which improves performance and readability. The first/last

Re: [GENERAL] first_value/last_value

2016-05-19 Thread Matija Lesar
On 19 May 2016 at 05:04, Tom Smith wrote: > It would really save all the troubles for many people if postgresql has a > built-in first/last function along with sum/avg. > There is already a C extension and a wiki sample and implemented for > window function. > I am

Re: [GENERAL] How to view creation date and time of a relation

2016-05-19 Thread Achilleas Mantzios
On 19/05/2016 10:57, Sameer Kumar wrote: On Thu, May 19, 2016 at 3:29 PM John R Pierce > wrote: On 5/19/2016 12:18 AM, Shrikant Bhende wrote: Our application executes come scripts with the code consist of DDL which creates lot of

Re: [GENERAL] How to view creation date and time of a relation

2016-05-19 Thread Sameer Kumar
On Thu, May 19, 2016 at 3:29 PM John R Pierce wrote: > On 5/19/2016 12:18 AM, Shrikant Bhende wrote: > > > Our application executes come scripts with the code consist of DDL which > creates lot of objects in the database in various schemas,also there are > lot of

Re: [GENERAL] How to view creation date and time of a relation

2016-05-19 Thread John R Pierce
On 5/19/2016 12:18 AM, Shrikant Bhende wrote: Our application executes come scripts with the code consist of DDL which creates lot of objects in the database in various schemas,also there are lot of connections firing the same code. I am able to locate the IP from where the script is

[GENERAL] How to view creation date and time of a relation

2016-05-19 Thread Shrikant Bhende
Hi all, Our application executes come scripts with the code consist of DDL which creates lot of objects in the database in various schemas,also there are lot of connections firing the same code. I am able to locate the IP from where the script is initiated (which is causing more load on the