[GENERAL] PHP-Shop with PostgreSQL

2016-11-08 Thread Michelle Konzack
Good evening *, before I restart coding things myself here a/some question/s: Long time ago (6-8 years) I was searching for a simple PHP based OnlineShop Software which use PostgreSQL without breaking the head of the owner. It seems that unfortunately all this shop softwares

Re: [GENERAL] PHP-Shop with PostgreSQL

2016-11-08 Thread John DeSoi
> On Nov 8, 2016, at 8:46 AM, Michelle Konzack wrote: > > Can someone recommend me a shop system which met my requirements? Drupal with Ubercart? Probably does not qualify as "simple" but should be able to do everything you listed.

Re: [GENERAL] Fwd: Creating multiple instances of postresql on Windows environment

2016-11-08 Thread Adrian Klaver
On 11/07/2016 07:27 PM, kaustubh kelkar wrote: Hi , I am a PostgreSQL user who wants to create multiple instances of PostgreSQL database server. I am using PostgreSQL 9.4 and above. I tried to create more than 2 instances on Linux environment in which I was successful. But, for

[GENERAL] Gin indexes on intarray is fast when value in array does not exists, and slow, when value exists

2016-11-08 Thread otar shavadze
I have table with 500 000 rows, I have int[] column "my_array" in this table, this array column contains minimum 1 and maximum 5 different values. I have GIN index on my_array column: * "CREATE INDEX idx ON table_name USING GIN(my_array gin__int_ops)"* Then I use this query: "*SELECT * FROM

Re: [GENERAL] Fwd: Creating multiple instances of postresql on Windows environment

2016-11-08 Thread Howard News
On 08/11/2016 03:27, kaustubh kelkar wrote: Hi , I am a PostgreSQL user who wants to create multiple instances of PostgreSQL database server. I am using PostgreSQL 9.4 and above. I tried to create more than 2 instances on Linux environment in which I was successful. But, for windows

Re: [GENERAL] PHP-Shop with PostgreSQL

2016-11-08 Thread Joshua D. Drake
Hello, Drupal + Ubercart should service your needs. Sincerely, JD -- Command Prompt, Inc. http://the.postgres.company/ +1-503-667-4564 PostgreSQL Centered full stack support, consulting and development. Everyone appreciates your honesty, until you are

Re: [GENERAL] Must I create an index for child table if master table have one?

2016-11-08 Thread David G. Johnston
On Tue, Nov 8, 2016 at 11:08 AM, Edmundo Robles wrote: > Hi! > > i have a simple question, if the master table have an index, must i > have create the same index in a child table? > what is the best practice for indexes in table partition ? > Indexes are

[GENERAL] Must I create an index for child table if master table have one?

2016-11-08 Thread Edmundo Robles
Hi! i have a simple question, if the master table have an index, must i have create the same index in a child table? what is the best practice for indexes in table partition ?

Re: [GENERAL] Must I create an index for child table if master table have one?

2016-11-08 Thread Melvin Davidson
On Tue, Nov 8, 2016 at 1:33 PM, David G. Johnston < david.g.johns...@gmail.com> wrote: > On Tue, Nov 8, 2016 at 11:08 AM, Edmundo Robles > wrote: > >> Hi! >> >> i have a simple question, if the master table have an index, must i >> have create the same index in a child

Re: [GENERAL] Must I create an index for child table if master table have one?

2016-11-08 Thread Melvin Davidson
*To clarify, if you are talking about partitioning, then you almost certainly want to create a similar index on the child table.* *If you are referring to a Foreign Key Constraint, then it is also good idea to make that index, but not necessary.* On Tue, Nov 8, 2016 at 1:46 PM, Melvin Davidson

Re: [GENERAL] Gin indexes on intarray is fast when value in array does not exists, and slow, when value exists

2016-11-08 Thread Oleg Bartunov
On Tue, Nov 8, 2016 at 8:43 PM, otar shavadze wrote: > I have table with 500 000 rows, I have int[] column "my_array" in this > table, this array column contains minimum 1 and maximum 5 different values. > you didn't show us postgres version. > > I have GIN index on

[GENERAL] Best practices to manage custom statistics

2016-11-08 Thread Moreno Andreo
Hi, I'm checking if there's a best way to obtain stastistics based on my database tables Here's the scenario. First of all, technical details: - Postgresql 9.1, Ubuntu 12 on a 4 core, 32 GB machine with 600 GB disk migrating to Postgresql 9.5.3, Debian 8 on a 8-core, 52 GB machine with 2

Re: [GENERAL] Best practices to manage custom statistics

2016-11-08 Thread Adrian Klaver
On 11/08/2016 12:13 PM, Moreno Andreo wrote: Hi, I'm checking if there's a best way to obtain stastistics based on my database tables Here's the scenario. First of all, technical details: - Postgresql 9.1, Ubuntu 12 on a 4 core, 32 GB machine with 600 GB disk migrating to Postgresql 9.5.3,

[GENERAL] Gin indexes on intarray is fast when value in array does not exists, and slow, when value exists

2016-11-08 Thread otar shavadze
I increased rows limit from 50 to 500, because now, difference visible much better, so query is: explain analyze *SELECT * FROM table_name WHERE my_array @> '{x}'::integer[] ORDER BY id desc LIMIT 500* with GIN index: "Limit (cost=107.83..109.08 rows=500 width=905) (actual

[GENERAL] Running on Docker, AWS with Data Stored on EBS

2016-11-08 Thread Ryan Mahoney
Hi All, TL;TR: Can a new PostgreSQL process, running on a different server instance effectively resume operations by reading the same data directory location as another PostgreSQL process that is no longer running? - - - I have an application that is deployed to AWS as a docker container.

Re: [GENERAL] Running on Docker, AWS with Data Stored on EBS

2016-11-08 Thread David G. Johnston
On Tue, Nov 8, 2016 at 12:48 PM, Ryan Mahoney wrote: > Hi All, > > TL;TR: Can a new PostgreSQL process, running on a different server > instance effectively resume operations by reading the same data directory > location as another PostgreSQL process that is no longer

[GENERAL] resolution order for foreign key actions?

2016-11-08 Thread Karl Czajkowski
Hi, Is there a formal definition for the order in which constraint actions (i.e. the ON DELETE or ON UPDATE rules) are applied when there are multiple overlapping/relevant constraints? I have struggled to find an answer in the manual, but my experiments suggest that they are interpreted in the

Re: [GENERAL] resolution order for foreign key actions?

2016-11-08 Thread Adrian Klaver
On 11/08/2016 12:08 PM, Karl Czajkowski wrote: Hi, Is there a formal definition for the order in which constraint actions (i.e. the ON DELETE or ON UPDATE rules) are applied when there are multiple overlapping/relevant constraints? I have struggled to find an answer in the manual, but my

Re: [GENERAL] Gin indexes on intarray is fast when value in array does not exists, and slow, when value exists

2016-11-08 Thread Jeff Janes
On Tue, Nov 8, 2016 at 9:43 AM, otar shavadze wrote: > I have table with 500 000 rows, I have int[] column "my_array" in this > table, this array column contains minimum 1 and maximum 5 different values. > > I have GIN index on my_array column: > > * "CREATE INDEX idx ON

Re: [GENERAL] Gin indexes on intarray is fast when value in array does not exists, and slow, when value exists

2016-11-08 Thread Tom Lane
otar shavadze writes: > " -> Bitmap Index Scan on idx (cost=0.00..23.80 rows=533 > width=0) (actual time=35.054..35.054 rows=90052 loops=1)" > "Index Cond: (my_array @> '{8}'::integer[])" Seems like your problem here is that the planner has

Re: [GENERAL] which work memory parameter is used for what?

2016-11-08 Thread Andreas Joseph Krogh
På onsdag 09. november 2016 kl. 03:02:54, skrev John R Pierce < pie...@hogranch.com >: On 11/8/2016 2:34 PM, Hector Yuen wrote: > I am confused on which are the parameters for different queries. I am > trying to run VACUUM on a big table, and it is easier for me to

Re: [GENERAL] which work memory parameter is used for what?

2016-11-08 Thread John R Pierce
On 11/8/2016 2:34 PM, Hector Yuen wrote: I am confused on which are the parameters for different queries. I am trying to run VACUUM on a big table, and it is easier for me to set the work memory for the specific session instead of tuning it in postgresql.conf. I noticed that if I do: set

[GENERAL] which work memory parameter is used for what?

2016-11-08 Thread Hector Yuen
Hello, I am confused on which are the parameters for different queries. I am trying to run VACUUM on a big table, and it is easier for me to set the work memory for the specific session instead of tuning it in postgresql.conf. I noticed that if I do: set work_mem='1GB'; it doesn't help VACUUM,

Re: [GENERAL] resolution order for foreign key actions?

2016-11-08 Thread Karl Czajkowski
On Nov 08, David G. Johnston modulated: ... > ON DELETE starts with the "one" side of a one-to-many relationship​.  > When deleting the one row the question is what should be done with the > many rows which refer to it.  If ALL of the many rows agree to be > deleted then the one row in question

Re: [GENERAL] Running on Docker, AWS with Data Stored on EBS

2016-11-08 Thread Ryan Mahoney
Thanks for your prompt response. I'm so glad the use-case will work -- and sounds somewhat normative. It also looks like the PostgreSQL memory footprint is quite small... so even using the smallest type of EC2 instance is viable (assuming the utilization and data size remain small). With

Re: [GENERAL] resolution order for foreign key actions?

2016-11-08 Thread David G. Johnston
On Tue, Nov 8, 2016 at 1:20 PM, Adrian Klaver wrote: > On 11/08/2016 12:08 PM, Karl Czajkowski wrote: > >> Hi, >> >> Is there a formal definition for the order in which constraint actions >> (i.e. the ON DELETE or ON UPDATE rules) are applied when there are >> multiple

Re: [GENERAL] PHP-Shop with PostgreSQL

2016-11-08 Thread Raymond O'Donnell
On 08/11/16 18:24, Joshua D. Drake wrote: Hello, Drupal + Ubercart should service your needs. +1 to what the others said about Drupal + Ubercart: easy to set up, but very customisable too if you need to. There are a number of freely-available themes which are aimed at online shops and work

Re: [GENERAL] Running on Docker, AWS with Data Stored on EBS

2016-11-08 Thread David G. Johnston
On Tue, Nov 8, 2016 at 1:41 PM, Ryan Mahoney wrote: > I'm so glad the use-case will work -- and sounds somewhat normative. > ​The program and the data are distinct things - which is why you can upgrade from say 9.5.1 to 9.5.3 by simply updating the program. Heck, a

Re: [GENERAL] ENABLE ROW LEVEL SECURITY cause huge produce of checkpoints

2016-11-08 Thread Michael Paquier
On Wed, Nov 2, 2016 at 12:09 AM, wrote: > we tried new feature RLS - tested on postgres 9.5.3 / CentOS6. When we turn > on ENABLE RLS + FORCE RLS on normal workload cause huge produce checkpoints > (about 30x or more), our disk partition for xlog was full and log

Re: [GENERAL] Gin indexes on intarray is fast when value in array does not exists, and slow, when value exists

2016-11-08 Thread Jeff Janes
On Tue, Nov 8, 2016 at 12:27 PM, otar shavadze wrote: > > p.s. In "pg_stats" really many values (long lists in "most_common_vals", > "most_common_freqs") and in another columns > Which one columns should I show you? All? > most_common_elems. Is it empty, or is it not

Re: [GENERAL] Gin indexes on intarray is fast when value in array does not exists, and slow, when value exists

2016-11-08 Thread Tom Lane
I wrote: > Seems like your problem here is that the planner has no idea about the > selectivity of this condition --- if it did, I think it would have > made the right choice, because it would have made a much higher estimate > for the cost of the indexscan. > AFAICT, Postgres 9.5 does make a

Re: [GENERAL] Linux equivalent library for "postgres.lib" from Windows

2016-11-08 Thread Albe Laurenz
John R Pierce wrote: >> I am new to the product and in windows “postgres.lib” provides certain >> functions which we are >> using in windows for creating extensions. >> >> Now I am porting the project to Linux and there no straight library with >> this name in Linux >> binaries packages. >> >>

Re: [GENERAL] Surviving connections after internet problem

2016-11-08 Thread Albe Laurenz
Durumdara wrote: >> You can use pg_terminate_backend to kill a database session. >> >> Setting the keepalive options in postgresql.conf can make PostgreSQL >> discover dead connections more quickly. > > The server is licenced, so we can't access the conf file now. > We will report this to the

Re: [GENERAL] Surviving connections after internet problem

2016-11-08 Thread Durumdara
Dear Laurenz! 2016-11-07 16:06 GMT+01:00 Albe Laurenz : > Durumdara wrote: > > Linux server, 9.4 PG, Windows clients far-far away. > > May we must limit these parameters in clients after the starting of the > connection? > > Don't bother about the clients, just see that