Re: Dealing with latency to replication slave; what to do?

2018-07-24 Thread Jeff Janes
Please don't top-post, it is not the custom on this list. On Tue, Jul 24, 2018 at 4:08 PM, Rory Falloon wrote: > On Tue, Jul 24, 2018 at 4:02 PM Andres Freund wrote: > Hi, >> >> On 2018-07-24 15:39:32 -0400, Rory Falloon wrote: >> > Looking for any tips here on how to best maintain a replicatio

Re: width_bucket issue

2018-07-24 Thread Christophe Pettus
> On Jul 24, 2018, at 13:02, Raphaël Berbain wrote: > I'd expect b1 = b2 = 2. What am I missing? The problem appears to be due to rounding during the intermediate calculations. In compute_bucket() in numeric.c: div_var(&operand_var, &bound1_var, result_var,

Re: Dealing with latency to replication slave; what to do?

2018-07-24 Thread Rory Falloon
Hi Andres, regarding your first reply, I was inferring that from the fact I saw those messages at the same time the replication stream fell behind. What other logs would be more pertinent to this situation? On Tue, Jul 24, 2018 at 4:02 PM Andres Freund wrote: > Hi, > > On 2018-07-24 15:39:32

width_bucket issue

2018-07-24 Thread Raphaël Berbain
Hi, The width_bucket function doesn't seem to work the way I'd expect: postgres=# SELECT width_bucket(4, 0, 12, 3) b1, width_bucket(4 :: NUMERIC, 0, 12, 3) b2; b1 | b2 + 2 | 1 (1 row) I'd expect b1 = b2 = 2. What am I missing? This is with 10.4 running as a docker container, if it ma

Re: Dealing with latency to replication slave; what to do?

2018-07-24 Thread Andres Freund
Hi, On 2018-07-24 15:39:32 -0400, Rory Falloon wrote: > Looking for any tips here on how to best maintain a replication slave which > is operating under some latency between networks - around 230ms. On a good > day/week, replication will keep up for a number of days, but however, when > the link i

RES: How can i install contrib modules in pg11 via source

2018-07-24 Thread Márcio Antônio Sepp
root@pg11:/pg11/postgresql-11beta2/contrib/hstore # make make: "/pg11/postgresql-11beta2/contrib/hstore/Makefile" line 16: Need an operator make: "/pg11/postgresql-11beta2/contrib/hstore/Makefile" line 19: Could not find make: "/pg11/postgresql-11beta2/contrib/hstore/Makefile" line 20: Need an ope

Re: How can i install contrib modules in pg11 via source

2018-07-24 Thread Olivier Gautherot
On Tue, Jul 24, 2018 at 3:41 PM, Márcio Antônio Sepp < mar...@zyontecnologia.com.br> wrote: > > > > If so I can tell you how I do it in Linux and you can make the > > appropriate translations to BSD. > > > > 1) cd to contrib/hstore/ > > > > 2) make > > > > 3) sudo make install > > > > 4) In psql C

Re: How can i install contrib modules in pg11 via source

2018-07-24 Thread Joshua D. Drake
On 07/24/2018 12:08 PM, Adrian Klaver wrote: On 07/24/2018 12:00 PM, Márcio Antônio Sepp wrote: Hi all, How can i install contrib modules in pg11. I’m using FreeBSD 11.2. In specific i need to install hstore for test purpose. To confirm you are building from source correct? If so I can tell

RES: How can i install contrib modules in pg11 via source

2018-07-24 Thread Márcio Antônio Sepp
> > If so I can tell you how I do it in Linux and you can make the > appropriate translations to BSD. > > 1) cd to contrib/hstore/ > > 2) make > > 3) sudo make install > > 4) In psql CREATE EXTENSION hstore; Well, I allways install via pkg and I didn't find the contrib folder (: Now, the f

Dealing with latency to replication slave; what to do?

2018-07-24 Thread Rory Falloon
Hi, Looking for any tips here on how to best maintain a replication slave which is operating under some latency between networks - around 230ms. On a good day/week, replication will keep up for a number of days, but however, when the link is under higher than average usage, keeping replication act

Re: How can i install contrib modules in pg11 via source

2018-07-24 Thread Adrian Klaver
On 07/24/2018 12:00 PM, Márcio Antônio Sepp wrote: Hi all, How can i install contrib modules in pg11. I’m using FreeBSD 11.2. In specific i need to install hstore for test purpose. To confirm you are building from source correct? If so I can tell you how I do it in Linux and you can make the

Re: logical replication snapshots

2018-07-24 Thread Dimitri Maziuk
On 07/24/2018 01:43 PM, Andres Freund wrote: > On 2018-07-24 12:22:24 -0500, Dimitri Maziuk wrote: >> On 07/24/2018 12:21 PM, Alvaro Herrera wrote: >>> >>> Are you serious about us trying to diagnose a bug with this description? >> >> What do you want to know, exactly? > > A recipe that we can fol

How can i install contrib modules in pg11 via source

2018-07-24 Thread Márcio Antônio Sepp
Hi all, How can i install contrib modules in pg11. I’m using FreeBSD 11.2. In specific i need to install hstore for test purpose. Thanks in advance. -- Att Márcio A. Sepp

Re: logical replication snapshots

2018-07-24 Thread Andres Freund
On 2018-07-24 12:22:24 -0500, Dimitri Maziuk wrote: > On 07/24/2018 12:21 PM, Alvaro Herrera wrote: > > > > Are you serious about us trying to diagnose a bug with this description? > > What do you want to know, exactly? A recipe that we can follow and reproduce the issue. Greetings, Andres Fre

Re: Speccing a remote backup server

2018-07-24 Thread Adrian Klaver
On 07/24/2018 09:10 AM, Ron wrote: Hi, v9.6 backing up v8.4 Where does the gzip run (where the database lives, or the remote server where the pg_dump runs from)?  I ask this because I need to know how beefy to make the backup server.  (It'll just store backups for a version upgrade.) pg_

Re: Connections on cluster not being logged

2018-07-24 Thread Adrian Klaver
On 07/24/2018 09:47 AM, Peter J. Holzer wrote: On 2018-07-24 06:46:18 -0700, Adrian Klaver wrote: On 07/24/2018 06:25 AM, Sandy Becker wrote: There is only one set of logs since it's a hardware cluster.  The two nodes share the underlying database storage.  Not sure why, but when the The comm

Re: logical replication snapshots

2018-07-24 Thread Dimitri Maziuk
On 07/24/2018 12:21 PM, Alvaro Herrera wrote: > > Are you serious about us trying to diagnose a bug with this description? What do you want to know, exactly? -- Dimitri Maziuk Programmer/sysadmin BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu signature.asc Description: OpenPGP digital

Re: logical replication snapshots

2018-07-24 Thread Alvaro Herrera
On 2018-Jul-24, Dimitri Maziuk wrote: > On 7/23/2018 6:51 PM, Andres Freund wrote: > > Could you describe what exactly you did into that situation? > > Created a database, few publications, as per TFM, and a few subscriptions on > another host. Went on vacation for 3 weeks. The problem host is c

Re: Connections on cluster not being logged

2018-07-24 Thread Peter J. Holzer
On 2018-07-24 06:46:18 -0700, Adrian Klaver wrote: > On 07/24/2018 06:25 AM, Sandy Becker wrote: > > There is only one set of logs since it's a hardware cluster.  The two > > nodes share the underlying database storage.  Not sure why, but when the > > The community Postgres can't do that, have two

Speccing a remote backup server

2018-07-24 Thread Ron
Hi, v9.6 backing up v8.4 Where does the gzip run (where the database lives, or the remote server where the pg_dump runs from)?  I ask this because I need to know how beefy to make the backup server.  (It'll just store backups for a version upgrade.) -- Angular momentum makes the world go 'ro

Re: logical replication snapshots

2018-07-24 Thread Dimitri Maziuk
On 7/23/2018 6:51 PM, Andres Freund wrote: What precedes that "loop"? systemctl start postgresql-10 Could you describe what exactly you did into that situation? Created a database, few publications, as per TFM, and a few subscriptions on another host. Went on vacation for 3 weeks. The pro

Order of execution for permissive RLS policies

2018-07-24 Thread Simon Brent
I've been using postgres for a while now, and have just started looking in to row level security. I have found something that I think is a bit strange, and wanted to know if anyone knows how/why it is the case. I have a table with multiple policies, each with a USING statement. When I run EXPLA

Re: Connections on cluster not being logged

2018-07-24 Thread Adrian Klaver
On 07/24/2018 06:25 AM, Sandy Becker wrote: There is only one set of logs since it's a hardware cluster.  The two nodes share the underlying database storage.  Not sure why, but when the The community Postgres can't do that, have two instances share the same data storage, at least AFAIK. So a

Re: DB Backup from WAL Slave

2018-07-24 Thread Andreas Kretschmer
On 24 July 2018 14:44:45 CEST, basti wrote: >Hello, > >we have a db master and a slave. - > >How can I do an backup with pg_dumpall from slave? Set hot_standby_feedback to on. Regards, Andreas -- 2ndQuadrant - The PostgreSQL Support Company

Re: Connections on cluster not being logged

2018-07-24 Thread Sandy Becker
There is only one set of logs since it's a hardware cluster. The two nodes share the underlying database storage. Not sure why, but when the log rolled over this morning, connections started getting logged. All is good now. Thanks for your help. On Mon, Jul 23, 2018 at 1:58 PM, Adrian Klave

DB Backup from WAL Slave

2018-07-24 Thread basti
Hello, we have a db master and a slave. master conf: wal_level = replica max_wal_senders = 5 wal_keep_segments = 100 archive_mode    = on archive_command = 'rsync -a %p -e "ssh -i /var/lib/postgresql/.ssh/id_rsa" postgres@slave:/var/lib/postgresql/9.6/wals/master/%f https://www.postgresql.org/me