Re: [GENERAL] Theory question

2013-11-13 Thread Jeff Janes
On Tue, Nov 12, 2013 at 7:09 PM, Jayadevan maymala.jayade...@gmail.comwrote:

 Kevin Grittner-5 wrote
  The checkpointer process is responsible for creating safe points
  from which a recovery can begin; the background writer tries to
  keep some pages available for re-use so that processes running
  queries don't need to wait for page writes  in order to have free
  spots to use in shared buffers.

 Thank you. Do both of them write to the same files?


Yes, mostly. (The checkpointer also does some other housekeeping writes
beyond the ordinary data file ones)


 Is it that checkpoint
 writes only committed data whereas background writer may also write
 non-committed data if there is no space available in the buffers?


No.  The checkpointer writes all data that was dirty as of a certain time
(the start of the checkpoint) regardless of how often it was used since
dirtied, and the background writer writes data that hasn't been used
recently, regardless of when it was first dirtied.  Neither knows or cares
whether the data being written was committed, rolled back, or still in
progress.


Cheers,

Jeff


Re: [GENERAL] Theory question

2013-11-13 Thread Jayadevan
Jeff Janes wrote
 No.  The checkpointer writes all data that was dirty as of a certain time
 (the start of the checkpoint) regardless of how often it was used since
 dirtied, and the background writer writes data that hasn't been used
 recently, regardless of when it was first dirtied.  Neither knows or cares
 whether the data being written was committed, rolled back, or still in
 progress.

Thank you. So checkpointer writes all dirty data while backgrounder writes
all or some dirty data depending on some (Clocksweep?) algorithm. Correct?
From this discussion
http://postgresql.1045698.n5.nabble.com/Separating-bgwriter-and-checkpointer-td4808791.html
http://postgresql.1045698.n5.nabble.com/Separating-bgwriter-and-checkpointer-td4808791.html
  
the bgwrites has some 'other dutties'. Probably those involve marking the
buffers - when they were last used, how frequently etc?



--
View this message in context: 
http://postgresql.1045698.n5.nabble.com/Theory-question-tp5777838p5778272.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Theory question

2013-11-13 Thread Jayadevan M
On Thu, Nov 14, 2013 at 7:58 AM, Jayadevan maymala.jayade...@gmail.comwrote:

 Jeff Janes wrote
  No.  The checkpointer writes all data that was dirty as of a certain time
  (the start of the checkpoint) regardless of how often it was used since
  dirtied, and the background writer writes data that hasn't been used
  recently, regardless of when it was first dirtied.  Neither knows or
 cares
  whether the data being written was committed, rolled back, or still in
  progress.

 Thank you. So checkpointer writes all dirty data while backgrounder
 writes
 all or some dirty data depending on some (Clocksweep?) algorithm.
 Correct?
 From this discussion

 http://postgresql.1045698.n5.nabble.com/Separating-bgwriter-and-checkpointer-td4808791.html
 
 http://postgresql.1045698.n5.nabble.com/Separating-bgwriter-and-checkpointer-td4808791.html
 
 the bgwrites has some 'other dutties'. Probably those involve marking the
 buffers - when they were last used, how frequently etc?



 That should have been backgrounder writes all or some dirty or non-dirty
data ...


Re: [GENERAL] Theory question

2013-11-12 Thread Raghavendra
On Tue, Nov 12, 2013 at 6:57 AM, Jayadevan M maymala.jayade...@gmail.comwrote:

 Hi,
 What are the real differences between the bgwriter and checkpointer
 process? Both of them write data from the buffer to the data files, right?
 Is it just a matter of 'when' they write?
 Regards,
 Jayadevan


Expect some corrections
by others
on
my understanding
described below.


AFAIK, they share the load of writing dirty-buffers to disk, though they
are defined to serve different purpose. Basically, background writer
process sole function is to write dirty shared buffers to disk and evict
those pages from shared buffer pool. Whereas checkpoint, arrives to write
all dirty data pages in shared_buffers to disk only when checkpoint_timeout
or when all checkpoint_segments are filled, whichever comes first. However,
BG Writer (Writer Process) will be continuously
trickle out dirty pages to disk so that by the time checkpoint arrives
there will be left only with f
ew dirty pages, instead of
having
lots of dirty
pages

to carry out by i
tself
alone
and cause I/O loaded
.

---
Regards,
Raghavendra


Re: [GENERAL] Theory question

2013-11-12 Thread dinesh kumar
On Tue, Nov 12, 2013 at 6:57 AM, Jayadevan M maymala.jayade...@gmail.comwrote:

 Hi,
 What are the real differences between the bgwriter and checkpointer
 process? Both of them write data from the buffer to the data files, right?
 Is it just a matter of 'when' they write?


I believe, Checkpoint is one of the responsible duty of bgwriter process.
AFAIK from PG 9.2 onwards, we have another independent process called
CKPTR process which independently works. Bgwriter simply move the
shared_buffer's pages into local disk on the basis of LRU method. Where as
CKPTR process moves all the dirty buffers into local disk, and make a
transaction log sequence, at which all the data files have been updated to
reflect this information.

Best Regards,
Dinesh
manojadinesh.blogspot.com


Re: [GENERAL] Theory question

2013-11-12 Thread Kevin Grittner
Jayadevan M maymala.jayade...@gmail.com wrote:

 What are the real differences between the bgwriter and
 checkpointer process? Both of them write data from the buffer to
 the data files, right? Is it just a matter of 'when' they write?

The checkpointer process is responsible for creating safe points
from which a recovery can begin; the background writer tries to
keep some pages available for re-use so that processes running
queries don't need to wait for page writes  in order to have free
spots to use in shared buffers.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Theory question

2013-11-12 Thread Jayadevan
Kevin Grittner-5 wrote
 The checkpointer process is responsible for creating safe points
 from which a recovery can begin; the background writer tries to
 keep some pages available for re-use so that processes running
 queries don't need to wait for page writes  in order to have free
 spots to use in shared buffers.

Thank you. Do both of them write to the same files? Is it that checkpoint
writes only committed data whereas background writer may also write
non-committed data if there is no space available in the buffers?




--
View this message in context: 
http://postgresql.1045698.n5.nabble.com/Theory-question-tp5777838p5778052.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Theory question

2013-11-11 Thread Jayadevan M
Hi,
What are the real differences between the bgwriter and checkpointer
process? Both of them write data from the buffer to the data files, right?
Is it just a matter of 'when' they write?
Regards,
Jayadevan


Re: [GENERAL] Theory

2004-10-27 Thread Thomas Hallgren
Mayra,
I need info on the caracteristics of object
relational databases and their advantages as well as disdvantages in 
comparison to relational databases and OO Databases!  Please explain 
these chacteristics with respect to what Postgresql can and cannot do.
 
Thanks for your assistance. 

With respect to the IMO very helpful reply you got from Jeff Davis on 
this topic yesterday, what is it you expect from this list? We won't 
write an essay for you you know.

Regards,
Thomas Hallgren
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
   (send unregister YourEmailAddressHere to [EMAIL PROTECTED])


Re: [GENERAL] Theory!!

2004-10-26 Thread Richard Huxton
Mayra wrote:
hi,
can anyone give me some info on the caracteristics of object
relational databases and their advantages as well as disdvantages!
I'm not sure that there is any standard definition of object relational 
databases. You also don't say what you want to compare them to. Could 
you provide more detail - what precisely are you trying to find out?

--
  Richard Huxton
  Archonet Ltd
---(end of broadcast)---
TIP 8: explain analyze is your friend


Re: [GENERAL] Theory!!

2004-10-26 Thread Jeff Davis
 can anyone give me some info on the caracteristics of object
 relational databases and their advantages as well as disdvantages!

First, it's best to understand the real concepts behind relational
databases. I read two great books that taught me a lot about the theory
of RDBMSs, and why they were developed (and why RDBMSs have been so
successful).

(1) An Introduction to Database Systems, by C.J. Date -- A great book
about the theory that's very precisely written. The book leaves no
ambiguity in it's explanations, and covers a lot of ground. 

(2) Foundation for Future Database Systems, The Third Manifesto, by
Date and Darwen -- An explanation of what features should be part of a
complete RDBMS, and which should be left out, and why. Again, this
author is very good. If you've read the first book, and you're still
lured by the buzzwords in the database world, this second book will cure
you :)

Object oriented development is the way you structure your application,
and more important, the way you understand your application. You don't
need object oriented syntax to develop an object ordiented application.

PostgreSQL does, however, provide some object oriented syntax: for
example, inheritence. In some cases, using inheritence (versus a similar
solution without) can affect the way data is stored physically, which is
helpful to some (even in non-object-oriented contexts). However, the
inheritance doesn't add much to the relational model from a theory
perspective (according to Date, who gives a thorough explanation of his
reasoning).

So, in short, learn how to program object-orientedly with an RDBMS
first, then later check its feature list to see how extra object
oriented syntax might make things easier for you. Fundamentally, RDBMSs
and ORDBMSs have the same capabilities.

Regards,
Jeff Davis


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


[GENERAL] Theory

2004-10-26 Thread mayra



hi,I needinfo on the caracteristics of 
objectrelational databases and their advantages as well as disdvantages in 
comparison to relational databases and OO Databases! Please explain these 
chacteristics with respect to what Postgresql can and cannot 
do.

Thanks for your 
assistance. 


[GENERAL] Theory!!

2004-10-25 Thread Mayra



hi,

can anyone give me some info on the caracteristics 
of object relational databases and their advantages as well as 
disdvantages!


thanx in advance.