[GENERAL] Limiting the amount of data in a variable when logging slow queries

2017-04-21 Thread Brett Delle Grazie
Hi, We've enabled the slow query log and have a particular query that is executing an insert against a table containing a binary array column. Given the content being stored is upwards of 100MB+ this leads to very long log messages for the slow query log. Is there a way of having the slow query

Re: [GENERAL] full text search on hstore or json with materialized view?

2017-04-21 Thread George Neuner
On Thu, 20 Apr 2017 08:50:31 -0700, Rj Ewing wrote: >On Wed, Apr 19, 2017 at 9:55 PM, George Neuner wrote: > >> ... Since you are *testing* with 1M records (that >> create 44M k:v shards), I am assuming you will need to deal with much >> more than that in deployment. And if you think you need F

Re: [GENERAL] full text search on hstore or json with materialized view?

2017-04-21 Thread George Neuner
On Thu, 20 Apr 2017 07:56:18 -0700, Rj Ewing wrote: >On Wed, Apr 19, 2017 at 6:44 PM, George Neuner wrote: >> >> If you can restrict the FTS query to certain keys: >> >> SELECT id FROM mytable >> WHERE tsquery( ... ) @@ to_tsvector(v) >> AND k IN ( ... ) >> GROUP BY id >> >> [not

[GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Edson Lidorio
Hi, There was a disaster in my development note. I was able to recover the data folder. PostgreSQL 9.6.2, was installed in Centos 7. Here are the procedures I'm trying to initialize Postgresql for me to do a backup. 1- I installed PostgreSQL 9.6.2 on a VM with Centos 7. 2- I stopped the Post

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Adrian Klaver
On 04/21/2017 09:40 AM, Edson Lidorio wrote: Hi, There was a disaster in my development note. I was able to recover the data folder. PostgreSQL 9.6.2, was installed in Centos 7. Here are the procedures I'm trying to initialize Postgresql for me to do a backup. 1- I installed PostgreSQL 9.6.2 on

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Edson Lidorio
On 21-04-2017 13:48, Adrian Klaver wrote: On 04/21/2017 09:40 AM, Edson Lidorio wrote: Hi, There was a disaster in my development note. I was able to recover the data folder. PostgreSQL 9.6.2, was installed in Centos 7. Here are the procedures I'm trying to initialize Postgresql for me to do

[GENERAL] pg_basebackup ----xlog-method=stream

2017-04-21 Thread Ian Harding
TIME: 2017-04-21 01:08:38 PDT LABEL: full-20170421 STOP TIME: 2017-04-21 06:31:28 PDT so the "...already been removed" message is referring to the very first file. The files were definitely being streamed, I restarted and on the master I see this: [root@db20 ~]# ps aux | grep stream postg

Re: [GENERAL] pg_basebackup ----xlog-method=stream

2017-04-21 Thread Adrian Klaver
08:38 PDT LABEL: full-20170421 STOP TIME: 2017-04-21 06:31:28 PDT so the "...already been removed" message is referring to the very first file. The files were definitely being streamed, I restarted and on the master I see this: [root@db20 ~]# ps aux | grep stream postgres 113855 0.4

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Adrian Klaver
On 04/21/2017 10:09 AM, Edson Lidorio wrote: On 21-04-2017 13:48, Adrian Klaver wrote: On 04/21/2017 09:40 AM, Edson Lidorio wrote: Hi, There was a disaster in my development note. I was able to recover the data folder. PostgreSQL 9.6.2, was installed in Centos 7. Here are the procedures I'm

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread John R Pierce
On 4/21/2017 12:00 PM, Adrian Klaver wrote: Apr 21 04:01:48 localhost postgresql96-check-db-dir: cat: /var/lib/pgsql/9.6/data//PG_VERSION: Permissão negada So you got a permissions error when the script was trying to read PG_VERSION. The suspicious part is this: /var/lib/pgsql/9.6/data//PG_V

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Edson Lidorio
On 21-04-2017 16:00, Adrian Klaver wrote: Is that really the case? Yes, I have already given permission on this folder and it does not initialize. I'll try to make another copy in another vm. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subsc

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread John R Pierce
On 4/21/2017 1:14 PM, Edson Lidorio wrote: On 21-04-2017 16:00, Adrian Klaver wrote: Is that really the case? Yes, I have already given permission on this folder and it does not initialize. I'll try to make another copy in another vm. who owns the files IN the folder? try chown -R post

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Scott Mead
On Fri, Apr 21, 2017 at 12:40 PM, Edson Lidorio wrote: > Hi, > There was a disaster in my development note. I was able to recover the > data folder. PostgreSQL 9.6.2, was installed in Centos 7. > > Here are the procedures I'm trying to initialize Postgresql for me to do a > backup. > > 1- I insta

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Adrian Klaver
On 04/21/2017 01:14 PM, Edson Lidorio wrote: On 21-04-2017 16:00, Adrian Klaver wrote: Is that really the case? Yes, I have already given permission on this folder and it does not initialize. You do not want to initialize the directory that was taken care of when you did: 3- I renamed th

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Edson Lidorio
On 21-04-2017 17:27, Scott Mead wrote: chown *-R* postgres:postgres /var/lib/pgsql/9.6/data Chown -R postgres: postgres /var/lib/pgsql/9.6/data Sudo systemctl start postgresql-9.6 Erros: Unit postgresql-9.6.service entered failed state. Abr 21 07:50:11 localhost.localdomain systemd[1]: po

Re: [GENERAL] Large data and slow queries

2017-04-21 Thread Andrew Staller
Samuel, Short answer to your questions: (1) TimescaleDB and CitusDB are focusing on solving different problems, and (2) TimescaleDB is an Apache 2-licensed extension to run in your Postgres database, not a fork or different system. Longer answer to your first question: >From what we've read and

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Adrian Klaver
On 04/21/2017 01:36 PM, Edson Lidorio wrote: On 21-04-2017 17:27, Scott Mead wrote: chown *-R* postgres:postgres /var/lib/pgsql/9.6/data Chown -R postgres: postgres /var/lib/pgsql/9.6/data Sudo systemctl start postgresql-9.6 Is this on the first VM you showed previously or the new one yo

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Edson Lidorio
On 21-04-2017 17:43, Adrian Klaver wrote: On 04/21/2017 01:36 PM, Edson Lidorio wrote: On 21-04-2017 17:27, Scott Mead wrote: chown *-R* postgres:postgres /var/lib/pgsql/9.6/data Chown -R postgres: postgres /var/lib/pgsql/9.6/data Sudo systemctl start postgresql-9.6 Is this on the fir

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Adrian Klaver
On 04/21/2017 01:53 PM, Edson Lidorio wrote: On 21-04-2017 17:43, Adrian Klaver wrote: On 04/21/2017 01:36 PM, Edson Lidorio wrote: On 21-04-2017 17:27, Scott Mead wrote: chown *-R* postgres:postgres /var/lib/pgsql/9.6/data Chown -R postgres: postgres /var/lib/pgsql/9.6/data Sudo syste

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Edson Lidorio
On 21-04-2017 18:02, Adrian Klaver wrote: Chown -R postgres: postgres /var/lib/pgsql/9.6/data After the command, I have the errors: Apr 21 18:11:41 localhost postgresql96-check-db-dir: "/var/lib/pgsql/9.6/data/" is missing or empty. Apr 21 18:11:41 localhost postgresql96-check-db-dir: Use "

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Adrian Klaver
On 04/21/2017 02:13 PM, Edson Lidorio wrote: On 21-04-2017 18:02, Adrian Klaver wrote: Chown -R postgres: postgres /var/lib/pgsql/9.6/data After the command, I have the errors: What does the directory listing for /var/lib/pgsql/9.6/data show? Apr 21 18:11:41 localhost postgresql96-check-

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread John R Pierce
On 4/21/2017 2:13 PM, Edson Lidorio wrote: Apr 21 18:11:41 localhost postgresql96-check-db-dir: "/var/lib/pgsql/9.6/data/" is missing or empty. whats there? ls -la /var/lib/pgsql/9.6/data -- john r pierce, recycling bits in santa cruz

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Alan Hodgson
> On Fri, Apr 21, 2017 at 12:40 PM, Edson Lidorio > > wrote: > > Hi, > > There was a disaster in my development note. I was able to recover the > > data folder. PostgreSQL 9.6.2, was installed in Centos 7. > > > > Here are the procedures I'm trying to initialize Postgresql for me to do a > > bac

Re: [GENERAL] pg_basebackup ----xlog-method=stream

2017-04-21 Thread Michael Paquier
On Sat, Apr 22, 2017 at 3:02 AM, Ian Harding wrote: > Am I misunderstanding how this works? I have WAL archiving set up, so the > files are available, but I wanted them included in the backup. Please note that if you have a WAL archive available, you may not even need to have --xlog-method=strea

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Edson Lidorio
On 21-04-2017 18:13, Edson Lidorio wrote: On 21-04-2017 18:02, Adrian Klaver wrote: Chown -R postgres: postgres /var/lib/pgsql/9.6/data After the command, I have the errors: Apr 21 18:11:41 localhost postgresql96-check-db-dir: "/var/lib/pgsql/9.6/data/" is missing or empty. Apr 21 18:11:4

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread David G. Johnston
On Friday, April 21, 2017, Edson Lidorio wrote: > > 4- I gave permission in the folder date: > sudo chown postgres: postgres /var/lib/pgsql/9.6/data; > sudo chmod 700 /var/lib/pgsql/9.6/data > You might want to check and see what permissions the original package installed directory had

[GENERAL] Strange Issue between PSQL 9.3 and Label Zebra Printer?

2017-04-21 Thread Periko Support
Hi guys. I would to explain my current strange issue with our label printer Zebra ZT230 USB. Windows 8.1 x64, psqlodbc 9.5x86/x64 drivers tested. The issue is that every time we print labels that read data from the DB, the print start printing with pause on every label. Is like, select data, se

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Adrian Klaver
On 04/21/2017 04:20 PM, Edson Lidorio wrote: On 21-04-2017 18:13, Edson Lidorio wrote: What does the directory listing for /var/lib/pgsql/9.6/data show? [root@localhost data]# pwd /var/lib/pgsql/9.6/data Ls -la /var/lib/pgsql/9.6/data drwx--. 20 postgres postgres 4096 Abr 21 17:52 .

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Edson Lidorio
On 21-04-2017 20:55, Adrian Klaver wrote: On 04/21/2017 04:20 PM, Edson Lidorio wrote: On 21-04-2017 18:13, Edson Lidorio wrote: What does the directory listing for /var/lib/pgsql/9.6/data show? [root@localhost data]# pwd /var/lib/pgsql/9.6/data Ls -la /var/lib/pgsql/9.6/data drwx

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Adrian Klaver
On 04/21/2017 04:20 PM, Edson Lidorio wrote: On 21-04-2017 18:13, Edson Lidorio wrote: On 21-04-2017 18:02, Adrian Klaver wrote: Chown -R postgres: postgres /var/lib/pgsql/9.6/data After the command, I have the errors: Apr 21 18:11:41 localhost postgresql96-check-db-dir: "/var/lib/pgsql/9

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Cat
On Fri, Apr 21, 2017 at 08:20:38PM -0300, Edson Lidorio wrote: > Ls -la /var/lib/pgsql/9.6/data > > drwx--. 20 postgres postgres 4096 Abr 21 17:52 . > drwx--. 4 root root51 Abr 21 06:33 .. Ensure that the user 'postgres' has permissions to get to this dir from / up. This may

Re: [GENERAL] pg_basebackup ----xlog-method=stream

2017-04-21 Thread Ian Harding
> On Apr 21, 2017, at 3:29 PM, Michael Paquier > wrote: > >> On Sat, Apr 22, 2017 at 3:02 AM, Ian Harding wrote: >> Am I misunderstanding how this works? I have WAL archiving set up, so the >> files are available, but I wanted them included in the backup. > > Please note that if you have a