how to clean the cache from databases and operating system

2018-09-25 Thread jimmy
1、When I execute the firse sql query, like below: select * from tablename; there are some datas that will be loaded into the database cache. How to clean the data from cache. 2、When I execute second sql query like below: SELECT pg_prewarm('tablename', 'buffer') . Data will be lo

Re:Re: how to know whether query data from memory after pg_prewarm

2018-09-25 Thread jimmy
But I use windows server 2012R. pgfincore can not run on the windows. Is there some replacements in windows system? At 2018-09-19 15:44:06, "Cédric Villemain" wrote: >Le 19/09/2018 à 05:29, Thomas Munro a écrit : >> On Wed, Sep 19, 2018 at 1:35 PM jimmy wrote: >>> I use select pg_prewarm(

Re: Strange behavior of the random() function

2018-09-25 Thread Tom Lane
r.zhar...@postgrespro.ru writes: > Can anybody explain me that strange behavior? It's a squishiness in the SQL language, if you ask me. Consider this simplified query: select random() from generate_series(1, 3) order by random(); Would you expect the output of this query to appear ordered, or n

Strange behavior of the random() function

2018-09-25 Thread r . zharkov
Hello, Can anybody explain me that strange behavior? select random() as "rnd", random() as "rnd1", random() as "rnd2" from generate_series( 1, 5 ); --- 0.948556384071708 0.769186236895621 0.381390900816768 0.684488877654076 0.594888080842793 0.21123208523 0.6684085

Re: Weird procedure question

2018-09-25 Thread Christopher Browne
On Tue, Sep 25, 2018, 2:19 AM digimer wrote: > Oh, this is a very interesting approach! I didn't realize any UUIDs > could be created in a predictable way. Thank you, this might be what I need. > Yep, DCE defined about 5 different versions of UUIDs, each with somewhat differing characteristic

Re: Weird procedure question

2018-09-25 Thread digimer
On 2018-09-25 6:41 p.m., digimer wrote: On 2018-09-25 6:22 p.m., Tim Cross wrote: digimer writes: Hi all,    I've got an interesting use case that I am stuck on. It's a bit of a complicated environment, but I'll try to keep it simple.    In short; I have a history schema that has tables t

Re: Weird procedure question

2018-09-25 Thread digimer
On 2018-09-25 6:22 p.m., Tim Cross wrote: digimer writes: Hi all, I've got an interesting use case that I am stuck on. It's a bit of a complicated environment, but I'll try to keep it simple. In short; I have a history schema that has tables that match the public schema, plus one 'hist

Re: Weird procedure question

2018-09-25 Thread Tim Cross
digimer writes: > Hi all, > > I've got an interesting use case that I am stuck on. It's a bit of a > complicated environment, but I'll try to keep it simple. > > In short; I have a history schema that has tables that match the > public schema, plus one 'history_id' column that has a simpl

Re: Out of Memory

2018-09-25 Thread Tory M Blue
On Tue, Sep 25, 2018 at 2:05 PM PT wrote: > On Tue, 25 Sep 2018 11:34:19 -0700 (MST) > greigwise wrote: > > > Well, I've been unsuccessful so far on creating a standalone test. > > > > I have put some scripting in place to capture some additional > information on > > the server with the out of m

Re: Out of Memory

2018-09-25 Thread PT
On Tue, 25 Sep 2018 11:34:19 -0700 (MST) greigwise wrote: > Well, I've been unsuccessful so far on creating a standalone test. > > I have put some scripting in place to capture some additional information on > the server with the out of memory issues. I have a script which just > periodical

Re: Out of Memory

2018-09-25 Thread greigwise
Tom Lane-2 wrote > greigwise < > greigwise@ > > writes: >> If I have nearly 8 GB of memory left, why am I getting out of memory >> errors? > > Probably the postmaster is running under restrictive ulimit settings. > > regards, tom lane If I login as the user which runs pos

Re: Postgresql

2018-09-25 Thread pinker
You might find this comparision useful: https://en.wikipedia.org/wiki/Comparison_of_relational_database_management_systems -- Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html

Re: Out of Memory

2018-09-25 Thread Tom Lane
greigwise writes: > If I have nearly 8 GB of memory left, why am I getting out of memory errors? Probably the postmaster is running under restrictive ulimit settings. regards, tom lane

Re: Out of Memory

2018-09-25 Thread greigwise
Well, I've been unsuccessful so far on creating a standalone test. I have put some scripting in place to capture some additional information on the server with the out of memory issues. I have a script which just periodically dumps the output of free -m to a text file. So, the output of fr