Re: Row estimates for empty tables

2020-08-24 Thread Justin Pryzby
On Fri, Jul 24, 2020 at 09:14:04PM +0200, Pavel Stehule wrote: > pá 24. 7. 2020 v 16:38 odesílatel Christophe Pettus > napsal: > > Since we already special-case parent tables for partition sets, would a > > storage parameter that lets you either tell the planner "no, really, zero > > is

Re: Query plan prefers hash join when nested loop is much faster

2020-08-24 Thread David Rowley
On Sat, 22 Aug 2020 at 00:35, iulian dragos wrote: > I am trying to understand why the query planner insists on using a hash join, > and how to make it choose the better option, which in this case would be a > nested loop. > | -> Index Scan using >

Most effective and fast way to load few Tbyte of data from flat files into postgresql

2020-08-24 Thread Dirk Krautschick
Hi, what would be the fastest or most effective way to load few (5-10) TB of data from flat files into a postgresql database, including some 1TB tables and blobs? There is the copy command but there is no way for native parallelism, right? I have found pg_bulkload but haven't tested it yet. As

Re: Migration of DB2 java stored procedures to PostgreSQL

2020-08-24 Thread Tim Clarke
On 24/08/2020 18:31, Laurenz Albe wrote: > On Mon, 2020-08-24 at 16:32 +, Dirk Krautschick wrote: >> for a potential migration from DB2 on DB2/z to PostgreSQL I have to take >> care of a whole >> bunch of java stored procedures. Would that be a show stopper here or is a >> migration >>

Re: Migration of DB2 java stored procedures to PostgreSQL

2020-08-24 Thread Laurenz Albe
On Mon, 2020-08-24 at 16:32 +, Dirk Krautschick wrote: > for a potential migration from DB2 on DB2/z to PostgreSQL I have to take care > of a whole > bunch of java stored procedures. Would that be a show stopper here or is a > migration > somehow possible or is it anyway the same because

Migration of DB2 java stored procedures to PostgreSQL

2020-08-24 Thread Dirk Krautschick
Hi, for a potential migration from DB2 on DB2/z to PostgreSQL I have to take care of a whole bunch of java stored procedures. Would that be a show stopper here or is a migration somehow possible or is it anyway the same because Java = Java? Any experiences/recommendations or helpful

Re: BUG? Slave don't reconnect to the master

2020-08-24 Thread Олег Самойлов
> 21 авг. 2020 г., в 17:26, Jehan-Guillaume de Rorthais > написал(а): > > On Thu, 20 Aug 2020 15:16:10 +0300 > Based on setup per node, you can probably add > 'synchronous_commit=remote_write' in the common conf. Nope. I set 'synchronous_commit=remote_write' only for 3 and 4 node clusters.

Re: Query plan prefers hash join when nested loop is much faster

2020-08-24 Thread iulian dragos
On Mon, Aug 24, 2020 at 4:21 PM iulian dragos wrote: > Hi Michael, > > Thanks for the answer. It's an RDS instance using SSD storage and the > default `random_page_cost` set to 4.0. I don't expect a lot of repetitive > queries here, so I think caching may not be extremely useful. I wonder if >

Re: Substitute Variable in select query

2020-08-24 Thread harish supare
thanks for the reply David. In case of Colon I need to set the variable first, my requirement is my select query should prompt for the input. On Mon, 24 Aug 2020 at 10:15 PM, David G. Johnston < david.g.johns...@gmail.com> wrote: > On Monday, August 24, 2020, harish supare wrote: > >> Hi Team,

Re: Substitute Variable in select query

2020-08-24 Thread David G. Johnston
On Mon, Aug 24, 2020 at 7:21 AM harish supare wrote: > thanks for the reply David. > > In case of Colon I need to set the variable first, my requirement is my > select query should prompt for the input. > > Please don't top-post. psql does not have a feature that will prompt users during the

Re: Getting away from Oracle APEX, recommendations for PostgreSQL?

2020-08-24 Thread Diego
perl, is the most common. but you can use C, SQL, python or any other can be activate, check: https://www.postgresql.org/docs/current/xplang.html https://www.postgresql.org/docs/current/xfunc-c.html On 2020-08-22 19:32, Dirk Krautschick wrote: Hi all, if someone wants to get away from

Re: Query plan prefers hash join when nested loop is much faster

2020-08-24 Thread iulian dragos
Hi Michael, Thanks for the answer. It's an RDS instance using SSD storage and the default `random_page_cost` set to 4.0. I don't expect a lot of repetitive queries here, so I think caching may not be extremely useful. I wonder if the selectivity of the query is wrongly estimated (out of 500

Re: Substitute Variable in select query

2020-08-24 Thread David G. Johnston
On Monday, August 24, 2020, harish supare wrote: > Hi Team, > > Would like to know what the substitute/input variable available in psql. > > > Oracle we use & - select a, b , c from table where a like > > Is there an alternative in psql? > > > Colon - read the documentation, psql section, for

SSL between Primary and Seconday PostgreSQL DBs

2020-08-24 Thread Susan Joseph
I have setup a Primary and Secondary PostgreSQL DBs.  They were setup up with basic replication then I went back and modified them to use SSL.  I am just not sure if I did it correctly.  Everything is working but I want to make sure I have the settings correctly.  I am using PostgreSQL 11.2. 

Substitute Variable in select query

2020-08-24 Thread harish supare
Hi Team, Would like to know what the substitute/input variable available in psql. Oracle we use & - select a, b , c from table where a like Is there an alternative in psql? -- Best Regards Harish.