Re: [GENERAL] Where to download pgbench for Windows 7

2016-12-02 Thread John R Pierce
On 12/2/2016 10:37 PM, James Zhou wrote: I am new to PostgreSQL and am leaning it. I installed PostgreSQL on a Windows 7 laptop and would like to play with pgbench to generate a sample database and a bit load. As I read, pgbench should come with the server download. But after I install it, I

[GENERAL] Where to download pgbench for Windows 7

2016-12-02 Thread James Zhou
Hi, I am new to PostgreSQL and am leaning it. I installed PostgreSQL on a Windows 7 laptop and would like to play with pgbench to generate a sample database and a bit load. As I read, pgbench should come with the server download. But after I install it, I could find pgbench: [image: Inline image

Re: [GENERAL] FreeBSD 10 => 11: Dump and reload your PostgreSQL database unless you like it broken

2016-12-02 Thread Thomas Munro
On Sat, Dec 3, 2016 at 2:52 PM, Maeldron T. wrote: > Upgrading FreeBSD from 10 to 11 might break your database. It probably won’t > be corrupted but it will be useless until you dump-import it, and you might > need to do manual fixing. Sorry to hear about your arm and your

[GENERAL] Re: FreeBSD 10 => 11: Dump and reload your PostgreSQL database unless you like it broken

2016-12-02 Thread Maeldron T.
I forgot to add that when I turned off index scan, select lower() still didn’t find some existing rows. On Sat, Dec 3, 2016 at 2:52 AM, Maeldron T. wrote: > Hello, > > I’ll be as short as I can as I have broken my arm and I’m not supposed to > type. This isn’t a joke. > >

[GENERAL] FreeBSD 10 => 11: Dump and reload your PostgreSQL database unless you like it broken

2016-12-02 Thread Maeldron T.
Hello, I’ll be as short as I can as I have broken my arm and I’m not supposed to type. This isn’t a joke. However, I learned the following the hard way and I want to save you from the same. Upgrading FreeBSD from 10 to 11 might break your database. It probably won’t be corrupted but it will be

[GENERAL] Announcement: application level undo/redo for PostgreSQL

2016-12-02 Thread Kiriakos Georgiou
Greetings, I’d like to announce the availability of a PostgreSQL extension that I’ve sat on for a year – it’s time to share!  It provides undo/redo functionality useful to application developers that want to persist application objects in a PostgreSQL database.  It does some gymnastics

Re: [GENERAL] INSERT - UPDATE throughput oscillating and SSD activity after stopping the client

2016-12-02 Thread Adrian Klaver
On 12/02/2016 09:40 AM, Tom DalPozzo wrote: Hi, I've two tables, t1 and t2, both with one bigint id indexed field and one 256 char data field; t1 has always got 1 row, while t2 is increasing as explained in the following. My pqlib client countinously updates one row in t1 (every time

Re: [GENERAL] Postgresql 9.6 and Big Data

2016-12-02 Thread John R Pierce
On 12/2/2016 12:19 AM, Job wrote: We need to archive this data to generate report and analysis views. on top of what Stephen said, I'd do as much preprocessing, and preaggregation as possible to simplify and speed up those report/analysis views for instance, storing min/max/mean

Re: [GENERAL] Create DB ends with error "FATAL: Ident authentication failed for user "postgres""

2016-12-02 Thread Fabricio Pedroso Jorge
Hi, i found out where the config files were. I connected to the postgres database, executed the "SHOW data_directory" command and edited the correct "pg_hba.conf". After that, the "createdb" command worked properly. Thanks for the attention. 2016-12-02 15:29 GMT-03:00 Fabricio Pedroso Jorge

Re: [GENERAL] Moving pg_xlog

2016-12-02 Thread Jeff Janes
On Thu, Dec 1, 2016 at 6:17 PM, Michael Paquier wrote: > On Thu, Dec 01, 2016 at 05:48:51PM +0200, Achilleas Mantzios wrote: > > > > Performance is the reason. You would benefit from moving pg_xlog to a > > different controller with its own write cache or to a

Re: [GENERAL] Create DB ends with error "FATAL: Ident authentication failed for user "postgres""

2016-12-02 Thread Fabricio Pedroso Jorge
Hi, thanks for the attention and help. Actually, my installation didn't create the *".conf"* files. What i have are the *".conf.sample"*, created at *"/usr/pgsql-9.5/share"* directory, so i created a copy of the "postgresql.conf" and "pg_hba.conf" and edited as follows: *[root@vm-ora12

Re: [GENERAL] Create DB ends with error "FATAL: Ident authentication failed for user "postgres""

2016-12-02 Thread Joshua D. Drake
On 12/02/2016 09:58 AM, Fabricio Pedroso Jorge wrote: Hi all, /[root@vm-ora12 ~]# service postgresql-9.5 status postgresql-9.5 (pid 18507) is running.../ Why am i getting the above error while trying to create a new database? See here:

[GENERAL] Create DB ends with error "FATAL: Ident authentication failed for user "postgres""

2016-12-02 Thread Fabricio Pedroso Jorge
Hi all, PostgreSQL version...: 9.5.5 OS...: Oracle Linux 6.5 64 bits I am quite new in the PostgreSQL world and i'm trying to create a new db with the following sintax, using the "postgres" OS user: [postgres@vm-ora12 ~]$ createdb -h localhost -p 5432 -U

[GENERAL] INSERT - UPDATE throughput oscillating and SSD activity after stopping the client

2016-12-02 Thread Tom DalPozzo
Hi, I've two tables, t1 and t2, both with one bigint id indexed field and one 256 char data field; t1 has always got 1 row, while t2 is increasing as explained in the following. My pqlib client countinously updates one row in t1 (every time targeting a different row) and inserts a new row in

Re: [GENERAL] Full text search randomly not working for short prefixes?

2016-12-02 Thread Andreas Joseph Krogh
På fredag 02. desember 2016 kl. 16:33:12, skrev Tom Lane >: cen writes: > Something funny going on with my full text search.. and I have no idea what. The way to debug this sort of thing is generally to look at what tsquery

Re: [GENERAL] Full text search randomly not working for short prefixes?

2016-12-02 Thread cen
Thanks, that makes sense. I think I'll go with the cast approach, I don't really need stemming anywhere. Tom Lane je 02. 12. 2016 ob 16:33 napisal: cen writes: Something funny going on with my full text search.. and I have no idea what. The way to debug this sort of

Re: [GENERAL] ARRAY_LENGTH() function behavior with empty array

2016-12-02 Thread otar shavadze
Understood, and backwards compatibility also of course. Thank you On Fri, Dec 2, 2016 at 7:20 PM, Tom Lane wrote: > otar shavadze writes: > > SELECT ARRAY_LENGTH('{}'::INT[], 1) > > This returns NULL, not so "dangerous" either way, not would be more >

Re: [GENERAL] Full text search randomly not working for short prefixes?

2016-12-02 Thread Tom Lane
cen writes: > Something funny going on with my full text search.. and I have no idea what. The way to debug this sort of thing is generally to look at what tsquery you're actually getting. I get regression=# select to_tsquery(unaccent('a:*')); NOTICE: text-search query

[GENERAL] Determining replication lag

2016-12-02 Thread rakeshkumar464
I found the following SQL in stackoverflow: SELECT pg_last_xlog_receive_location() receive, pg_last_xlog_replay_location() replay, ( extract(epoch FROM now()) - extract(epoch FROM pg_last_xact_replay_timestamp()) )::int lag I get different result in primary and slave. On primary

[GENERAL] Full text search randomly not working for short prefixes?

2016-12-02 Thread cen
Something funny going on with my full text search.. and I have no idea what. I have a receiver called "Ana", this is her tsv column: '3865100':4 'acevent...@mailinator.com':3B 'ana':1A 'novak':2A This queries do not find her: SELECT * FROM receivers r WHERE r.tsv @@

Re: [GENERAL] ARRAY_LENGTH() function behavior with empty array

2016-12-02 Thread Tom Lane
otar shavadze writes: > SELECT ARRAY_LENGTH('{}'::INT[], 1) > This returns NULL, not so "dangerous" either way, not would be more > logically, if array length function will return 0 from empty array, > instead of NULL ? Well, the issue is that you're asking about dimension

Re: R: [GENERAL] CachedPlan logs until full disk

2016-12-02 Thread Tom Lane
Job writes: > Tonight this problem happened again: > CachedPlan: 1024 total in 1 blocks; 640 free (0 chunks); 384 used > CachedPlanSource: 1024 total in 1 blocks; 336 free (0 chunks); 688 used > SPI Plan: 1024 total in 1 blocks; 912 free (0 chunks); 112 used >

Re: [GENERAL] Using UPDATE ... RETURNING in a custom SQL function, which RETURNS integer

2016-12-02 Thread Adrian Klaver
On 12/02/2016 04:23 AM, Alexander Farber wrote: Thank you, Rob - On Fri, Dec 2, 2016 at 11:12 AM, Rob Sargent > wrote: > On Dec 2, 2016, at 2:52 AM, Alexander Farber >

[GENERAL] Strange activity of prepared queries

2016-12-02 Thread pinker
Hi! I have pgBadger report with strange data about prepared queries I cannot interpret by myself. If anybody could help me with interpretation, would be greatly appreciated. In first half of the day pgBadger shows there is no prepare statements and all queries are binded - how is that possible if

[GENERAL] ARRAY_LENGTH() function behavior with empty array

2016-12-02 Thread otar shavadze
SELECT ARRAY_LENGTH('{}'::INT[], 1) This returns NULL, not so "dangerous" either way, not would be more logically, if array length function will return 0 from empty array, instead of NULL ? This is just IMHO.

Re: [GENERAL] Postgresql 9.6 and Big Data

2016-12-02 Thread Stephen Frost
Job, * Job (j...@colliniconsulting.it) wrote: > we are planning to store historically data into a Postgresql 9.6 table. The question is less about what you're storing in PG and more about what you're going to be doing with that data. > We see on Postgresql limit that it could handle "big data".

Re: [GENERAL] Using UPDATE ... RETURNING in a custom SQL function, which RETURNS integer

2016-12-02 Thread Alexander Farber
Thank you, Rob - On Fri, Dec 2, 2016 at 11:12 AM, Rob Sargent wrote: > > > On Dec 2, 2016, at 2:52 AM, Alexander Farber > wrote: > > > > CREATE OR REPLACE FUNCTION words_unban_user( > > in_uid integer) > > RETURNS integer AS >

Re: [GENERAL] Using UPDATE ... RETURNING in a custom SQL function, which RETURNS integer

2016-12-02 Thread rob stone
> And finally here is the failing usage of the function : > > words=> SELECT uid FROM words_unban_user(1); > ERROR:  column "uid" does not exist > LINE 1: SELECT uid FROM words_unban_user(1); >    ^ > > Shouldn't you be doing:- SELECT words_unban_user(1); -- Sent via

[GENERAL] Using UPDATE ... RETURNING in a custom SQL function, which RETURNS integer

2016-12-02 Thread Alexander Farber
Hello, why does this fail in PostgreSQL 9.5 please? Here is my custom SQL function : CREATE OR REPLACE FUNCTION words_unban_user( in_uid integer) RETURNS integer AS $func$ UPDATE words_users SET banned_until = null, banned_reason = null WHERE uid

Re: [GENERAL] Moving pg_xlog

2016-12-02 Thread Steven Winfield
2016-12-02 17:10 GMT+13:00 Michael Paquier >: On Fri, Dec 2, 2016 at 1:04 PM, Melvin Davidson > wrote: > Well, while the location of pg_xlog is not currently configurable, on Linux >

[GENERAL] Postgresql 9.6 and Big Data

2016-12-02 Thread Job
Hello, we are planning to store historically data into a Postgresql 9.6 table. We see on Postgresql limit that it could handle "big data". In fact, limit for a single table is 32 Tb. We need to archive this data to generate report and analysis views. Anyone has experienced Postgresql 9.6 with