Re: Pulling initial physical replication pg_basebackup from a downstream server

2018-04-25 Thread Michael Paquier
On Wed, Apr 25, 2018 at 09:52:47AM -0500, Scott Frazer wrote: > I'm changing out a data center and I need to setup a new replicated server. > The bandwidth speeds between the new data center and the master are slower > than the speeds between the new data center and the current replica. > > Can I

RE: Postgresql database encryption

2018-04-25 Thread Ahmed, Nawaz
Hi Folks, I would like to add to the list FUJITSU Software Enterprise Postgres as well, a commercial version of FSEP offers both TDE (AES 128 / 256) and Data Masking features PremierSQL TDE MariaDB 10.1.3+ MySQL 5.7.11+ Microsoft uses TDE Oracle AdvSec uses TDE DB2 v7.2 UDB MangoDB uses

Re: Same condition in the CTE and in the subsequent JOIN using it

2018-04-25 Thread Alban Hertroys
> On 25 Apr 2018, at 17:45, Alexander Farber wrote: (…) > And here is the function source code: > > CREATE OR REPLACE FUNCTION words_stat_scores( > in_social integer, > in_sidtext > ) RETURNS TABLE ( >

Re: Same condition in the CTE and in the subsequent JOIN using it

2018-04-25 Thread Vincent Veyron
On Wed, 25 Apr 2018 17:45:39 +0200 Alexander Farber wrote: > WITH cte AS ( > SELECT > DATE_TRUNC('day', m.played) AS day, > m.mid, > EXTRACT(EPOCH FROM m.played -

Re: Same condition in the CTE and in the subsequent JOIN using it

2018-04-25 Thread Andreas Kretschmer
Am 25.04.2018 um 17:45 schrieb Alexander Farber: Thank you for any hints, I apologize if my question is too specific and difficult to answer... i haven't checked the whole query, but where-conditions from the outer query are not pushed down into the CTE-query. First the whole CTE will be

Same condition in the CTE and in the subsequent JOIN using it

2018-04-25 Thread Alexander Farber
Good evening, I have written a custom function which works, but wonder if using same condition twice looks suspicious and can be optimized. Here is calling my function, it returns average score / day and average time between moves / day: # select * from words_stat_scores(1,

Re: Using the public schema

2018-04-25 Thread Charlin Barak
Thanks Laurenz. That works. On Tue, Apr 24, 2018 at 4:00 PM, Laurenz Albe wrote: > Charlin Barak wrote: > > > We will be developing three new applications in PostgreSQL, each having > its own > > database instance running on different hosts. We will only have one >

Failed rpm package signature checks with reposync

2018-04-25 Thread Bruno Lavoie
Hello, Don't know if I should post it to hackers list, by I'll try here first. For many reasons, we're currently deploying a mirror for postgresql rpm packages. And when we run reposync (yum mirroring tool) with --gpgcheck switch some packages are removed due to failed signature check. Command

Pulling initial physical replication pg_basebackup from a downstream server

2018-04-25 Thread Scott Frazer
I'm changing out a data center and I need to setup a new replicated server. The bandwidth speeds between the new data center and the master are slower than the speeds between the new data center and the current replica. Can I get the pg_base_backup from the current replica and then tell the new

Re: Inconsistent compilation error

2018-04-25 Thread Adrian Klaver
On 04/25/2018 05:33 AM, raf wrote: Adrian Klaver wrote: On 04/18/2018 06:02 PM, r...@raf.org wrote: Hmm, wonder if there is an oops in the below: http://www.pygresql.org/contents/changelog.html Version 5.0 (2016-03-20) Changes in the DB-API 2 module (pgdb): "SQL commands are always

Re: Strange Index sizes

2018-04-25 Thread Adrian Klaver
On 04/24/2018 11:41 PM, Mohsen Bande wrote: Hi all, I have a user table with ~8M records, with different type of fields b-tree indexed. Could we see table schema and index statements? by investigating index sizes, i found two strange things: 1- all index sizes are almost the same,

Re: Inconsistent compilation error

2018-04-25 Thread raf
Adrian Klaver wrote: > On 04/18/2018 06:02 PM, r...@raf.org wrote: > > Hi, > > > > > > > But I'm getting this compilation error when it tries to load this > > function: > > > > ERROR: too many parameters specified for RAISE > > CONTEXT: compilation of PL/pgSQL function

Re: Inconsistent compilation error

2018-04-25 Thread raf
Adrian Klaver wrote: > On 04/18/2018 06:02 PM, r...@raf.org wrote: > > Hi, > > > > postgresql-9.5.12 on debian-9 > > > > I have a stored function with code that looks like: > > > > create or replace function tla_audit_delete_thing() > > returns boolean stable language plpgsql as $$ >

Re: Inconsistent compilation error

2018-04-25 Thread raf
David G. Johnston wrote: > On Wed, Apr 18, 2018 at 7:04 PM, Melvin Davidson > wrote: > > > > > Normally, literals are inside the first quotes. IE: raise notice ' > > blah_history.original_id' %', r; > > > > ​But a compiler doesn't care about human concepts like "normally"

Re: Inconsistent compilation error

2018-04-25 Thread raf
Tom Lane wrote: > r...@raf.org writes: > > I have a stored function with code that looks like: > > > raise notice '% %', 'blah_history.original_id', r; > > > But I'm getting this compilation error when it tries to load this > > function: > > > ERROR: too many parameters

答复: [ClusterLabs] 答复: Postgres PAF setup

2018-04-25 Thread 范国腾
Adrien, Is there any way to make the cluster recover if the postgres was not properly stopped, such as the lab power off or the OS reboot? Thanks -邮件原件- 发件人: Adrien Nayrat [mailto:adrien.nay...@anayrat.info] 发送时间: 2018年4月25日 15:29 收件人: Cluster Labs - All topics related to open-source

Re: [ClusterLabs] 答复: Postgres PAF setup

2018-04-25 Thread Adrien Nayrat
On 04/25/2018 02:31 AM, 范国腾 wrote: > I have meet the similar issue when the postgres is not stopped normally. > > You could run pg_controldata to check if your postgres status is > shutdown/shutdown in recovery. > > I change the /usr/lib/ocf/resource.d/heartbeat/pgsqlms to avoid this problem:

Questions on input function of TOAST enabled user defined types

2018-04-25 Thread a
The normal input function for variables with properties of {internallength!= variable, storage=plain/main}, the return type will be Datum. The definition of Datum is "unsigned __int64" which may only consist the address of pointed data. For data with variable length, the length of the data

Strange Index sizes

2018-04-25 Thread Mohsen Bande
Hi all, I have a user table with ~8M records, with different type of fields b-tree indexed. by investigating index sizes, i found two strange things: 1- all index sizes are almost the same, regardless of field type (boolean, string, bigint) 2 - all of them are much bigger that my expectation, e.g.