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 AES-256

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 ( > out_day text, >

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 - LAG(m.played) OVER > (PARTITION BY m.g

Re: Issue on public schéma with Pg_restore

2018-04-25 Thread Adrian Klaver
On 04/25/2018 11:07 AM, Thomas Poty wrote: Hello,  Here is the context : Postgres version? I have a db db1 with a schéma public on cluster C1. This schéma doesn't have any privileges on public role. I have a dump of this db. What was the dump command? On an other cluster C2, the template

Issue on public schéma with Pg_restore

2018-04-25 Thread Thomas Poty
Hello, Here is the context : I have a db db1 with a schéma public on cluster C1. This schéma doesn't have any privileges on public role. I have a dump of this db. On an other cluster C2, the template1 doesn't contain schema public. I have restored db1 on cluster C2 and i saw public role had the p

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 ma

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, '19992844041575538327

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 > schema per > > Postgres inst

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 a

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 se

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 handle

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, regardless

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 "tla_audit_d

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" - it just > cares abou

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 specifi

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

2018-04-25 Thread Jehan-Guillaume de Rorthais
You should definitely not patch the PAF source code without opening an issue on github and discuss your changes. As Adrien explained, your changes could greatly end up with an instance corruption or data loss. On Wed, 25 Apr 2018 07:45:55 + 范国腾 wrote: ... > Is there any way to make the cluste

答复: [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 c

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: