Re: [GENERAL] a JOIN to a VIEW seems slow

2017-09-21 Thread Frank Millman
On Thu, Sep 21, 2017 at 3:54 PM, Merlin Moncure wrote: > Something is not adding up here. Can you EXPLAIN ANALYZE the 26 minute > query? Here it is - https://explain.depesz.com/s/cwm Frank

Re: [GENERAL] Dynamic use of RAISE with USING to generate and catch non-hardcoded custom exceptions

2017-09-21 Thread Pavel Stehule
DECLARE >> >> >> v_msg TEXT := '''SOMETHING IS WRONG'''; >> >> v_sqlstate TEXT := '''E0001'''; >> >> v1 TEXT ; >> >> >> BEGIN >> >> v1 := v_msg || ' USING errcode = ' || v_sqlstate; >> >> RAISE NOTICE '%', v1; >> >> RAISE EXCEPTION '%', v1; >> >> >> EXCEPTION >> >> WHEN SQLSTATE 'E0001'

Re: [GENERAL] Dynamic use of RAISE with USING to generate and catch non-hardcoded custom exceptions

2017-09-21 Thread Tom Lane
mike davis writes: > I'm trying to get dynamic version of the RAISE command working so > that I can use a table of custom application error messages and codes > for use by all developed plpgsql functions. This works for me: DO $$ DECLARE v_msg TEXT := 'SOMETHING IS

Re: [GENERAL] Dynamic use of RAISE with USING to generate and catch non-hardcoded custom exceptions

2017-09-21 Thread Pavel Stehule
2017-09-22 1:40 GMT+02:00 mike davis : > I’m trying to get dynamic version of the RAISE command working so that I > can use a table of custom application error messages and codes for use by > all developed plpgsql functions. In this way the customer error codes and >

Re: [GENERAL] Logical decoding client has the power to crash the server

2017-09-21 Thread Michael Paquier
On Fri, Sep 22, 2017 at 5:44 AM, Igor Neyman wrote: > I think the difference between pg_current_wal_lsn() and confirmed_flush_lsn > form pg_catalog.pg_replication_slots for specific replication slot: > > SELECT (pg_current_wal_lsn() - confirmed_flush_lsn) AS lsn_distance

[GENERAL] Dynamic use of RAISE with USING to generate and catch non-hardcoded custom exceptions

2017-09-21 Thread mike davis
I’m trying to get dynamic version of the RAISE command working so that I can use a table of custom application error messages and codes for use by all developed plpgsql functions. In this way the customer error codes and message are not hard coded into code and are defined consistently in one

Re: [GENERAL] Performance appending to an array column

2017-09-21 Thread Thomas Kellerer
Paul A Jungwirth schrieb am 21.09.2017 um 23:05: but maybe I could write my own extension to load regular files into Postgres arrays, sort of getting the best of both worlds. There is a foreign data wrapper for that: https://github.com/adunstan/file_text_array_fdw but it's pretty old and

Re: [GENERAL] Performance appending to an array column

2017-09-21 Thread Paul A Jungwirth
> It's going to suck big-time :-(. Ha ha that's what I thought, but thank you for confirming. :-) > We ended up keeping > the time series data outside the DB; I doubt the conclusion would be > different today. Interesting. That seems a little radical to me, but I'll consider it more seriously

Re: [GENERAL] Logical decoding client has the power to crash the server

2017-09-21 Thread Igor Neyman
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Michael Paquier Sent: Thursday, September 21, 2017 12:33 AM To: Meel Velliste Cc: PostgreSQL mailing lists Subject: Re:

Re: [GENERAL] Performance appending to an array column

2017-09-21 Thread Tom Lane
Paul A Jungwirth writes: > I'm considering a table structure where I'd be continuously appending > to long arrays of floats (10 million elements or more). Keeping the > data in arrays gives me much faster SELECT performance vs keeping it > in millions of rows. >

[GENERAL] Performance appending to an array column

2017-09-21 Thread Paul A Jungwirth
I'm considering a table structure where I'd be continuously appending to long arrays of floats (10 million elements or more). Keeping the data in arrays gives me much faster SELECT performance vs keeping it in millions of rows. But since these arrays keep growing, I'm wondering about the UPDATE

Re: [GENERAL] a JOIN to a VIEW seems slow

2017-09-21 Thread Merlin Moncure
On Thu, Sep 21, 2017 at 12:02 PM, Frank Millman wrote: > On Thu, Sep 21, 2017 at 3:54 PM, Merlin Moncure wrote: >> >> > On Thu, Sep 21, 2017 at 1:51 AM, Frank Millman >> > wrote: >> > >> >> I did not get any response to this, but I am still persevering,

Re: [GENERAL] a JOIN to a VIEW seems slow

2017-09-21 Thread Frank Millman
On Thu, Sep 21, 2017 at 3:54 PM, Merlin Moncure wrote: > > > On Thu, Sep 21, 2017 at 1:51 AM, Frank Millman wrote: > > > > I did not get any response to this, but I am still persevering, and feel > > that I am getting closer. Instead of waiting 26 minutes for a result, I > >

Re: [GENERAL] VM-Ware Backup of VM safe?

2017-09-21 Thread George Neuner
On Wed, 20 Sep 2017 20:24:05 +0200, "Klaus P. Pieper" wrote: >> Von: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- >> ow...@postgresql.org] Im Auftrag von George Neuner >> >> But VSS is needed only to copy VM files *while* they are in >> use. If you snapshot the

Re: [GENERAL] hard parse?

2017-09-21 Thread Tom Lane
"David G. Johnston" writes: > On Thu, Sep 21, 2017 at 5:48 AM, Peter Koukoulis > wrote: >> I have a query where a filter would always be negative, how many steps, >> out these: >> >> - parsing and syntax check >> - semantic analysis >> -

Re: [GENERAL] hard parse?

2017-09-21 Thread David G. Johnston
On Thu, Sep 21, 2017 at 5:48 AM, Peter Koukoulis wrote: > Hi > > I have a query where a filter would always be negative, how many steps, > out these: > >- parsing and syntax check >- semantic analysis >- transformation process (query rewrite based on system or >

Re: [GENERAL] a JOIN to a VIEW seems slow

2017-09-21 Thread Merlin Moncure
On Thu, Sep 21, 2017 at 1:51 AM, Frank Millman wrote: > On 2017-09-18 Frank Millman wrote: >> >> Here are the timings for running the query on identical data sets using >> Postgresql, Sql Server, and Sqlite3 - >> >> PostgreSQL - >> Method 1 - 0.28 sec >> Method 2 –

[GENERAL] hard parse?

2017-09-21 Thread Peter Koukoulis
Hi I have a query where a filter would always be negative, how many steps, out these: - parsing and syntax check - semantic analysis - transformation process (query rewrite based on system or user-defined rules) - query optimization - execution would be performed or not? Also,

[GENERAL] EDB to PST Converter

2017-09-21 Thread johncarter
EDB to PST Converter repairs corrupt or damaged Exchange EDB files and restores the mailboxes into Outlook PST file. You can easily view Mailbox data from the PST files using MS Outlook application. It supports MS Exchange Server Recovery for 2003, 2007, 2010 and 2013

[GENERAL] Convert OST to PST

2017-09-21 Thread johncarter
For the large bunch of Outlook PST files, You have to go for some OST to PST Recovery Tool. If you have no idea or still confuse which one to go for, then you may try EdbMails OST TO PST Converter . The OST to PST

Re: [GENERAL] 10 beta 4 foreign table partition check constraint broken?

2017-09-21 Thread Paul Jones
On Thu, Sep 21, 2017 at 02:59:21PM +0900, Michael Paquier wrote: /tmp/mutt-mayon-1000-26043-945be079d938129298 > On Fri, Sep 15, 2017 at 10:43 PM, Paul Jones wrote: > > Is this a bug in Postgres 10b4? Looks like neither partition ranges > > nor check constraints are honored in

Re: [GENERAL] a JOIN to a VIEW seems slow

2017-09-21 Thread Frank Millman
On 2017-09-18 Frank Millman wrote: > > Here are the timings for running the query on identical data sets using > Postgresql, Sql Server, and Sqlite3 - > > PostgreSQL - > Method 1 - 0.28 sec > Method 2 – 1607 sec, or 26 minutes > > Sql Server - > Method 1 – 0.33 sec > Method 2 –

Re: [GENERAL] 10 beta 4 foreign table partition check constraint broken?

2017-09-21 Thread Michael Paquier
On Fri, Sep 15, 2017 at 10:43 PM, Paul Jones wrote: > Is this a bug in Postgres 10b4? Looks like neither partition ranges > nor check constraints are honored in 10b4 when inserting into > partitions that are foreign tables. Here is what you are looking for in the documentation: