Re: [GENERAL] Serializable isolation -- are predicate locks still held across all databases?

2017-05-18 Thread Karl O. Pinc
On Thu, 18 May 2017 12:04:42 -0500 Kevin Grittner wrote: > On Thu, May 18, 2017 at 11:07 AM, Karl O. Pinc wrote: > > > ... Does PG > > now pay attention to database in it's SSI implementation? > > Well, it pays attention as far as the scope of each lock, but there > is only one variable to

[GENERAL] Encrypt with BouncyCastle and decrypt with pg_pub_decrypt

2017-05-18 Thread Kang, Kamal
Hi all, I am trying to encrypt a string using Bouncy Castle PGP Java apis, Base64 encode the encrypted string and then decrypt using pg_pub_decrypt but it is failing with error “Wrong Key”. Just wanted to know if this is doable or pg_pub_decrypt only works with encrypted strings from pg_pub_enc

Re: [GENERAL] Call for users to talk about table partitioning

2017-05-18 Thread Scott Marlowe
On Thu, May 18, 2017 at 3:40 PM, Scott Marlowe wrote: > I would say that the best thing to do is to run 9.6 grab pgadmin4 and do all > the examples in the doc page on partitioning. > > https://www.postgresql.org/docs/9.6/static/ddl-partitioning.html > > If that works well then the question becomes

Re: [GENERAL] Call for users to talk about table partitioning

2017-05-18 Thread Scott Marlowe
I would say that the best thing to do is to run 9.6 grab pgadmin4 and do all the examples in the doc page on partitioning. https://www.postgresql.org/docs/9.6/static/ddl-partitioning.html If that works well then the question becomes are there any esoteric cases where pgadmin4 won't quite get you

Re: [GENERAL] Call for users to talk about table partitioning

2017-05-18 Thread John R Pierce
On 5/18/2017 2:29 PM, Robert Eckhardt wrote: All the code for creating and managing partitions is part of the core Postgres code. What we are interested in looking into is what that work flow might look like and how that workflow can be supported with a GUI management tool. only thing I'd e

Re: [GENERAL] Call for users to talk about table partitioning

2017-05-18 Thread Scott Marlowe
On Thu, May 18, 2017 at 1:21 PM, Melvin Davidson wrote: > Shirley, > I am a bit confused. AFAIK, it is PostgreSQL that is responsible for table > partitioning. PgAdmin4 is just an administrative tool. > Are you saying that PgAdmin4 now can make partition tables automatically? > I think maybe she

Re: [GENERAL] Call for users to talk about table partitioning

2017-05-18 Thread Robert Eckhardt
All the code for creating and managing partitions is part of the core Postgres code. What we are interested in looking into is what that work flow might look like and how that workflow can be supported with a GUI management tool. -- Rob On Thu, May 18, 2017 at 3:21 PM, Melvin Davidson wrote: >

Re: [GENERAL] Error that shouldn't happen?

2017-05-18 Thread David G. Johnston
On Thu, May 18, 2017 at 1:46 PM, John R Pierce wrote: > On 5/18/2017 1:40 PM, Andrew Kerber wrote: > >> It appears to me you might be making this a lot more difficult than >> necessary. Why not just pre-create the required partitions daily or weekly >> or monthly? Or do you have a requirement tha

Re: [GENERAL] Error that shouldn't happen?

2017-05-18 Thread John R Pierce
On 5/18/2017 1:40 PM, Andrew Kerber wrote: It appears to me you might be making this a lot more difficult than necessary. Why not just pre-create the required partitions daily or weekly or monthly? Or do you have a requirement that a new partition only be created the first time it is required?

Re: [GENERAL] Error that shouldn't happen?

2017-05-18 Thread Pavel Stehule
2017-05-18 22:39 GMT+02:00 Rob Brucks : > Thanks. > > > > I can code an exception block to handle the table problem, and probably > one for the index collision too. > Creating partitions dynamically is pretty bad idea. You have to handle a exceptions - it enforces implicit subtransaction (some sl

Re: [GENERAL] Error that shouldn't happen?

2017-05-18 Thread David G. Johnston
On Thu, May 18, 2017 at 1:39 PM, Rob Brucks wrote: > My point is how did two concurrent threads successfully create the same > table? > ​You seem to not be understanding that "CREATE TABLE IF NOT EXISTS" can succeed without actually creating a table...​ ​David J.​ ​ ​

Re: [GENERAL] Error that shouldn't happen?

2017-05-18 Thread Andrew Kerber
It appears to me you might be making this a lot more difficult than necessary. Why not just pre-create the required partitions daily or weekly or monthly? Or do you have a requirement that a new partition only be created the first time it is required? On Thu, May 18, 2017 at 3:31 PM, David G. John

Re: [GENERAL] Error that shouldn't happen?

2017-05-18 Thread Rob Brucks
Thanks. I can code an exception block to handle the table problem, and probably one for the index collision too. My point is how did two concurrent threads successfully create the same table? That had to have happened if one of the threads hit a duplicate index error. It almost seems like Pos

Re: [GENERAL] Error that shouldn't happen?

2017-05-18 Thread David G. Johnston
On Thu, May 18, 2017 at 1:18 PM, Rob Brucks wrote: > According to this post, adding "if not exists" won't really help for race > conditions. > > > > "The bottom line is that CREATE TABLE IF NOT EXISTS doesn't pretend to > > handle concurrency issues any better than regular old CREATE TABLE, > > w

Re: [GENERAL] Error that shouldn't happen?

2017-05-18 Thread Rob Brucks
According to this post, adding "if not exists" won't really help for race conditions. "The bottom line is that CREATE TABLE IF NOT EXISTS doesn't pretend to handle concurrency issues any better than regular old CREATE TABLE, which is to say not very well." - Robert Haas https://www.postgresql.or

Re: [GENERAL] Error that shouldn't happen?

2017-05-18 Thread David G. Johnston
On Thu, May 18, 2017 at 12:48 PM, Rob Brucks wrote: > I am unable to figure out how the trigger was able to successfully create > the table, but then fail creating the index. I would have expected one > thread to "win" and create both the table and index, but other threads > would fail when crea

[GENERAL] Error that shouldn't happen?

2017-05-18 Thread Rob Brucks
Hello Everyone, I've run into a strange error on the PostgreSQL 9.5.4 DB we use for our Zabbix Server. I implemented auto-partitioning based on the design from this wiki article: https://www.zabbix.org/wiki/Docs/howto/zabbix2_postgresql_autopartitioning I implemented auto-partitioning for the

Re: [GENERAL] Call for users to talk about table partitioning

2017-05-18 Thread Melvin Davidson
Shirley, I am a bit confused. AFAIK, it is PostgreSQL that is responsible for table partitioning. PgAdmin4 is just an administrative tool. Are you saying that PgAdmin4 now can make partition tables automatically? On Thu, May 18, 2017 at 2:10 PM, Shirley Wang wrote: > Hello! > > We're a team from

Re: [GENERAL] improvements/feedback sought for a working query that looks a bit ugly and might be inefficient

2017-05-18 Thread jonathan vanasco
On May 16, 2017, at 10:20 PM, David G. Johnston wrote: > Unless you can discard the 5 and 1000 limits you are going to be stuck > computing rank three times in order to compute and filter them. Thanks a ton for your insight. I'm suck using them (5 is required for throttling, 1000 is required

Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round 4 - compilation issues on RHEL 7.2

2017-05-18 Thread Adrian Klaver
On 05/18/2017 08:49 AM, Martin Goodson wrote: On 18/05/2017 15:20, Adrian Klaver wrote: If I remove that link then I can compile. Have no idea why. Hi! OP here, and here's the feedback on what I'm getting after unlinking as suggested yesterday: I tried removing/unlinking as suggested and,

[GENERAL] Call for users to talk about table partitioning

2017-05-18 Thread Shirley Wang
Hello! We're a team from Pivotal, working with members of the Postgres community on table partitioning in pgAdmin4. We're looking to chat with some Postgres users on their expectations with table partitioning within pgAdmin4. If you have some availability next week, we'd love to set up some time

Re: [GENERAL] Serializable isolation -- are predicate locks still held across all databases?

2017-05-18 Thread Kevin Grittner
On Thu, May 18, 2017 at 11:07 AM, Karl O. Pinc wrote: > I forget all the details, but some time ago I found > that I had to increase max_pred_locs_per_transaction. > What I recall about the reason for this is that I'm > using the serializable transaction isolation, and that > I've a test database

[GENERAL] Serializable isolation -- are predicate locks still held across all databases?

2017-05-18 Thread Karl O. Pinc
Hi, I forget all the details, but some time ago I found that I had to increase max_pred_locs_per_transaction. What I recall about the reason for this is that I'm using the serializable transaction isolation, and that I've a test database which occasionally has extremely long running transactions.

Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round 4 - compilation issues on RHEL 7.2

2017-05-18 Thread Martin Goodson
On 18/05/2017 15:20, Adrian Klaver wrote: If I remove that link then I can compile. Have no idea why. Hi! OP here, and here's the feedback on what I'm getting after unlinking as suggested yesterday: I tried removing/unlinking as suggested and, just like Adrian, it worked OK for me! :) T

Re: [GENERAL] storing large files in database - performance

2017-05-18 Thread Eric Hill
Thanks, Merlin - lots of good information here, and I had not yet stumbled across pg-large-object - I will look into it. Eric -Original Message- From: Merlin Moncure [mailto:mmonc...@gmail.com] Sent: Thursday, May 18, 2017 9:49 AM To: Eric Hill Cc: Thomas Kellerer ; PostgreSQL General

Re: [GENERAL] union all taking years - PG 9.6

2017-05-18 Thread Merlin Moncure
On Mon, May 15, 2017 at 6:21 PM, Patrick B wrote: > I created a view selecting from both tables, with a UNION ALL between them. > When selecting from that view, it's really slow. I can't even run explain > analyze (it's been 1h and query did not finished yet). Have you ruled out locks? Let the se

Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round 4 - compilation issues on RHEL 7.2

2017-05-18 Thread Adrian Klaver
On 05/17/2017 02:03 PM, Tom Lane wrote: > Adrian Klaver writes: >> I could build repmgr against Postgres source and on Ubuntu install of >> EDB Postgres. The issue seems to be a combination of RH and EDB Postgres >> installation. To me it looks like ld is finding >> /lib64/libldap_r-2.4.so.2 libra

Re: [GENERAL] storing large files in database - performance

2017-05-18 Thread Eric Hill
My apologies: I said I ran "this query" but failed to include the query. It was merely this: SELECT "indexFile"."_id", "indexFile"."contents" FROM "mySchema"."indexFiles" AS "indexFile" WHERE "indexFile"."_id" = '591c609bb56d0849404e4720'; Eric -Original Message- From: Eric Hill [mailt

Re: [GENERAL] storing large files in database - performance

2017-05-18 Thread Merlin Moncure
On Thu, May 18, 2017 at 7:34 AM, Eric Hill wrote: > I would be thrilled to get 76 MB per second, and it is comforting to know > that we have that as a rough upper bound on performance. I've got work to do > to figure out how to approach that upper bound from Node.js. > > In the meantime, I've b

Re: [GENERAL] Sql server to Postgres Migration issue!

2017-05-18 Thread Adrian Klaver
On 05/18/2017 05:46 AM, Rakesh Mamidala wrote: Hi Buddies, I am trying to migrate Sql server database to PostgreSql, But i am failing with the error like MTK-03000: General Error java.lang.ClassCastException: org.postgresql.jdbc.PgConnection cannot be cast to org.postgresql.jdbc2.AbstractJdb

Re: [SPAM] [GENERAL] Sql server to Postgres Migration issue!

2017-05-18 Thread Moreno Andreo
Il 18/05/2017 14:46, Rakesh Mamidala ha scritto: java.lang.ClassCastException: org.postgresql.jdbc.PgConnection cannot be cast to org.postgresql.jdbc2.AbstractJdbc2Connection  This appea

[GENERAL] Sql server to Postgres Migration issue!

2017-05-18 Thread Rakesh Mamidala
Hi Buddies, I am trying to migrate Sql server database to PostgreSql, But i am failing with the error like MTK-03000: General Error java.lang.ClassCastException: org.postgresql.jdbc.PgConnection cannot be cast to org.postgresql.jdbc2.AbstractJdbc2Connection Please anybody can help me to resolve

Re: [GENERAL] storing large files in database - performance

2017-05-18 Thread Eric Hill
I would be thrilled to get 76 MB per second, and it is comforting to know that we have that as a rough upper bound on performance. I've got work to do to figure out how to approach that upper bound from Node.js. In the meantime, I've been looking at performance on the read side. For that, I