Benchmark of using JSON to transport query results in node.js

2019-01-10 Thread Mitar
Hi! I made some benchmarks of using JSON to transport results to node.js and it seems it really makes a difference over using native or standard PostgreSQL. So the idea is that you simply wrap all results into JSON like SELECT to_json(t) FROM (... original query ...) AS t. I am guessing because no

Re: log level of "drop cascade" lists

2019-01-10 Thread Tom Lane
Willy-Bas Loos writes: > So long story short: i think it would be wise to set the log level of "drop > cascade" lists to "warning". I think that would be met with more complaints than kudos. "WARNING" is supposed to mean "there's probably something wrong here", and a report of a cascaded drop is

Re: log level of "drop cascade" lists

2019-01-10 Thread Adrian Klaver
On 1/10/19 3:28 AM, Willy-Bas Loos wrote: Hi, (this is in version 9.4) The SQL command DROP schema myschema CASCADE tells me that the full list of items that the drop cascades to is in the log, but it isn't. messages on stdout: ... drop cascades to table myschema.mytable and 143 other objects

Re: Error on Windows

2019-01-10 Thread Laurenz Albe
Igor Korot wrote: > The following code compiles and executes but returns an error: > > [quote] > Invalid byte sequence for encoding UTF8 > [/quote] > > [code] > char *values[2]; > values[0] = NULL, values[1] = NULL; > values[0] = new char[schemaName.length() + 1]; > values[1] = ne

Re: jdbc PGCopyOutputStream close() v. endCopy()

2019-01-10 Thread Rob Sargent
Ok I’ll repost there. Thanks > On Jan 10, 2019, at 6:09 AM, Dave Cramer wrote: > > Hi Rob, > > Interesting. I've not looked too much into the copy implementation. > The JDBC list or the jdbc github repo https://github.com/pgjdbc/pgjdbc might > be a better place to report this. I know Lukas Ed

Re: Not sure which part of the query needs optimization

2019-01-10 Thread Alexander Farber
Thank you for the comments, Andrew - On Mon, Jan 7, 2019 at 8:40 PM Andrew Gierth wrote: > The obvious thing to do is to keep a computed average score for each > user - either in a separate table which you update based on changes to > words_moves, which you could do with a trigger, or using a ma

Re: jdbc PGCopyOutputStream close() v. endCopy()

2019-01-10 Thread Dave Cramer
Hi Rob, Interesting. I've not looked too much into the copy implementation. The JDBC list or the jdbc github repo https://github.com/pgjdbc/pgjdbc might be a better place to report this. I know Lukas Edar monitors it as well Dave Cramer da...@postgresintl.com www.postgresintl.com On Tue, 8 Jan

Re: Pulling data from Postgres DB table for every 5 seconds.

2019-01-10 Thread Tony Shelver
I am not familiar with Aurora, but.. What something like https://github.com/subzerocloud/pg-amqp-bridge? Set up a message queue in Postgres, which calls into AMPQ (RabbitMQ) to send a message for consumption by one or more clients. This provides a function that can be called from a trigger to se

Postgres wont remove useless joins, when the UNIQUE index is partial

2019-01-10 Thread Kim Rose Carlsen
Hi remove_useless_join does not prove uniqueness if the unique index is partial, and therefore wont remove the join if no columns are referenced (see example in bottom). I have been trying to look around the source code and from what I have identified the problem seems to be that "check_index_

Lost synchronization with server: got message type"0" , length 879046704

2019-01-10 Thread Arun Menon
Hi, Some times, I am getting below error when we perform DB update in parallel with select operation. *Lost synchronization with server: got message type"0" , length 879046704* Is it a bug?. Please help to resolve. Postgre server version: 10 Libpq version is 9.2.3 Regards, Arun Menon

log level of "drop cascade" lists

2019-01-10 Thread Willy-Bas Loos
Hi, (this is in version 9.4) The SQL command DROP schema myschema CASCADE tells me that the full list of items that the drop cascades to is in the log, but it isn't. messages on stdout: ... drop cascades to table myschema.mytable and 143 other objects (see server log for list) DROP SCHEMA The lo