Replication documentation addition
Here is a new replication documentation section I want to add for 8.2:
ftp://momjian.us/pub/postgresql/mypatches/replication
Comments welcomed.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Hello Bruce,
Bruce Momjian wrote:
Here is a new replication documentation section I want to add for 8.2:
ftp://momjian.us/pub/postgresql/mypatches/replication
Comments welcomed.
Thank you, that sounds good. It's targeted to production use and
currently available solutions, which makes sense in the official manual.
You are explaining the sync vs. async categorization, but I sort of
asked myself where the explanation of single vs multi-master has gone. I
then realized, that you are talking about read-only and a "read/write
mix of servers". Then again, you are mentioning 'Multi-Master
Replication' as one type of replication solutions. I think we should be
consistent in our naming. As Single- and Multi-Master are the more
common terms among database replication experts, I'd recommend to use
them and explain what they mean instead of introducing new names.
Along with that, I'd argue that this Single- or Multi-Master is a
categorization as Sync vs Async. In that sense, the last chapter should
probably be named 'Distributed-Shared-Memory Replication' or something
like that instead of 'Multi-Master Replication', because as we know,
there are several ways of doing Multi-Master Replication (Slony-II /
Postgres-R, Distributed Shared Memory, 2PC in application code or the
above mentioned 'Query Broadcast Replication', which would fall into a
Multi-Master Replication model as well)
Also in the last chapter, instead of just saying that "PostgreSQL does
not offer this type of replication", we could probably say that
different projects are trying to come up with better replication
solutions. And there are several proprietary products based on
PostgreSQL which do solve some kinds of Multi-Master Replication. Not
that I want to advertise for any of them, but it just sounds better than
the current "no, we don't offer that".
As this documentation mainly covers production-quality solutions (which
is absolutely perfect), can we document the status of current projects
somewhere, probably in a wiki? Or at least mention them somewhere and
point to their websites? It would help to get rid of all those rumors
and uncertainties. Or are those intentional?
Just my two cents.
Regards
Markus
Ühel kenal päeval, T, 2006-10-24 kell 00:20, kirjutas Bruce Momjian:
Here is a new replication documentation section I want to add for 8.2:
ftp://momjian.us/pub/postgresql/mypatches/replication
This is how data partitioning is currently described there
Data Partitioning
-----------------Data partitioning splits the database into data sets. To achieve
replication, each data set can only be modified by one server. For
example, data can be partitioned by offices, e.g. London and Paris.
While London and Paris servers have all data records, only London can
modify London records, and Paris can only modify Paris records. Such
partitioning is usually accomplished in application code, though rules
and triggers can help enforce partitioning and keep the read-only data
sets current. Slony can also be used in such a setup. While Slony
replicates only entire tables, London and Paris can be placed in
separate tables, and inheritance can be used to access from both tables
using a single table name.
Maybe another use of partitioning should also be mentioned. That is ,
when partitioning is used to overcome limitations of single servers
(especially IO and memory, but also CPU), and only a subset of data is
stored and processed on each server.
As an example of this type of partitioning you could mention Bizgres MPP
(a PG-based commercial product, http://www.greenplum.com ), which
partitions data to use I/O and CPU of several DB servers for processing
complex OLAP queries, and Pl_Proxy
( http://pgfoundry.org/projects/plproxy/ ) which does the same for OLTP
loads.
I think the "official" term for this kind of "replication" is
Shared-Nothing Clustering.
--
----------------
Hannu Krosing
Database Architect
Skype Technologies OÜ
Akadeemia tee 21 F, Tallinn, 12618, Estonia
Skype me: callto:hkrosing
Get Skype for free: http://www.skype.com
Hannu Krosing wrote:
I think the "official" term for this kind of "replication" is
Shared-Nothing Clustering.
Well, that's just another distinction for clusters. Most of the time
it's between Shared-Disk vs. Shared-Nothing. You could also see the very
Big Irons as a Shared-Everything Cluster.
While it's certainly true, that any kind of data partitioning for
databases only make sense for Shared-Nothing Clusters, I don't think
it's a 'kind of replication'. AFAIK most database replication solutions
are built for Shared-Nothing Clusters. (With the exception of
PgCluster-II, I think).
Regards
Markus
On Tue, 2006-10-24 at 00:20 -0400, Bruce Momjian wrote:
Here is a new replication documentation section I want to add for 8.2:
ftp://momjian.us/pub/postgresql/mypatches/replication
Comments welcomed.
It's a very good start to a complete minefield of competing solutions.
My first thought would be to differentiate between clustering and
replication, which will bring out many differences.
My second thought would be to differentiate between load balancing,
multi-threading, parallel query, high availability and recoverability,
which would probably sort out the true differences in the above mix. But
that wouldn't help most people and almost everybody would find fault.
IMHO most people I've spoken to take "replication" to mean an HA
solution, so perhaps we should cover it in those terms.
--
Simon Riggs
EnterpriseDB http://www.enterprisedb.com
OK, I have updated the URL. Please let me know how you like it.
---------------------------------------------------------------------------
Hannu Krosing wrote:
?hel kenal p?eval, T, 2006-10-24 kell 00:20, kirjutas Bruce Momjian:
Here is a new replication documentation section I want to add for 8.2:
ftp://momjian.us/pub/postgresql/mypatches/replication
This is how data partitioning is currently described there
Data Partitioning
-----------------Data partitioning splits the database into data sets. To achieve
replication, each data set can only be modified by one server. For
example, data can be partitioned by offices, e.g. London and Paris.
While London and Paris servers have all data records, only London can
modify London records, and Paris can only modify Paris records. Such
partitioning is usually accomplished in application code, though rules
and triggers can help enforce partitioning and keep the read-only data
sets current. Slony can also be used in such a setup. While Slony
replicates only entire tables, London and Paris can be placed in
separate tables, and inheritance can be used to access from both tables
using a single table name.Maybe another use of partitioning should also be mentioned. That is ,
when partitioning is used to overcome limitations of single servers
(especially IO and memory, but also CPU), and only a subset of data is
stored and processed on each server.As an example of this type of partitioning you could mention Bizgres MPP
(a PG-based commercial product, http://www.greenplum.com ), which
partitions data to use I/O and CPU of several DB servers for processing
complex OLAP queries, and Pl_Proxy
( http://pgfoundry.org/projects/plproxy/ ) which does the same for OLTP
loads.I think the "official" term for this kind of "replication" is
Shared-Nothing Clustering.--
----------------
Hannu Krosing
Database Architect
Skype Technologies O?
Akadeemia tee 21 F, Tallinn, 12618, EstoniaSkype me: callto:hkrosing
Get Skype for free: http://www.skype.com
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
I have changed the text to reference "fail over" and "load balancing".
I think it makes it clearer. Let me know what you think. I am hesitant
to mention commercial PostgreSQL products in our documentation.
---------------------------------------------------------------------------
Markus Schiltknecht wrote:
Hello Bruce,
Bruce Momjian wrote:
Here is a new replication documentation section I want to add for 8.2:
ftp://momjian.us/pub/postgresql/mypatches/replication
Comments welcomed.
Thank you, that sounds good. It's targeted to production use and
currently available solutions, which makes sense in the official manual.You are explaining the sync vs. async categorization, but I sort of
asked myself where the explanation of single vs multi-master has gone. I
then realized, that you are talking about read-only and a "read/write
mix of servers". Then again, you are mentioning 'Multi-Master
Replication' as one type of replication solutions. I think we should be
consistent in our naming. As Single- and Multi-Master are the more
common terms among database replication experts, I'd recommend to use
them and explain what they mean instead of introducing new names.Along with that, I'd argue that this Single- or Multi-Master is a
categorization as Sync vs Async. In that sense, the last chapter should
probably be named 'Distributed-Shared-Memory Replication' or something
like that instead of 'Multi-Master Replication', because as we know,
there are several ways of doing Multi-Master Replication (Slony-II /
Postgres-R, Distributed Shared Memory, 2PC in application code or the
above mentioned 'Query Broadcast Replication', which would fall into a
Multi-Master Replication model as well)Also in the last chapter, instead of just saying that "PostgreSQL does
not offer this type of replication", we could probably say that
different projects are trying to come up with better replication
solutions. And there are several proprietary products based on
PostgreSQL which do solve some kinds of Multi-Master Replication. Not
that I want to advertise for any of them, but it just sounds better than
the current "no, we don't offer that".As this documentation mainly covers production-quality solutions (which
is absolutely perfect), can we document the status of current projects
somewhere, probably in a wiki? Or at least mention them somewhere and
point to their websites? It would help to get rid of all those rumors
and uncertainties. Or are those intentional?Just my two cents.
Regards
Markus
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Simon Riggs wrote:
On Tue, 2006-10-24 at 00:20 -0400, Bruce Momjian wrote:
Here is a new replication documentation section I want to add for 8.2:
ftp://momjian.us/pub/postgresql/mypatches/replication
Comments welcomed.
It's a very good start to a complete minefield of competing solutions.
My first thought would be to differentiate between clustering and
replication, which will bring out many differences.
I have gone with "fail-over" and "load balancing" in the updated text.
My second thought would be to differentiate between load balancing,
multi-threading, parallel query, high availability and recoverability,
which would probably sort out the true differences in the above mix. But
that wouldn't help most people and almost everybody would find fault.
Yep.
IMHO most people I've spoken to take "replication" to mean an HA
solution, so perhaps we should cover it in those terms.
Yes, I removed any reference to replication. It seemed too general.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
I have updated the text. Please let me know what else I should change.
I am unsure if I should be mentioning commercial PostgreSQL products in
our documentation.
---------------------------------------------------------------------------
Hannu Krosing wrote:
?hel kenal p?eval, T, 2006-10-24 kell 00:20, kirjutas Bruce Momjian:
Here is a new replication documentation section I want to add for 8.2:
ftp://momjian.us/pub/postgresql/mypatches/replication
This is how data partitioning is currently described there
Data Partitioning
-----------------Data partitioning splits the database into data sets. To achieve
replication, each data set can only be modified by one server. For
example, data can be partitioned by offices, e.g. London and Paris.
While London and Paris servers have all data records, only London can
modify London records, and Paris can only modify Paris records. Such
partitioning is usually accomplished in application code, though rules
and triggers can help enforce partitioning and keep the read-only data
sets current. Slony can also be used in such a setup. While Slony
replicates only entire tables, London and Paris can be placed in
separate tables, and inheritance can be used to access from both tables
using a single table name.Maybe another use of partitioning should also be mentioned. That is ,
when partitioning is used to overcome limitations of single servers
(especially IO and memory, but also CPU), and only a subset of data is
stored and processed on each server.As an example of this type of partitioning you could mention Bizgres MPP
(a PG-based commercial product, http://www.greenplum.com ), which
partitions data to use I/O and CPU of several DB servers for processing
complex OLAP queries, and Pl_Proxy
( http://pgfoundry.org/projects/plproxy/ ) which does the same for OLTP
loads.I think the "official" term for this kind of "replication" is
Shared-Nothing Clustering.--
----------------
Hannu Krosing
Database Architect
Skype Technologies O?
Akadeemia tee 21 F, Tallinn, 12618, EstoniaSkype me: callto:hkrosing
Get Skype for free: http://www.skype.com---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Bruce,
I have updated the text. Please let me know what else I should change.
I am unsure if I should be mentioning commercial PostgreSQL products in
our documentation.
I think you should mention the postgresql-only ones, but just briefly with a
link. Bizgres MPP, ExtenDB, uni/cluster, and Mammoth Replicator.
--
Josh Berkus
PostgreSQL @ Sun
San Francisco
Josh Berkus wrote:
Bruce,
I have updated the text. Please let me know what else I should change.
I am unsure if I should be mentioning commercial PostgreSQL products in
our documentation.I think you should mention the postgresql-only ones, but just briefly with a
link. Bizgres MPP, ExtenDB, uni/cluster, and Mammoth Replicator.
And to further this I would expect that it would be a subsection.. e.g;
a <sect2> or <sect3>. I think the open source version should absolutely
get top billing though.
Sincerely,
Joshua D. Drake
--
=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
Joshua D. Drake wrote:
Josh Berkus wrote:
Bruce,
I have updated the text. Please let me know what else I should change.
I am unsure if I should be mentioning commercial PostgreSQL products in
our documentation.I think you should mention the postgresql-only ones, but just briefly with a
link. Bizgres MPP, ExtenDB, uni/cluster, and Mammoth Replicator.And to further this I would expect that it would be a subsection.. e.g;
a <sect2> or <sect3>. I think the open source version should absolutely
get top billing though.
I am not inclined to add commercial offerings. If people wanted
commercial database offerings, they can get them from companies that
advertize. People are coming to PostgreSQL for open source solutions,
and I think mentioning commercial ones doesn't make sense.
If we are to add them, I need to hear that from people who haven't
worked in PostgreSQL commerical replication companies.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
On Oct 24, 2006, at 8:48 PM, Bruce Momjian wrote:
Joshua D. Drake wrote:
Josh Berkus wrote:
Bruce,
I have updated the text. Please let me know what else I should
change.
I am unsure if I should be mentioning commercial PostgreSQL
products in
our documentation.I think you should mention the postgresql-only ones, but just
briefly with a
link. Bizgres MPP, ExtenDB, uni/cluster, and Mammoth Replicator.And to further this I would expect that it would be a subsection..
e.g;
a <sect2> or <sect3>. I think the open source version should
absolutely
get top billing though.I am not inclined to add commercial offerings. If people wanted
commercial database offerings, they can get them from companies that
advertize. People are coming to PostgreSQL for open source solutions,
and I think mentioning commercial ones doesn't make sense.If we are to add them, I need to hear that from people who haven't
worked in PostgreSQL commerical replication companies.
I'm not coming to PostgreSQL for open source solutions. I'm coming
to PostgreSQL for _good_ solutions.
I want to see what solutions might be available for a problem I have.
I certainly want to know whether they're freely available, commercial
or some flavour of open source, but I'd like to know about all of them.
A big part of the value of Postgresql is the applications and extensions
that support it. Hiding the existence of some subset of those just
because of the way they're licensed is both underselling postgresql
and doing something of a disservice to the user of the document.
Cheers,
Steve
Steve Atkins wrote:
If we are to add them, I need to hear that from people who haven't
worked in PostgreSQL commerical replication companies.I'm not coming to PostgreSQL for open source solutions. I'm coming
to PostgreSQL for _good_ solutions.I want to see what solutions might be available for a problem I have.
I certainly want to know whether they're freely available, commercial
or some flavour of open source, but I'd like to know about all of them.A big part of the value of Postgresql is the applications and extensions
that support it. Hiding the existence of some subset of those just
because of the way they're licensed is both underselling postgresql
and doing something of a disservice to the user of the document.
OK, does that mean we mention EnterpriseDB in the section about Oracle
functions? Why not mention MS SQL if they have a better solution? I
just don't see where that line can clearly be drawn on what to include.
Do we mention Netiza, which is loosely based on PostgreSQL? It just
seems very arbitrary to include commercial software. If someone wants
to put in on a wiki, I think that would be fine because that doesn't
seems as official.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
On Oct 24, 2006, at 9:20 PM, Bruce Momjian wrote:
Steve Atkins wrote:
If we are to add them, I need to hear that from people who haven't
worked in PostgreSQL commerical replication companies.I'm not coming to PostgreSQL for open source solutions. I'm coming
to PostgreSQL for _good_ solutions.I want to see what solutions might be available for a problem I have.
I certainly want to know whether they're freely available, commercial
or some flavour of open source, but I'd like to know about all of
them.A big part of the value of Postgresql is the applications and
extensions
that support it. Hiding the existence of some subset of those just
because of the way they're licensed is both underselling postgresql
and doing something of a disservice to the user of the document.OK, does that mean we mention EnterpriseDB in the section about Oracle
functions? Why not mention MS SQL if they have a better solution? I
just don't see where that line can clearly be drawn on what to
include.
Do we mention Netiza, which is loosely based on PostgreSQL? It just
seems very arbitrary to include commercial software. If someone wants
to put in on a wiki, I think that would be fine because that doesn't
seems as official.
Good question. The line needs to be drawn somewhere. It's basically
your judgement, tempered by other peoples feedback, though. If it
were me, I'd ask myself "Would I mention this product if it were open
source? Would mentioning it help people using the document?".
Cheers,
Steve
Hi,
I also wrote Bruce about that.
It happens that, if you 'freely advertise' commercial solutions (rather
than they doing so by other vehicles) you will always happen to be an
'updater' to the docs if they change their product lines, if they change
their business model, if and if.
If you cite a commercial solution, as a fair game you should cite *all*
of them. If one enterprise has the right to be listed in the
documentation, all of them might, as you will never be favouring one of
them.
That's the main motivation to write this. Moreover, if there are also
commercial solutions for high-end installs and they are cited as
providers to those solutions, it (to a point) disencourages those of
gathering themselves and writing open source extensions to PostgreSQL.
As Bruce stated, then should the documentation contemplate
EnterpriseDB's Oracle functions? Should PostgreSQL also come with it?
Wouldn't it be painful to make, say, another description for an
alternate product other than EnterpriseDB if it arises?
If people (who read the documentation) professionally work with
PostgreSQL, they may already have been briefed by those commercial
offerings in some way.
I think only the source and its tightly coupled (read: can compile along
with, free as PostgreSQL) components should be packaged into the tarball.
However, I find Bruce's unofficial wiki idea a good one for comparisons.
Regards,
Cesar
Steve Atkins wrote:
Show quoted text
On Oct 24, 2006, at 9:20 PM, Bruce Momjian wrote:
Steve Atkins wrote:
If we are to add them, I need to hear that from people who haven't
worked in PostgreSQL commerical replication companies.I'm not coming to PostgreSQL for open source solutions. I'm coming
to PostgreSQL for _good_ solutions.I want to see what solutions might be available for a problem I have.
I certainly want to know whether they're freely available, commercial
or some flavour of open source, but I'd like to know about all of them.A big part of the value of Postgresql is the applications and
extensions
that support it. Hiding the existence of some subset of those just
because of the way they're licensed is both underselling postgresql
and doing something of a disservice to the user of the document.OK, does that mean we mention EnterpriseDB in the section about Oracle
functions? Why not mention MS SQL if they have a better solution? I
just don't see where that line can clearly be drawn on what to include.
Do we mention Netiza, which is loosely based on PostgreSQL? It just
seems very arbitrary to include commercial software. If someone wants
to put in on a wiki, I think that would be fine because that doesn't
seems as official.Good question. The line needs to be drawn somewhere. It's basically
your judgement, tempered by other peoples feedback, though. If it
were me, I'd ask myself "Would I mention this product if it were open
source? Would mentioning it help people using the document?".Cheers,
Steve---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
Hi,
Bruce Momjian wrote:
I have updated the text. Please let me know what else I should change.
I am unsure if I should be mentioning commercial PostgreSQL products in
our documentation.
I support your POV and vote for not including any pointers to commercial
extensions in the official documentation. If at all, they should go to
'external-projects.sgml', where PostGIS, PgAdmin and other projects are
mentioned.
I can't really get excited about the exclusion of the term
'replication', because it's what most people are looking for. It's a
well known term. Sorry if it sounded that way, but I've not meant to
avoid that term.
The newly created terms 'Query Broadcast Load Balancing' or even worse
'Multi-Master Load Balancing' are more confusing than helpful, because
these terms do not exist. (See the googlefight in [1]Googlefight: "Multi-Master Load Balancing" vs "Multi-Master Replication": http://tinyurl.com/y3k76r)
Can we name the chapter "Fail-over, Load-Balancing and Replication
Options"? That would fit everything and contain the necessary buzz words.
Also, I'm still missing Multi- vs Single-Master, which are also commonly
used terms.
IMHO, it does not make sense to speak of a synchronous replication for a
'Shared Disk Fail Over'. It's not replication, because there's no replica.
The Data Partitioning paragraph should probably mention it's close
relation with data partitioning across table spaces (and make the
differences clear).
What you call 'Query Broadcast Load Balancing' is also a multi-master
replication, thus naming only the later 'Multi-Master Load Balancing'
misleading.
I'd propose to add a subsection 'Synchronous, Multi-Master Replication'
and explain the different possibilities on how to do that:
* Query-Based
* with 2PC
* Distributed SHMEM
* (perhaps mention the optimized Postgres-R algorithm ;-)
What you called 'Single-Query Clustering' is probably better known as
'Parallel Query Execution'. It can be combined with all types of
replication (every combination of async / sync and Single- /
Multi-Master). It's maybe load balancing, but it depends on some form of
replication to distribute the data first.
I liked Chris Browns documentation in [2]Chris Browns proposal for a replication documentation: http://archives.postgresql.org/pgsql-patches/2006-08/msg00026.php which was clearer regarding
replication (which can be used to do fail-over, load-balancing,
data-partitioning or parallel query execution). I'd like to keep all
those things a little more separate to get them clear.
Regards
Markus
[1]: Googlefight: "Multi-Master Load Balancing" vs "Multi-Master Replication": http://tinyurl.com/y3k76r
Replication": http://tinyurl.com/y3k76r
[2]: Chris Browns proposal for a replication documentation: http://archives.postgresql.org/pgsql-patches/2006-08/msg00026.php
http://archives.postgresql.org/pgsql-patches/2006-08/msg00026.php
Bruce Momjian wrote:
OK, does that mean we mention EnterpriseDB in the section about Oracle
functions? Why not mention MS SQL if they have a better solution? I
just don't see where that line can clearly be drawn on what to include.
Do we mention Netiza, which is loosely based on PostgreSQL? It just
seems very arbitrary to include commercial software. If someone wants
to put in on a wiki, I think that would be fine because that doesn't
seems as official.
I agree that the commercial offerings shouldn't be named directly in the
docs, but it should be mentioned that some commercial options are
available and a starting point to find more information.
If potential new users look through the docs and it says no options
available for what they want or consider they will need in the future
then they go elsewhere, if they know that some options are available
then they will look further if they want that feature.
something like
"There are currently no open source solutions available for this option
but there are some commercial offerings. More details of some available
solutions can be found at postgresql.org/support/...."
--
Shane Ambler
pgSQL@007Marketing.com
Get Sheeky @ http://Sheeky.Biz
On Wed, Oct 25, 2006 at 08:22:25PM +0930, Shane Ambler wrote:
Bruce Momjian wrote:
OK, does that mean we mention EnterpriseDB in the section about Oracle
functions? Why not mention MS SQL if they have a better solution? I
just don't see where that line can clearly be drawn on what to include.
Do we mention Netiza, which is loosely based on PostgreSQL? It just
seems very arbitrary to include commercial software. If someone wants
to put in on a wiki, I think that would be fine because that doesn't
seems as official.I agree that the commercial offerings shouldn't be named directly in the
docs, but it should be mentioned that some commercial options are
available and a starting point to find more information.If potential new users look through the docs and it says no options
available for what they want or consider they will need in the future
then they go elsewhere, if they know that some options are available
then they will look further if they want that feature.something like
"There are currently no open source solutions available for this option
but there are some commercial offerings. More details of some available
solutions can be found at postgresql.org/support/...."
I think this is probably the best compromise. Keep in mind that many
people who are looking at us will also be looking at MySQL, which is
itself a commercial offering. It's good to let folks know that with
PostgreSQL, they have more control over how much money they spend for
commercial add-ons and support.
--
Jim Nasby jim@nasby.net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)
On Wed, Oct 25, 2006 at 11:38:11AM +0200, Markus Schiltknecht wrote:
I can't really get excited about the exclusion of the term
'replication', because it's what most people are looking for. It's a
well known term. Sorry if it sounded that way, but I've not meant to
avoid that term.
<snip>
IMHO, it does not make sense to speak of a synchronous replication for a
'Shared Disk Fail Over'. It's not replication, because there's no replica.
Those to statements are at odds with each other, at least based on
everyone I've ever talked to in a commercial setting. People will use
terms like 'replication', 'HA' or 'clustering' fairly interchangably.
Usually what these folks want is some kind of high-availability
solution. A few are more concerned with scalability. Sometimes it's a
combination of both. That's why I think it's good for the chapter to
deal with both aspects of this.
--
Jim Nasby jim@nasby.net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)
I am not inclined to add commercial offerings. If people wanted
commercial database offerings, they can get them from companies that
advertize. People are coming to PostgreSQL for open source solutions,
and I think mentioning commercial ones doesn't make sense.If we are to add them, I need to hear that from people who haven't
worked in PostgreSQL commerical replication companies.
You did, Josh Berkus. Secondly, as many people have stated in the past
not one replication suits everyone's needs and as PostgreSQL has many
replication solutions, it only makes sense to list the more prominent
ones, commercial or not.
Joshua D. Drake
--
=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
A big part of the value of Postgresql is the applications and extensions
that support it. Hiding the existence of some subset of those just
because of the way they're licensed is both underselling postgresql
and doing something of a disservice to the user of the document.OK, does that mean we mention EnterpriseDB in the section about Oracle
functions?
Way to compare apples to houses their Bruce. We are talking about
*PostgreSQL* replication solutions. Not *Oracle* compatibility
functions, However, *if* we had an Oracle compatibility section, I would
say, "Yes it does make sense to list EnterpriseDB as a Proprietary
Commercial solution to migrating from Oracle.
Why not mention MS SQL if they have a better solution?
Because we aren't talking about MS SQL, we are talking about PostgreSQL.
I
just don't see where that line can clearly be drawn on what to include.
Do we mention Netiza, which is loosely based on PostgreSQL? It just
seems very arbitrary to include commercial software.
It is no more arbitrary than including *any* information on PostgreSQL
replication solutions, because PostgreSQL doesn't have any.
PostgreSQL doesn't do replication, except for PITR (and that is pushing
it as a replication solution).
Now.. there are *projects* that enable PostgreSQL to do replication.
Some of them are Open Source, some of them are commercial products.
Sincerely,
Joshua D. Drake
--
=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
Hi, Cesar,
Cesar Suga wrote:
If people (who read the documentation) professionally work with
PostgreSQL, they may already have been briefed by those commercial
offerings in some way.I think only the source and its tightly coupled (read: can compile along
with, free as PostgreSQL) components should be packaged into the tarball.However, I find Bruce's unofficial wiki idea a good one for comparisons.
My suggestion is that the docs should mention only the pure existence of
important third-party packages and projects in those places where it
talks about the deficits that are supposedly fixed by those.
E. G. "There are some third-party packages and projects that aim to
provide multi-master replication, you can search for more information at
http://[unofficial wiki page url] or your favourite search engine.
This way, the docs stay neutral, but point the user to possible
solutions of his problem.
HTH,
Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS
Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org
Cesar Suga wrote:
Hi,
I also wrote Bruce about that.
It happens that, if you 'freely advertise' commercial solutions (rather
than they doing so by other vehicles) you will always happen to be an
'updater' to the docs if they change their product lines, if they change
their business model, if and if.
That is no different than the open source offerings. We have had several
open source offerings that have died over the years. Replicator, for
example has always been Replicator and has been around longer than any
of the current replication solutions.
If you cite a commercial solution, as a fair game you should cite *all*
of them.
No. That doesn't make any sense either. I assume we aren't going to list
all PostgreSQL OSS replication solutions (there are at least a dozen or
more).
You list the ones that are stable in their existence (commercial or not).
If one enterprise has the right to be listed in the
documentation, all of them might, as you will never be favouring one of
them.
You are looking at this the wrong way. This isn't about *any*
enterprise. It is about a PostgreSQL Solution. There happens to be two
or three known working open source solutions, and two or three known
working commercial solutions.
That's the main motivation to write this. Moreover, if there are also
commercial solutions for high-end installs and they are cited as
providers to those solutions, it (to a point) disencourages those of
gathering themselves and writing open source extensions to PostgreSQL.
No it doesn't. Because there is always the, "It want's to be free!" crowd.
If people (who read the documentation) professionally work with
PostgreSQL, they may already have been briefed by those commercial
offerings in some way.
Maybe, maybe not.
Sincerely,
Joshua D. Drake
--
=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
I would think that companies that sell closed-source solutions for
PostgreSQL would be modest enough not to push their own agenda for the
documentation. I think they should just sit back and hope others
suggest it.
[ Josh Berkus recently left Green Plum for Sun. ]
---------------------------------------------------------------------------
Joshua D. Drake wrote:
A big part of the value of Postgresql is the applications and extensions
that support it. Hiding the existence of some subset of those just
because of the way they're licensed is both underselling postgresql
and doing something of a disservice to the user of the document.OK, does that mean we mention EnterpriseDB in the section about Oracle
functions?Way to compare apples to houses their Bruce. We are talking about
*PostgreSQL* replication solutions. Not *Oracle* compatibility
functions, However, *if* we had an Oracle compatibility section, I would
say, "Yes it does make sense to list EnterpriseDB as a Proprietary
Commercial solution to migrating from Oracle.Why not mention MS SQL if they have a better solution?
Because we aren't talking about MS SQL, we are talking about PostgreSQL.
I
just don't see where that line can clearly be drawn on what to include.
Do we mention Netiza, which is loosely based on PostgreSQL? It just
seems very arbitrary to include commercial software.It is no more arbitrary than including *any* information on PostgreSQL
replication solutions, because PostgreSQL doesn't have any.PostgreSQL doesn't do replication, except for PITR (and that is pushing
it as a replication solution).Now.. there are *projects* that enable PostgreSQL to do replication.
Some of them are Open Source, some of them are commercial products.Sincerely,
Joshua D. Drake
--
=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Bruce Momjian wrote:
I would think that companies that sell closed-source solutions for
PostgreSQL would be modest enough not to push their own agenda for the
documentation. I think they should just sit back and hope others
suggest it.[ Josh Berkus recently left Green Plum for Sun. ]
Bruce, you are making an idiot of yourself. With this statement you have
implied that Josh Berkus, are core member somehow has his own agenda
that is not in the interests of the PostgreSQL community.
Further that, you are suggesting that I as a member of Command Prompt
has an agenda that is not in the interests of the PostgreSQL community.
It was rude, uncalled for, inaccurate, and frankly disgusting.
Joshua D. Drake
--
=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
I also wrote Bruce about that.
It happens that, if you 'freely advertise' commercial solutions
(rather than they doing so by other vehicles) you willalways happen
to be an 'updater' to the docs if they change their product
lines, if
they change their business model, if and if.
That is no different than the open source offerings. We have
had several open source offerings that have died over the
years. Replicator, for example has always been Replicator and
has been around longer than any of the current replication solutions.
I think this is a good reason not to list *any* of the products by name
in the documentation, but instead refer to a page on say techdocs that
can be more easily updated. And that can contain both free and non-free
projects, under clear headlines showing the difference.
The documentation is about PostgreSQL, not about third-party products,
be they free or commercial. Our *website*, however, should give guidance
on which specific products we (as a community) know are stable and
usable along with PostgreSQL (as we do today under downloads, but could
very well do based on specific uses like replication as well)
//Magnus
they change their business model, if and if.
That is no different than the open source offerings. We have
had several open source offerings that have died over the
years. Replicator, for example has always been Replicator and
has been around longer than any of the current replication solutions.I think this is a good reason not to list *any* of the products by name
in the documentation, but instead refer to a page on say techdocs that
can be more easily updated. And that can contain both free and non-free
projects, under clear headlines showing the difference.The documentation is about PostgreSQL, not about third-party products,
be they free or commercial. Our *website*, however, should give guidance
on which specific products we (as a community) know are stable and
usable along with PostgreSQL (as we do today under downloads, but could
very well do based on specific uses like replication as well)
I can agree with this :)
Sincerely,
Joshua D. Drake
--
=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
"Magnus Hagander" <mha@sollentuna.net> writes:
I think this is a good reason not to list *any* of the products by name
in the documentation, but instead refer to a page on say techdocs that
can be more easily updated.
I agree with that. If we have statements about other projects in our
docs, we will have a problem with not being able to update those
statements in a timely fashion when the other projects change.
regards, tom lane
Tom Lane wrote:
"Magnus Hagander" <mha@sollentuna.net> writes:
I think this is a good reason not to list *any* of the products by name
in the documentation, but instead refer to a page on say techdocs that
can be more easily updated.I agree with that. If we have statements about other projects in our
docs, we will have a problem with not being able to update those
statements in a timely fashion when the other projects change.
This being said, I would say that the replication documentation needs to
be on Techdocs or some place similar and that we should have a link in
the PostgreSQL docs that points to the techdocs article and possibly:
http://www.postgresql.org/download/ .
Sincerely,
Joshua D. Drake
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
--
=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
Markus Schiltknecht wrote:
Hi,
Bruce Momjian wrote:
I have updated the text. Please let me know what else I should change.
I am unsure if I should be mentioning commercial PostgreSQL products in
our documentation.I support your POV and vote for not including any pointers to commercial
extensions in the official documentation. If at all, they should go to
'external-projects.sgml', where PostGIS, PgAdmin and other projects are
mentioned.I can't really get excited about the exclusion of the term
'replication', because it's what most people are looking for. It's a
well known term. Sorry if it sounded that way, but I've not meant to
avoid that term.
OK, I have re-added the term "replication" as appropriate.
The newly created terms 'Query Broadcast Load Balancing' or even worse
'Multi-Master Load Balancing' are more confusing than helpful, because
these terms do not exist. (See the googlefight in [1])
OK, renamed.
Can we name the chapter "Fail-over, Load-Balancing and Replication
Options"? That would fit everything and contain the necessary buzz words.
Yes. Done, "cluster" added too.
Also, I'm still missing Multi- vs Single-Master, which are also commonly
used terms.
Yea, not sure how to get those in because it somewhat confuses the
"purpose" of the solution.
IMHO, it does not make sense to speak of a synchronous replication for a
'Shared Disk Fail Over'. It's not replication, because there's no replica.
Agreed. Modified.
The Data Partitioning paragraph should probably mention it's close
relation with data partitioning across table spaces (and make the
differences clear).
Uh, so you I/O load with table spaces. Uh, that seems too far a reach
to mention here.
What you call 'Query Broadcast Load Balancing' is also a multi-master
replication, thus naming only the later 'Multi-Master Load Balancing'
misleading.
Renamed.
I'd propose to add a subsection 'Synchronous, Multi-Master Replication'
and explain the different possibilities on how to do that:* Query-Based
* with 2PC
* Distributed SHMEM
* (perhaps mention the optimized Postgres-R algorithm ;-)What you called 'Single-Query Clustering' is probably better known as
'Parallel Query Execution'. It can be combined with all types of
replication (every combination of async / sync and Single- /
Multi-Master). It's maybe load balancing, but it depends on some form of
replication to distribute the data first.
Good term. Added.
I liked Chris Browns documentation in [2] which was clearer regarding
replication (which can be used to do fail-over, load-balancing,
data-partitioning or parallel query execution). I'd like to keep all
those things a little more separate to get them clear.
Please let me know how you like the new version at the ftp URL.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Jim C. Nasby wrote:
On Wed, Oct 25, 2006 at 11:38:11AM +0200, Markus Schiltknecht wrote:
I can't really get excited about the exclusion of the term
'replication', because it's what most people are looking for. It's a
well known term. Sorry if it sounded that way, but I've not meant to
avoid that term.<snip>
IMHO, it does not make sense to speak of a synchronous replication for a
'Shared Disk Fail Over'. It's not replication, because there's no replica.Those to statements are at odds with each other, at least based on
everyone I've ever talked to in a commercial setting. People will use
terms like 'replication', 'HA' or 'clustering' fairly interchangably.
Usually what these folks want is some kind of high-availability
solution. A few are more concerned with scalability. Sometimes it's a
combination of both. That's why I think it's good for the chapter to
deal with both aspects of this.
OK, I did break it out somewhat for clarity. Let me know how it looks
now.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Hi,
Jim C. Nasby wrote:
Those to statements are at odds with each other, at least based on
everyone I've ever talked to in a commercial setting. People will use
terms like 'replication', 'HA' or 'clustering' fairly interchangably.
Usually what these folks want is some kind of high-availability
solution. A few are more concerned with scalability. Sometimes it's a
combination of both. That's why I think it's good for the chapter to
deal with both aspects of this.
Yabut... at least the PostgreSQL manual should uses the terms correctly.
And while I do perfectly agree that it's a fail-over solution and it
should be mentioned in that section, I'm arguing that it's not replication.
Regards
Markus
Tom Lane wrote:
"Magnus Hagander" <mha@sollentuna.net> writes:
I think this is a good reason not to list *any* of the products by name
in the documentation, but instead refer to a page on say techdocs that
can be more easily updated.I agree with that. If we have statements about other projects in our
docs, we will have a problem with not being able to update those
statements in a timely fashion when the other projects change.
I mention only Slony and pgpool as examples of replication types. They
seem to have risen to high enough visiblity to do that. I have not
mentioned any other solutions.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Bruce Momjian wrote:
Tom Lane wrote:
"Magnus Hagander" <mha@sollentuna.net> writes:
I think this is a good reason not to list *any* of the products by name
in the documentation, but instead refer to a page on say techdocs that
can be more easily updated.I agree with that. If we have statements about other projects in our
docs, we will have a problem with not being able to update those
statements in a timely fashion when the other projects change.I mention only Slony and pgpool as examples of replication types. They
seem to have risen to high enough visiblity to do that. I have not
mentioned any other solutions.
What about Slony-II or pgpool2? Which are fundamentally different from
their v1 counterparts (o.k. slony-ii isn't out yet but still).
I +1 that we move to have all of the replication documentation pushed to
techdocs or other facility and just have a link from the docs.
Joshua D. Drake
--
=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
Joshua D. Drake wrote:
Bruce Momjian wrote:
Tom Lane wrote:
"Magnus Hagander" <mha@sollentuna.net> writes:
I think this is a good reason not to list *any* of the products by name
in the documentation, but instead refer to a page on say techdocs that
can be more easily updated.I agree with that. If we have statements about other projects in our
docs, we will have a problem with not being able to update those
statements in a timely fashion when the other projects change.I mention only Slony and pgpool as examples of replication types. They
seem to have risen to high enough visiblity to do that. I have not
mentioned any other solutions.What about Slony-II or pgpool2? Which are fundamentally different from
their v1 counterparts (o.k. slony-ii isn't out yet but still).I +1 that we move to have all of the replication documentation pushed to
techdocs or other facility and just have a link from the docs.
What I did was to mention Slony and pgpool as "examples", so people
realize there are many other soluions. It would be good to have a
companion web site that could list them all, both open source and
commercial. That is going to take a lot more work, but I think would
have great value, especially since our documentation will clearly
outline the terms. What you don't want to do is to throw up a list and
have people try to figure out what solutions they cover.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
On Wed, Oct 25, 2006 at 11:38:11AM +0200, Markus Schiltknecht wrote:
Can we name the chapter "Fail-over, Load-Balancing and Replication
Options"? That would fit everything and contain the necessary buzz words.
...
IMHO, it does not make sense to speak of a synchronous replication for a
'Shared Disk Fail Over'. It's not replication, because there's no replica.
As you point out, there is no replica of the data, but there is some
protection against machine failure, which puts it firmly in the
"Fail-over" part above.
Cheers,
D
--
David Fetter <david@fetter.org> http://fetter.org/
phone: +1 415 235 3778 AIM: dfetter666
Skype: davidfetter
Remember to vote!
Hi Hannu, everyone,
I apologize for not having read the document in question - will do
shortly. My comments are brought about by the dialogue I read on list this
morning...
Here is a new replication documentation section I want to add for 8.2:
ftp://momjian.us/pub/postgresql/mypatches/replication
Data Partitioning
-----------------Data partitioning splits the database into data sets. To achieve
replication, each data set can only be modified by one server. For
example, data can be partitioned by offices, e.g. London and Paris.
While London and Paris servers have all data records, only London can
modify London records, and Paris can only modify Paris records. Such
partitioning is usually accomplished in application code, though rules
and triggers can help enforce partitioning and keep the read-only data
sets current. Slony can also be used in such a setup. While Slony
replicates only entire tables, London and Paris can be placed in
separate tables, and inheritance can be used to access from both tables
using a single table name.Maybe another use of partitioning should also be mentioned. That is ,
when partitioning is used to overcome limitations of single servers
(especially IO and memory, but also CPU), and only a subset of data is
stored and processed on each server.
I think the "official" term for this kind of "replication" is
Shared-Nothing Clustering.
"Data partitioning" has two fundamental flavors, "horizontal" and
"vertical", quite a handful of implementations, and even more motivations
behind why one uses either strategy and whatever implementation. The same
is true for "clustering" - a few fundamental strategies, with a larger
number of implementations and yet more motivations. Replication,
meanwhile, is yet another beast altogether, sharing the same fundamentals
of multiple flavors, implementations and motivations. � I strongly urge
keeping any documentation on these (and related) topics strictly distinct
and separate.
In my view, one should define the terms first, separately, distinctly, and
as succinctly as possible, and, following this, a dialogue on how these
may be combined can be entertained. The definitions of each should be both
complete and academic in flavor and may include implementation and
motivational information, but never "muddy the water" by mixing with
other concepts - not yet, not until after all the fundamentals have been
introduced.
I don't know much about what PostgreSql has been doing in these areas of
late - nothing, I gather from someone's post this morning - but I'll try
to help out as I can with a paragraph or two - whatever you want,
whatever's welcome - as "I was there" when Randy Eash created the first
commercial RDBMS replicator - for Ingres - and since I created the first
commercial RDBMS front-end failover technology, also for Ingres, so I have
a pretty good handle on all the issues.
Also, I liked what Markus Schiltknecht wrote, but will have to read the
original before I can comment on his specific points.
I am not inclined to add commercial offerings. If people wanted
commercial database offerings, they can get them from companies that
advertize. People are coming to PostgreSQL for open source solutions,
and I think mentioning commercial ones doesn't make sense.If we are to add them, I need to hear that from people who haven't
worked in PostgreSQL commerical replication companies.I'm not coming to PostgreSQL for open source solutions. I'm coming
to PostgreSQL for _good_ solutions.I want to see what solutions might be available for a problem I have.
I certainly want to know whether they're freely available, commercial
or some flavour of open source, but I'd like to know about all of them.A big part of the value of Postgresql is the applications and extensions
that support it. Hiding the existence of some subset of those just
because of the way they're licensed is both underselling postgresql
and doing something of a disservice to the user of the document.
If potential new users look through the docs and it says no options
available for what they want or consider they will need in the future
then they go elsewhere, if they know that some options are available
then they will look further if they want that feature.
I agree that people look through the materials on the web site,
documentation especially, and make choices based upon what they see. Many
of us don't have time to spend a day searching the web for things we don't
even know exist. By including more information, more users will be
attracted to PostgreSql, whether it be in the documentation or web site. I
have been SURE that certain things must exist in the PG world, but haven't
known about them with certainty due to time constraints, but would gladly
point our customers at Postgres solutions if only I knew about them. Count
this paragraph as praise for doing _something_more_ to help get more
information to (prospective) users.
Consider someone like me; my company supports five RDBMSes, one of them
being Postgres. We are probably not unique in that we've written an SQL
dialect translator so we could write our own code in one code line to run
anywhere, against any RDBMS (it can learn new dialects) - or perhaps
others keep multiple code lines containing varriant dialects. Either way,
we "don't care" whether our customer has Oracle, or PostgreSql, so long as
they buy our stuff. But when our customers - or prospects - come to us
with a given scenario, the more we know about Postgres - and its community
- the more likely we can steer them to a PG solution, which we would
prefer anyway, for lots of reasons, historical, personal, and technical -
not to mention cost. The trouble is, Oracle, for example, has already told
them (sold them?) on whatever, and we need a rebuttal ready at hand or
they'll go with Oracle. We just don't have the time to fight that battle,
nor do we wish to risk the sale when we can work with Oracle just fine.
In sum, I agree with Tom Lane and the others who chimed in with "keep the
docs clean, use the web site for mentioning other projects/products." And
again I applaud this new effort.
Regards,
Richard
--
Richard Troy, Chief Scientist
Science Tools Corporation
510-924-1363 or 202-747-1263
rtroy@ScienceTools.com, http://ScienceTools.com/
David Fetter wrote:
On Wed, Oct 25, 2006 at 11:38:11AM +0200, Markus Schiltknecht wrote:
Can we name the chapter "Fail-over, Load-Balancing and Replication
Options"? That would fit everything and contain the necessary buzz words....
IMHO, it does not make sense to speak of a synchronous replication for a
'Shared Disk Fail Over'. It's not replication, because there's no replica.As you point out, there is no replica of the data, but there is some
protection against machine failure, which puts it firmly in the
"Fail-over" part above.
Right, but his point was not to call it synchronous. I have fixed that
in the current version.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Hi,
A typo:
("a write to any server has to be _propogated_")
s/propogated/propagated
Bruce Momjian wrote:
Here is a new replication documentation section I want to add for 8.2:
ftp://momjian.us/pub/postgresql/mypatches/replication
Comments welcomed.
--
Regards,
Alexey Klyukin alexk(at)vollmond.org.ua
Simferopol, Crimea, Ukraine.
Here is a new replication documentation section I want to add for 8.2:
ftp://momjian.us/pub/postgresql/mypatches/replication
...Read the document, as promissed...
First paragraph, "(fail over)" is inconsistent with title, "failover", as
are other spots throughout the document. The whole document should be
consistent and I vote for "failover" and not "fail over."
Fourth paragraph, "This "sync problem" is the fundamental difficulty for
servers working together"; "Sync problem" hasn't been defined. Actually,
you're talking about the consistent attribute of the "acid" properties of
all competent databases: Atomic, Consistency, Isolation, and Durability.
At least define the term you are using - probably most easily done in the
preceeding paragraph.
The fifth paragraph needs a lot more help, I think. Howabout this
alternative:
So called "two phaised commit" was developed as a strategy in which two or
more databases are updated simultaneously and none of the data is
committed until all are committed. This guarantees consistency between the
databases with all propagation delay being absorbed by the writer at write
time. There are times when this propagation delay is large, so sometimes
alternatives are worked out which we'll call here "asynchronous updates,"
however, in these cases, there is always a window of time in which some
transaction can be lost should a failure occurr. For this reason,
asynchronous updates are only used when the possibility of such losses is
acceptible.
Paragraphs six through to "shared disk failover" seem very awkward to me.
I don't like them at all.
"Shared disk failover" has nothing to do with "the sync problem" as it's
not a multiple-database solution. It's an uptime, "24 X 7 X 365" issue.
Further, it also has nothing to do with disk arrays, though it is often
used with RAID to help avoid disk based corruption problems.
The point about Warm Standby needs to include a warning about WAL that it
MUST be sensitive to the semantics of the database design or else it's
fatally flawed. I'm talking about "referential integrety". That is to say,
it's inappropriate to capture updates on a table by table basis, as some
such systems do, (I have no idea what's done by anyone in the PG world on
this right now) because an update to one table (esp. inserts) very often
go hand in glove with updates in other tables and to get one without the
other can corrupt a database.
The description of "Continuously running replication server" should
include the critical caveat - repeated if you think it's already said
elsewhere - that it is ONLY suitable for applications in which a loss of
(missing) update data doesn't matter. For example, an airline reservation
system would be an inappropriate application for such a "solution" because
what seats are available cannot be guaranteed to be correct.
Regarding data partitioning, I strongly disagree with the opening sentence
in that it doesn't split a database into sets, it splits tables into sets.
Data partitioning is often done within a single database on a single
server and therefore, as a concept, has nothing whatsoever to do with
different servers. Similarly, the second paragraph of this section is
problematic. Please define your term first, then talk about some
implementations - this is muddying the water. Further, there are both
vertical and horizontal partitioning - you mention neither - and each has
its own distinct uses. If partitioning is mentioned, it should be more
complete.
Next, Query Broadcast Load Balancing... also needs a lot of work. First,
it's foremost in my memory that sending read queries everywhere and
returning the first result set back is a key way to improve application
performance at the cost of additional load on other systems - I guess
that's not at all what the document is after here, but it's a worthy part
of a dialogue on broadcasting queries. In other words, this has more parts
to it than just what the document now entertains. Secondly, the document
doesn't address _at_all_ whether this is a two-phaise-commit environment
or not. If not, how are updates managed? If each server operates
independently and one of them fails, what do you do then? How do you know
_any_ server got an insert/update? ... Each server _can't_ operate
independently unless the application does its own insert/update commits to
every one of them - and that can't be fast, nor does it load balance,
though it may contribute to superior uptime performance by the
application.
Next up; I'm not aware of any current products or projects that provide
parallel query execution, though Informix might - I can ask a colleague or
two. Either way, it's probably best to simply define the term (perhaps in
a little more detail), and not mention solutions - they change with time
anyway.
While I've never used Oracle's clustering tools, I've read up on them and
have customers who use them, and I think this description of Oracle
clustering is a mis-read on what the Oracle system actually does. A check
with a true Oracle clustering expert is in order here.
Hope this helps. If asked, I'm willing to (re)write some of the bits
discussed above.
Regards,
Richard
--
Richard Troy, Chief Scientist
Science Tools Corporation
510-924-1363 or 202-747-1263
rtroy@ScienceTools.com, http://ScienceTools.com/
Alexey Klyukin wrote:
Hi,
A typo:
("a write to any server has to be _propogated_")
s/propogated/propagated
Thanks, fixed.
---------------------------------------------------------------------------
Bruce Momjian wrote:
Here is a new replication documentation section I want to add for 8.2:
ftp://momjian.us/pub/postgresql/mypatches/replication
Comments welcomed.
--
Regards,Alexey Klyukin alexk(at)vollmond.org.ua
Simferopol, Crimea, Ukraine.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Bruce,
ftp://momjian.us/pub/postgresql/mypatches/replication
I'm still not seeing anything in this patch that tells users where they can
get replication solutions for PostgreSQL, either OSS or commercial.
--
--Josh
Josh Berkus
PostgreSQL @ Sun
San Francisco
Richard Troy wrote:
Here is a new replication documentation section I want to add for 8.2:
ftp://momjian.us/pub/postgresql/mypatches/replication
...Read the document, as promissed...
First paragraph, "(fail over)" is inconsistent with title, "failover", as
are other spots throughout the document. The whole document should be
consistent and I vote for "failover" and not "fail over."
OK. Fixed to "failover"
Fourth paragraph, "This "sync problem" is the fundamental difficulty for
servers working together"; "Sync problem" hasn't been defined. Actually,
you're talking about the consistent attribute of the "acid" properties of
all competent databases: Atomic, Consistency, Isolation, and Durability.
At least define the term you are using - probably most easily done in the
preceeding paragraph.
OK, "sync problem" term removed, and spelled out fully.
The fifth paragraph needs a lot more help, I think. Howabout this
alternative:So called "two phaised commit" was developed as a strategy in which two or
more databases are updated simultaneously and none of the data is
committed until all are committed. This guarantees consistency between the
databases with all propagation delay being absorbed by the writer at write
time. There are times when this propagation delay is large, so sometimes
alternatives are worked out which we'll call here "asynchronous updates,"
however, in these cases, there is always a window of time in which some
transaction can be lost should a failure occurr. For this reason,
asynchronous updates are only used when the possibility of such losses is
acceptible.
I have modified the paragraph to use some of your terms.
Paragraphs six through to "shared disk failover" seem very awkward to me.
I don't like them at all."Shared disk failover" has nothing to do with "the sync problem" as it's
not a multiple-database solution. It's an uptime, "24 X 7 X 365" issue.
Further, it also has nothing to do with disk arrays, though it is often
used with RAID to help avoid disk based corruption problems.
Yes, please see updated version. I removed the sync problem term from
there.
The point about Warm Standby needs to include a warning about WAL that it
MUST be sensitive to the semantics of the database design or else it's
fatally flawed. I'm talking about "referential integrety". That is to say,
it's inappropriate to capture updates on a table by table basis, as some
such systems do, (I have no idea what's done by anyone in the PG world on
this right now) because an update to one table (esp. inserts) very often
go hand in glove with updates in other tables and to get one without the
other can corrupt a database.
We don't have that problem. We recover only full transactions.
The description of "Continuously running replication server" should
include the critical caveat - repeated if you think it's already said
elsewhere - that it is ONLY suitable for applications in which a loss of
(missing) update data doesn't matter. For example, an airline reservation
system would be an inappropriate application for such a "solution" because
what seats are available cannot be guaranteed to be correct.
I have added note about data loss for the Slony item.
Regarding data partitioning, I strongly disagree with the opening sentence
in that it doesn't split a database into sets, it splits tables into sets.
OK, changed.
Data partitioning is often done within a single database on a single
server and therefore, as a concept, has nothing whatsoever to do with
different servers. Similarly, the second paragraph of this section is
Uh, why would someone split things up like that on a single server?
problematic. Please define your term first, then talk about some
implementations - this is muddying the water. Further, there are both
vertical and horizontal partitioning - you mention neither - and each has
its own distinct uses. If partitioning is mentioned, it should be more
complete.
Uh, what exactly needs to be defined.
Next, Query Broadcast Load Balancing... also needs a lot of work. First,
it's foremost in my memory that sending read queries everywhere and
returning the first result set back is a key way to improve application
performance at the cost of additional load on other systems - I guess
that's not at all what the document is after here, but it's a worthy part
of a dialogue on broadcasting queries. In other words, this has more parts
to it than just what the document now entertains. Secondly, the document
Uh, do we want to go into that here? I guess I could.
doesn't address _at_all_ whether this is a two-phaise-commit environment
or not. If not, how are updates managed? If each server operates
independently and one of them fails, what do you do then? How do you know
_any_ server got an insert/update? ... Each server _can't_ operate
independently unless the application does its own insert/update commits to
every one of them - and that can't be fast, nor does it load balance,
though it may contribute to superior uptime performance by the
application.
I think having the application middle layer do the commits is how it
works now. Can someone explain how pgpool works, or should we mention
how two-phase commit has to be done here? pgpool2 has additional
features.
Next up; I'm not aware of any current products or projects that provide
parallel query execution, though Informix might - I can ask a colleague or
two. Either way, it's probably best to simply define the term (perhaps in
a little more detail), and not mention solutions - they change with time
anyway.
Actually, Bizgres MPP, based on PostgreSQL, does this, but mostly for
read-only queries.
While I've never used Oracle's clustering tools, I've read up on them and
have customers who use them, and I think this description of Oracle
clustering is a mis-read on what the Oracle system actually does. A check
with a true Oracle clustering expert is in order here.
OK, would someone please comment?
Hope this helps. If asked, I'm willing to (re)write some of the bits
discussed above.
Yes, please review the URL and let me know what else to change. Thanks.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Josh Berkus wrote:
Bruce,
ftp://momjian.us/pub/postgresql/mypatches/replication
I'm still not seeing anything in this patch that tells users where they can
get replication solutions for PostgreSQL, either OSS or commercial.
It isn't designed for that. It is designed for people to understand
what they want, and then they can look around for solutions. I think
most agree we don't want a list of solutions in the documentation,
though I have a few as examples. Also, some of the solutions don't
require software, but just configuration or special hardware.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
On 10/25/06, Bruce Momjian <bruce@momjian.us> wrote:
Joshua D. Drake wrote:
Bruce Momjian wrote:
Tom Lane wrote:
"Magnus Hagander" <mha@sollentuna.net> writes:
I think this is a good reason not to list *any* of the products by name
in the documentation, but instead refer to a page on say techdocs that
can be more easily updated.I agree with that. If we have statements about other projects in our
docs, we will have a problem with not being able to update those
statements in a timely fashion when the other projects change.I mention only Slony and pgpool as examples of replication types. They
seem to have risen to high enough visiblity to do that. I have not
mentioned any other solutions.What about Slony-II or pgpool2? Which are fundamentally different from
their v1 counterparts (o.k. slony-ii isn't out yet but still).I +1 that we move to have all of the replication documentation pushed to
techdocs or other facility and just have a link from the docs.What I did was to mention Slony and pgpool as "examples", so people
realize there are many other soluions. It would be good to have a
companion web site that could list them all, both open source and
commercial. That is going to take a lot more work, but I think would
have great value, especially since our documentation will clearly
outline the terms. What you don't want to do is to throw up a list and
have people try to figure out what solutions they cover.
I'm in quite an unique situation right now, working with a few DBAs
who have deep knowledge but no PostgreSQL background, so I have
a good view how PostgreSQL is perceived by people with fair knowledge
of other databases.
What I have noticed is a deep respect for community. If they ask about
replication solution, and I tell about Slony, they ask if Slony is provided
with the postgresql-contrib. Well... no, and it won't be. Then they look
back, think a while and say somethig on the lines of: well, $SOME_OTHER
_DATABASE was using external replication solutions so it is all right.
But then, before I talked with them, they did some quick research on
PostgreSQL and their perception was that there's no replication / replication
is shady in PostgreSQL. It would be quite convenient to tell them:
"No replication? Did you actually read the manual? <here goes URL>"
Well, pointing them to slony page is a solution but of a lesser caliber
(how should they know about Slony anyway? They are newbies).
Pointing them at The Documentation is a Good Argument (and it may
cause them to look for some other information, like SQL syntax or
PostgreSQL-specific catalog views there, which is Good).
Enough background.
Bruce, I've read Your documentation and I was left a bit with a feeling
that it's a bit too generic. It's almost as if it could be about just about
any major database, not PostgreSQL specific. I feel that, when I'm
reading PostgreSQL docs I would like to know how to set up multi-master
replication with PostgreSQL not an explanation what a multi-master
replication is. It's not about the actual documentation content, but rather
on accents distribution. Now it is something like: "These are the types
of replication solutions possible, some of them can be done with PostgreSQL",
I think it should be rather: "With PostgreSQL and some third-party tools you
can achieve such and such replication solutions, oh and by the way, research
is done on such and such replication method, but it's not a production quality
yet".
And I try to think as my DBA-mates would do if they read the documentation,
I'm not sure they would end up enlighted after reading the docs -- thay would
probably say: "hey, I knew that, it's well structured there, but I
still don't know
what should I use", or maybe "where can I read something about this slony
thing anyway?".
It may be my "closed thinking schema" though. What I feel is that such
outsider, after reading these docs should end with "Aha! I should be using
Slony for my purposes". Or pgpool, if it's what she needs. I believe Tom's
remark that it does NOT belong in the PostgreSQL documentation is quite
right (though I wish there IS some reference to external replication packages,
mainly because over and over again I need to prove PostgreSQL CAN be
replicated, and it's not uncommon). However I'm still unconvinced about
TechDocs -- TechDocs are good but still they are a bit scattered and
unorganised. I am a PostgreSQL enthusiast, but it took me a while to
learn about them, and for newbies not biased towards PostgreSQL it may
take even more time. If it is linked from within the documentation, random
DBAs might read it, and I wish they do.
Right now I am more and more biased towards an additional "documentation
book" for PostgreSQL, something like "DBA guide" or handbook. In format
similar to the PostgreSQL documentation, but inside oriented around
configuring other tools around and together with PostgreSQL. I shall send
here some drafts withing 10-days time to seed a discussion. After all,
PostgreSQL is too big for just one documentation book. [1]Then, later, a programmer's handbook? Deeper knowledge about fancy stuff with Python, Perl and PgSQL? ;-)
Regards,
Dawid
[1]: Then, later, a programmer's handbook? Deeper knowledge about fancy stuff with Python, Perl and PgSQL? ;-)
stuff with Python, Perl and PgSQL? ;-)
Bruce,
It isn't designed for that. It is designed for people to understand
what they want, and then they can look around for solutions. I think
most agree we don't want a list of solutions in the documentation,
though I have a few as examples.
Do they? I've seen no discussion of the matter. I think we should have
them.
--
--Josh
Josh Berkus
PostgreSQL @ Sun
San Francisco
Josh Berkus wrote:
Bruce,
It isn't designed for that. It is designed for people to understand
what they want, and then they can look around for solutions. I think
most agree we don't want a list of solutions in the documentation,
though I have a few as examples.Do they? I've seen no discussion of the matter. I think we should have
them.
Most people didn't want a list because there is no way to keep it
current in the docs, and a secondary web site was suggested for the
list.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Dawid Kuroczko wrote:
Bruce, I've read Your documentation and I was left a bit with a feeling
that it's a bit too generic. It's almost as if it could be about just about
any major database, not PostgreSQL specific. I feel that, when I'm
reading PostgreSQL docs I would like to know how to set up multi-master
replication with PostgreSQL not an explanation what a multi-master
replication is. It's not about the actual documentation content, but rather
on accents distribution. Now it is something like: "These are the types
of replication solutions possible, some of them can be done with PostgreSQL",
I think it should be rather: "With PostgreSQL and some third-party tools you
can achieve such and such replication solutions, oh and by the way, research
is done on such and such replication method, but it's not a production quality
yet".And I try to think as my DBA-mates would do if they read the documentation,
I'm not sure they would end up enlighted after reading the docs -- thay would
probably say: "hey, I knew that, it's well structured there, but I
still don't know
what should I use", or maybe "where can I read something about this slony
thing anyway?".
Well, the idea is to have a web site that lists all the solutions that
can be updated regularly, perhaps using the categories from the
documentation.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Bruce,
Most people didn't want a list because there is no way to keep it
current in the docs, and a secondary web site was suggested for the
list.
So, like www.postgresql.org/docs/techdocs/replication? That would work.
--
--Josh
Josh Berkus
PostgreSQL @ Sun
San Francisco
Josh Berkus wrote:
Bruce,
Most people didn't want a list because there is no way to keep it
current in the docs, and a secondary web site was suggested for the
list.So, like www.postgresql.org/docs/techdocs/replication? That would work.
Yes.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
On Wed, Oct 25, 2006 at 04:42:17PM -0400, Bruce Momjian wrote:
Dawid Kuroczko wrote:
Bruce, I've read Your documentation and I was left a bit with a feeling
that it's a bit too generic. It's almost as if it could be about just about
any major database, not PostgreSQL specific. I feel that, when I'm
reading PostgreSQL docs I would like to know how to set up multi-master
replication with PostgreSQL not an explanation what a multi-master
replication is. It's not about the actual documentation content, but rather
on accents distribution. Now it is something like: "These are the types
of replication solutions possible, some of them can be done with PostgreSQL",
I think it should be rather: "With PostgreSQL and some third-party tools you
can achieve such and such replication solutions, oh and by the way, research
is done on such and such replication method, but it's not a production quality
yet".And I try to think as my DBA-mates would do if they read the documentation,
I'm not sure they would end up enlighted after reading the docs -- thay would
probably say: "hey, I knew that, it's well structured there, but I
still don't know
what should I use", or maybe "where can I read something about this slony
thing anyway?".Well, the idea is to have a web site that lists all the solutions that
can be updated regularly, perhaps using the categories from the
documentation.
And the docs should point to that page, prominently (presumably that
will happen after the page actually exists).
Something else worth doing though is to have a paragraph explaining why
there's no built-in replication. I don't have time to write something
right now, but I can do it later tonight if no one beats me to it.
--
Jim Nasby jim@nasby.net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)
Jim C. Nasby wrote:
Something else worth doing though is to have a paragraph explaining why
there's no built-in replication. I don't have time to write something
right now, but I can do it later tonight if no one beats me to it.
I thought that was implied in the early paragraph about why there are
many solutions.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Joshua D. Drake wrote:
Cesar Suga wrote:
Hi,
I also wrote Bruce about that.
It happens that, if you 'freely advertise' commercial solutions (rather
than they doing so by other vehicles) you will always happen to be an
'updater' to the docs if they change their product lines, if they change
their business model, if and if.That is no different than the open source offerings. We have had several
open source offerings that have died over the years. Replicator, for
example has always been Replicator and has been around longer than any
of the current replication solutions.
The documentation comes with the open source tarball.
I would welcome if the docs point to an unofficial wiki (maintained
externally from authoritative PostgreSQL developers) or a website
listing them and giving a brief of each solution.
postgresql.org already does this for events (commercial training!) and
news. Point to postgresql.org/download/commercial as there *already* are
brief descriptions, pricing and website links.
If you cite a commercial solution, as a fair game you should cite *all*
of them.No. That doesn't make any sense either. I assume we aren't going to list
all PostgreSQL OSS replication solutions (there are at least a dozen or
more).You list the ones that are stable in their existence (commercial or not).
And how would you determine it? Years of existance? Contribution to
PostgreSQL's source code? It is not easy and wouldn't be fair. There are
ones that certainly will be listed, and other doubtful ones (which would
perhaps complain, that's why I said 'all' - if they are not stable,
either they stay out of the market or fix their problems).
If one enterprise has the right to be listed in the
documentation, all of them might, as you will never be favouring one of
them.You are looking at this the wrong way. This isn't about *any*
enterprise. It is about a PostgreSQL Solution. There happens to be two
or three known working open source solutions, and two or three known
working commercial solutions.
(see first three paragraphs)
That's the main motivation to write this. Moreover, if there are also
commercial solutions for high-end installs and they are cited as
providers to those solutions, it (to a point) disencourages those of
gathering themselves and writing open source extensions to PostgreSQL.No it doesn't. Because there is always the, "It want's to be free!" crowd.
Yes, I agree there are. But also development in *that* cutting-edge is
scarce. It feels that something had filled the gap if you list some
commercial solution, mainly people in the trenches (DBAs). They would,
obviously, firstly seek the commercial solutions as they are interested.
So they click 'commercial products' in the main website.
If people (who read the documentation) professionally work with
PostgreSQL, they may already have been briefed by those commercial
offerings in some way.Maybe, maybe not.
Sincerely,
Joshua D. Drake
And I agree with your point, still. However, that would open a precedent
for people to have to maintain lists of stable software in every
documentation area.
Regards,
Cesar
On Wed, Oct 25, 2006 at 05:46:33PM -0400, Bruce Momjian wrote:
Josh Berkus wrote:
So, like www.postgresql.org/docs/techdocs/replication? That would work.
Yes.
I like that idea, but I think that the URL needs to be decided upon,
needs to be stable, and needs to be put into the docs. (I don't see
it ATM, I guess because the URL isn't chosen yet?) We get so many
questions about "what replication system" that I'm sure people are
looking for outlines.
A
--
Andrew Sullivan | ajs@crankycanuck.ca
In the future this spectacle of the middle classes shocking the avant-
garde will probably become the textbook definition of Postmodernism.
--Brad Holland
With no new additions submitted today, I have moved my text into our
SGML documentation:
http://momjian.us/main/writings/pgsql/sgml/failover.html
Please let me know what additional changes are needed.
---------------------------------------------------------------------------
bruce wrote:
Richard Troy wrote:
Here is a new replication documentation section I want to add for 8.2:
ftp://momjian.us/pub/postgresql/mypatches/replication
...Read the document, as promissed...
First paragraph, "(fail over)" is inconsistent with title, "failover", as
are other spots throughout the document. The whole document should be
consistent and I vote for "failover" and not "fail over."OK. Fixed to "failover"
Fourth paragraph, "This "sync problem" is the fundamental difficulty for
servers working together"; "Sync problem" hasn't been defined. Actually,
you're talking about the consistent attribute of the "acid" properties of
all competent databases: Atomic, Consistency, Isolation, and Durability.
At least define the term you are using - probably most easily done in the
preceeding paragraph.OK, "sync problem" term removed, and spelled out fully.
The fifth paragraph needs a lot more help, I think. Howabout this
alternative:So called "two phaised commit" was developed as a strategy in which two or
more databases are updated simultaneously and none of the data is
committed until all are committed. This guarantees consistency between the
databases with all propagation delay being absorbed by the writer at write
time. There are times when this propagation delay is large, so sometimes
alternatives are worked out which we'll call here "asynchronous updates,"
however, in these cases, there is always a window of time in which some
transaction can be lost should a failure occurr. For this reason,
asynchronous updates are only used when the possibility of such losses is
acceptible.I have modified the paragraph to use some of your terms.
Paragraphs six through to "shared disk failover" seem very awkward to me.
I don't like them at all."Shared disk failover" has nothing to do with "the sync problem" as it's
not a multiple-database solution. It's an uptime, "24 X 7 X 365" issue.
Further, it also has nothing to do with disk arrays, though it is often
used with RAID to help avoid disk based corruption problems.Yes, please see updated version. I removed the sync problem term from
there.The point about Warm Standby needs to include a warning about WAL that it
MUST be sensitive to the semantics of the database design or else it's
fatally flawed. I'm talking about "referential integrety". That is to say,
it's inappropriate to capture updates on a table by table basis, as some
such systems do, (I have no idea what's done by anyone in the PG world on
this right now) because an update to one table (esp. inserts) very often
go hand in glove with updates in other tables and to get one without the
other can corrupt a database.We don't have that problem. We recover only full transactions.
The description of "Continuously running replication server" should
include the critical caveat - repeated if you think it's already said
elsewhere - that it is ONLY suitable for applications in which a loss of
(missing) update data doesn't matter. For example, an airline reservation
system would be an inappropriate application for such a "solution" because
what seats are available cannot be guaranteed to be correct.I have added note about data loss for the Slony item.
Regarding data partitioning, I strongly disagree with the opening sentence
in that it doesn't split a database into sets, it splits tables into sets.OK, changed.
Data partitioning is often done within a single database on a single
server and therefore, as a concept, has nothing whatsoever to do with
different servers. Similarly, the second paragraph of this section isUh, why would someone split things up like that on a single server?
problematic. Please define your term first, then talk about some
implementations - this is muddying the water. Further, there are both
vertical and horizontal partitioning - you mention neither - and each has
its own distinct uses. If partitioning is mentioned, it should be more
complete.Uh, what exactly needs to be defined.
Next, Query Broadcast Load Balancing... also needs a lot of work. First,
it's foremost in my memory that sending read queries everywhere and
returning the first result set back is a key way to improve application
performance at the cost of additional load on other systems - I guess
that's not at all what the document is after here, but it's a worthy part
of a dialogue on broadcasting queries. In other words, this has more parts
to it than just what the document now entertains. Secondly, the documentUh, do we want to go into that here? I guess I could.
doesn't address _at_all_ whether this is a two-phaise-commit environment
or not. If not, how are updates managed? If each server operates
independently and one of them fails, what do you do then? How do you know
_any_ server got an insert/update? ... Each server _can't_ operate
independently unless the application does its own insert/update commits to
every one of them - and that can't be fast, nor does it load balance,
though it may contribute to superior uptime performance by the
application.I think having the application middle layer do the commits is how it
works now. Can someone explain how pgpool works, or should we mention
how two-phase commit has to be done here? pgpool2 has additional
features.Next up; I'm not aware of any current products or projects that provide
parallel query execution, though Informix might - I can ask a colleague or
two. Either way, it's probably best to simply define the term (perhaps in
a little more detail), and not mention solutions - they change with time
anyway.Actually, Bizgres MPP, based on PostgreSQL, does this, but mostly for
read-only queries.While I've never used Oracle's clustering tools, I've read up on them and
have customers who use them, and I think this description of Oracle
clustering is a mis-read on what the Oracle system actually does. A check
with a true Oracle clustering expert is in order here.OK, would someone please comment?
Hope this helps. If asked, I'm willing to (re)write some of the bits
discussed above.Yes, please review the URL and let me know what else to change. Thanks.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com+ If your life is a hard drive, Christ can be your backup. +
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Import Notes
Reply to msg id not found: | Resolved by subject fallback
On Wed, Oct 25, 2006 at 08:42:07PM -0400, Bruce Momjian wrote:
Jim C. Nasby wrote:
Something else worth doing though is to have a paragraph explaining why
there's no built-in replication. I don't have time to write something
right now, but I can do it later tonight if no one beats me to it.I thought that was implied in the early paragraph about why there are
many solutions.
I think we should explicitely spell it out, especially considering how
many times people ask about it. How about...
This multitude of choices is why PostgreSQL does not ship with a
replication solution by default; any bundled solution would only
satisfy a subset of replication needs.
(sorry for the non-standard patch, but anoncvs isn't sync'd up yet).
--
Jim Nasby jim@nasby.net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)
Attachments:
patchtext/plain; charset=us-asciiDownload
*** failover.sgml.org Thu Oct 26 10:32:45 2006
--- failover.sgml Thu Oct 26 10:55:03 2006
***************
*** 29,35 ****
working together. Because there is no single solution that eliminates
the impact of the sync problem for all use cases, there are multiple
solutions. Each solution addresses this problem in a different way, and
! minimizes its impact for a specific workload.
</para>
<para>
--- 29,37 ----
working together. Because there is no single solution that eliminates
the impact of the sync problem for all use cases, there are multiple
solutions. Each solution addresses this problem in a different way, and
! minimizes its impact for a specific workload. This multitude of choices is
! why PostgreSQL does not ship with a replication solution by default; any
! bundled solution would only satisfy a subset of replication needs.
</para>
<para>
Jim C. Nasby wrote:
On Wed, Oct 25, 2006 at 08:42:07PM -0400, Bruce Momjian wrote:
Jim C. Nasby wrote:
Something else worth doing though is to have a paragraph explaining why
there's no built-in replication. I don't have time to write something
right now, but I can do it later tonight if no one beats me to it.I thought that was implied in the early paragraph about why there are
many solutions.I think we should explicitely spell it out, especially considering how
many times people ask about it. How about...This multitude of choices is why PostgreSQL does not ship with a
replication solution by default; any bundled solution would only
satisfy a subset of replication needs.
The problem is that we do have some solutions in our code, like doing
data partitioning in the application, warm standby, or using a shared
disk for failover, so how do we spell that out? I say there are
multiple solutions, but I don't see how I can say that all are external
and not included.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Bruce Momjian wrote:
Jim C. Nasby wrote:
On Wed, Oct 25, 2006 at 08:42:07PM -0400, Bruce Momjian wrote:
Jim C. Nasby wrote:
Something else worth doing though is to have a paragraph explaining why
there's no built-in replication. I don't have time to write something
right now, but I can do it later tonight if no one beats me to it.I thought that was implied in the early paragraph about why there are
many solutions.I think we should explicitely spell it out, especially considering how
many times people ask about it. How about...This multitude of choices is why PostgreSQL does not ship with a
replication solution by default; any bundled solution would only
satisfy a subset of replication needs.The problem is that we do have some solutions in our code, like doing
data partitioning in the application, warm standby, or using a shared
disk for failover, so how do we spell that out? I say there are
multiple solutions, but I don't see how I can say that all are external
and not included.
None of those are replication solutions. So I would have to agree with
Jim here.
This isn't about what people do with their app, so that is not relevant.
Warm standby is PITR which is a backup and recovery solution. It does
not include a failover solution and is *not* replication. It technically
does not provide an HA solution either as it will be almost always
farther behind than a replication solution.
Shared disk for failover could be used by anything it isn't special to a
replication scenario it is standard for many HA.
Sincerely,
Joshua D. Drake
--
=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
Joshua D. Drake wrote:
Bruce Momjian wrote:
Jim C. Nasby wrote:
On Wed, Oct 25, 2006 at 08:42:07PM -0400, Bruce Momjian wrote:
Jim C. Nasby wrote:
Something else worth doing though is to have a paragraph explaining why
there's no built-in replication. I don't have time to write something
right now, but I can do it later tonight if no one beats me to it.I thought that was implied in the early paragraph about why there are
many solutions.I think we should explicitely spell it out, especially considering how
many times people ask about it. How about...This multitude of choices is why PostgreSQL does not ship with a
replication solution by default; any bundled solution would only
satisfy a subset of replication needs.The problem is that we do have some solutions in our code, like doing
data partitioning in the application, warm standby, or using a shared
disk for failover, so how do we spell that out? I say there are
multiple solutions, but I don't see how I can say that all are external
and not included.None of those are replication solutions. So I would have to agree with
Jim here.This isn't about what people do with their app, so that is not relevant.
Warm standby is PITR which is a backup and recovery solution. It does
not include a failover solution and is *not* replication. It technically
does not provide an HA solution either as it will be almost always
farther behind than a replication solution.Shared disk for failover could be used by anything it isn't special to a
replication scenario it is standard for many HA.
The section is no longer titled only "replication", but is now
"Failover, Replication, Load Balancing, and Clustering Options", so it
is more a catch-all, and hence saying nothing is included doesn't make
sense. You could say no "replication" is included, but replication is
only one part of the section, so where do you put that, and why is it
worth it?
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
On Wed, 25 Oct 2006, Josh Berkus wrote:
Bruce,
It isn't designed for that. It is designed for people to understand
what they want, and then they can look around for solutions. I think
most agree we don't want a list of solutions in the documentation,
though I have a few as examples.Do they? I've seen no discussion of the matter. I think we should have
them.
I completely agree; If you want to attract competent people from the
business world, one thing you have to do is respect their time by helping
them find information, especially about things they don't know exist. All
that's needed are pointers, but the pointers need to be to solid
documents/resources, not just the top of a heap - if you'll forgive the
pun.
Richard
--
Richard Troy, Chief Scientist
Science Tools Corporation
510-924-1363 or 202-747-1263
rtroy@ScienceTools.com, http://ScienceTools.com/
The documentation comes with the open source tarball.
Yuck.
I would welcome if the docs point to an unofficial wiki (maintained
externally from authoritative PostgreSQL developers) or a website
listing them and giving a brief of each solution.postgresql.org already does this for events (commercial training!) and
news. Point to postgresql.org/download/commercial as there *already* are
brief descriptions, pricing and website links.
I wouldn't have looked in "download" for such a thing. Nor would I expect
everyone with a Postgres related solution to want to post it on
PosgreSql.org for download.
However I agree that a simple web page listing such things is needed. It's
easy to manage - way easier to manage than the development of a competent
relational database engine! It's just a bunch of text, after all, and
errors aren't that critical and will tend to self-correct through user
attention.
You list the ones that are stable in their existence (commercial or not).
And how would you determine it? Years of existance? Contribution to
PostgreSQL's source code? It is not easy and wouldn't be fair. There are
ones that certainly will be listed, and other doubtful ones (which would
perhaps complain, that's why I said 'all' - if they are not stable,
either they stay out of the market or fix their problems).
You have to just trust people. If it's clear that "this isn't
PostgreSql.org", stuff can be unstable, etc - it isn't the group's
problem.
No it doesn't. Because there is always the, "It want's to be free!" crowd.
Yes, I agree there are. But also development in *that* cutting-edge is
scarce. It feels that something had filled the gap if you list some
commercial solution, mainly people in the trenches (DBAs). They would,
obviously, firstly seek the commercial solutions as they are interested.
So they click 'commercial products' in the main website.
Not necessarily. Most times, I'll seek the better solution, which may or
may not be commercial. Sometimes I'll avoid a commercial version because I
don't like the company!
... But getting genuine donations of time - without direct $$
self-interest attached, is a whole nother kettle o fish. For example,
there are a lot of students out there that are excellent and would love to
have a mechanism to gain something for their resumes before entering the
business world. ...There might be some residual interest at UCB, for
example. Attracting this kind of support is a completely different
dialogue, but on _this_ topic, surely seeking the "it wants to be free!"
crowd can't (or shouldn't, in my view) be used as an excuse for not
publishing pointers to commercial soltions that involve PostgreSql. Do it
already!
If people (who read the documentation) professionally work with
PostgreSQL, they may already have been briefed by those commercial
offerings in some way.Maybe, maybe not.
The "may" is a wiggler; sounds like an excuse with a back door. The real
answer is "probably not!" I'm in that world. I haven't been briefed. Ever.
And I agree with your point, still. However, that would open a precedent
for people to have to maintain lists of stable software in every
documentation area.
All that's needed is ONE list, with clear disclaimer. It'll be all text
and links, and maybe the odd small .gif logo, if permitted, so it won't be
a huge thing. Come on now, are there thousands of such products? Tens
sounds more plausible.
Regards,
Richard
--
Richard Troy, Chief Scientist
Science Tools Corporation
510-924-1363 or 202-747-1263
rtroy@ScienceTools.com, http://ScienceTools.com/
On Thu, Oct 26, 2006 at 11:59:57AM -0400, Bruce Momjian wrote:
Jim C. Nasby wrote:
On Wed, Oct 25, 2006 at 08:42:07PM -0400, Bruce Momjian wrote:
Jim C. Nasby wrote:
Something else worth doing though is to have a paragraph explaining why
there's no built-in replication. I don't have time to write something
right now, but I can do it later tonight if no one beats me to it.I thought that was implied in the early paragraph about why there are
many solutions.I think we should explicitely spell it out, especially considering how
many times people ask about it. How about...This multitude of choices is why PostgreSQL does not ship with a
replication solution by default; any bundled solution would only
satisfy a subset of replication needs.The problem is that we do have some solutions in our code, like doing
data partitioning in the application, warm standby, or using a shared
disk for failover, so how do we spell that out? I say there are
multiple solutions, but I don't see how I can say that all are external
and not included.
Good point... how about this?
--
Jim Nasby jim@nasby.net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)
Attachments:
patchtext/plain; charset=us-asciiDownload
Index: doc/src/sgml/failover.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/failover.sgml,v
retrieving revision 1.2
diff -c -r1.2 failover.sgml
*** doc/src/sgml/failover.sgml 26 Oct 2006 17:07:03 -0000 1.2
--- doc/src/sgml/failover.sgml 26 Oct 2006 18:26:21 -0000
***************
*** 29,35 ****
working together. Because there is no single solution that eliminates
the impact of the sync problem for all use cases, there are multiple
solutions. Each solution addresses this problem in a different way, and
! minimizes its impact for a specific workload.
</para>
<para>
--- 29,40 ----
working together. Because there is no single solution that eliminates
the impact of the sync problem for all use cases, there are multiple
solutions. Each solution addresses this problem in a different way, and
! minimizes its impact for a specific workload. A few of these solutions are
! provided with PostgreSQL itself, but it would be impractical for the core
! database to handle every scenario. That is why most solutions are implemented
! outside the database. PostgreSQL's unique extensibility is what allows this
! to happen, and 3rd-party solutions should not be thought of as
! <qoute>second-rate</> simply because they are not bundled with the database.
</para>
<para>
On Thursday 26 October 2006 10:45, Andrew Sullivan wrote:
On Wed, Oct 25, 2006 at 05:46:33PM -0400, Bruce Momjian wrote:
Josh Berkus wrote:
So, like www.postgresql.org/docs/techdocs/replication? That would
work.Yes.
I like that idea, but I think that the URL needs to be decided upon,
needs to be stable, and needs to be put into the docs. (I don't see
it ATM, I guess because the URL isn't chosen yet?) We get so many
questions about "what replication system" that I'm sure people are
looking for outlines.A
Unfortunately the techdocs system won't support a url like the one above,
rather you'll end up with something more like the following
http://www.postgresql.org/docs/techdocs.54 which is the "GUI Tools Guide"
(which is linked in the FAQ fwiw). Once it is in place, it will be stable
though.
--
Robert Treat
Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL
Jim C. Nasby wrote:
On Thu, Oct 26, 2006 at 11:59:57AM -0400, Bruce Momjian wrote:
Jim C. Nasby wrote:
On Wed, Oct 25, 2006 at 08:42:07PM -0400, Bruce Momjian wrote:
Jim C. Nasby wrote:
Something else worth doing though is to have a paragraph explaining why
there's no built-in replication. I don't have time to write something
right now, but I can do it later tonight if no one beats me to it.I thought that was implied in the early paragraph about why there are
many solutions.I think we should explicitely spell it out, especially considering how
many times people ask about it. How about...This multitude of choices is why PostgreSQL does not ship with a
replication solution by default; any bundled solution would only
satisfy a subset of replication needs.The problem is that we do have some solutions in our code, like doing
data partitioning in the application, warm standby, or using a shared
disk for failover, so how do we spell that out? I say there are
multiple solutions, but I don't see how I can say that all are external
and not included.Good point... how about this?
Sorry, that is too preachy, and I have the extensibility issue addressed
in the commerical solutions section.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
On Thu, Oct 26, 2006 at 03:06:13PM -0400, Robert Treat wrote:
Unfortunately the techdocs system won't support a url like the one above,
rather you'll end up with something more like the following
http://www.postgresql.org/docs/techdocs.54 which is the "GUI Tools Guide"
(which is linked in the FAQ fwiw). Once it is in place, it will be stable
though.
Surely this is what redirects were invented for, no?
http://www.postgresql.org/replication redirects to [stable magic URL]
Put the former in the docs.
A
--
Andrew Sullivan | ajs@crankycanuck.ca
Users never remark, "Wow, this software may be buggy and hard
to use, but at least there is a lot of code underneath."
--Damien Katz
On Wed, 25 Oct 2006, Bruce Momjian wrote:
...snip...
Data partitioning is often done within a single database on a single
server and therefore, as a concept, has nothing whatsoever to do with
different servers. Similarly, the second paragraph of this section isUh, why would someone split things up like that on a single server?
problematic. Please define your term first, then talk about some
implementations - this is muddying the water. Further, there are both
vertical and horizontal partitioning - you mention neither - and each has
its own distinct uses. If partitioning is mentioned, it should be more
complete.Uh, what exactly needs to be defined.
OK, "Data partitioning"; data partitioning begins in the RDB world with
the very notion of tables, and we partition our data during schema
development with the goal of "normalizing" the design - "thrid normal
form" being the one most Professors talk about as a target. "Data
partitioning", then, is the intentional denormalization of the design to
accomplish some goal(s) - not all of which are listed in this document's
title. In this context, data partitioning takes two forms based upon which
axis of a two-dimensional table is to be divided, with the vertical
partition dividing attributes (as in a master/detail relationship with
one-to-one mapping), and the horizontal partition dividing based on one or
more attributes domain, or value (as in your example of London records
being kept in a database in London, while Paris records are kept in
Paris).
The point I was making was that that section of the document was in err
because it presumed there was only one form of data partitioning and that
it was horizontal. (The document is now missing, so I can't look at the
current content - it was here:
ftp://momjian.us/pub/postgresql/mypatches/replication.)
In answer to your query about why someone would use such partitioning, the
nearly universal answer is performance, and the distant second answer is
security. In one example that comes immediately to mind, there is a table
which is a central core of an application, and, as such, there's a lot to
say about the items in this table. The table's size is in the tens to
hundreds of millions of rows, and needs to be joined with something else
in a huge fraction of queries. For performance reasons, the tables size
was therefore kept as tiny as possible and detail table(s) is(are) used
for the remaining attributes that logically belong in the table - it's a
vertical partition. It's an exceptionally common technique - so common, it
probably didn't occur to you that you were even talking about it when you
spoke of "data partitioning."
Next, Query Broadcast Load Balancing... also needs a lot of work. First,
it's foremost in my memory that sending read queries everywhere and
returning the first result set back is a key way to improve application
performance at the cost of additional load on other systems - I guess
that's not at all what the document is after here, but it's a worthy part
of a dialogue on broadcasting queries. In other words, this has more parts
to it than just what the document now entertains. Secondly, the documentUh, do we want to go into that here? I guess I could.
doesn't address _at_all_ whether this is a two-phaise-commit environment
or not. If not, how are updates managed? If each server operates
independently and one of them fails, what do you do then? How do you know
_any_ server got an insert/update? ... Each server _can't_ operate
independently unless the application does its own insert/update commits to
every one of them - and that can't be fast, nor does it load balance,
though it may contribute to superior uptime performance by the
application.I think having the application middle layer do the commits is how it
works now. Can someone explain how pgpool works, or should we mention
how two-phase commit has to be done here? pgpool2 has additional
features.
Well, you hadn't mentioned two phaise commit at all and it surely belong
somewhere in this document - it's a core PG feature and enables a lot of
alternative solutions which the document discusses.
What it needs to say but doesn't (didn't?) is that the load from read
queries can be distributed for load balancing purposes but that there's no
benefit possible for writes, and that replication overhead costs could
possibly overwhelm the benefits in high-update scenarios. The point that
each server operates independently is only true if you ignore the the
necessary replication - which, to my mind, links the systems and they are
not independent. ...I suppose that in a completely read-only environment -
or updated nightly by dumping tarwads or something like that, they could
be considered independent, but it's hardly worth the sentence.
Regards,
Richard
--
Richard Troy, Chief Scientist
Science Tools Corporation
510-924-1363 or 202-747-1263
rtroy@ScienceTools.com, http://ScienceTools.com/
bruce@momjian.us (Bruce Momjian) writes:
With no new additions submitted today, I have moved my text into our
SGML documentation:http://momjian.us/main/writings/pgsql/sgml/failover.html
Please let me know what additional changes are needed.
It's looking a lot improved to me...
There are still numerous places where it needs s/Slony/Slony-I/g
because there is more than one thing out there called "Slony," only
one of which is the single-master-to-multiple-subscribers-asynchronous
replication system...
<http://momjian.us/main/writings/pgsql/sgml/query-broadcast-load-balancing.html>
"This can be complex to set up because functions like random() and
CURRENT_TIMESTAMP will have different values on different servers, and
sequences should be consistent across servers."
It doesn't make sense to call this "complex to set up." This problem
isn't about complexity of setup; it is about whether updates are
processed identically on different hosts.
Perhaps better:
"Query broadcasting can break down such that servers fall out of sync
if the queries have nondeterministic behavior. For instance,
functions like random(), CURRENT_TIMESTAMP, and
nextval('some_sequence') will take on different values on different
servers. Care must be taken at the application level to make sure
that queries are all fully deterministic and that they either COMMIT
or ABORT on all servers."
<http://momjian.us/main/writings/pgsql/sgml/clustering-for-load-balancing.html>
"24.6. Clustering For Load Balancing
In clustering, each server can accept write requests, and these write
requests are broadcast from the original server to all other servers
before each transaction commits. Under heavy load, this can cause
excessive locking and performance degradation. It is implemented by
Oracle in their RAC product. PostgreSQL does not offer this type of
load balancing, though PostgreSQL two-phase commit can be used to
implement this in application code or middleware."
Something doesn't feel entirely right here...
How about...
"24.6. Multimaster Replication For Load Balancing
In this scenario, each server can accept write requests, which are
broadcast from the original server to all other servers before each
transaction commits in order to ensure consistency. Unfortunately,
under heavy load, the cost of distributing locks across servers can
lead to substantial performance degradation. It is implemented by
Oracle in their RAC product. PostgreSQL does not offer this type of
load balancing, though PostgreSQL two-phase commit using <xref
linkend="sql-prepare-transaction-title"> and <xref linkend=
"sql-commit-prepared-title"> may be used to implement this in
application code or middleware.
The communications costs involved in distributing locks and writes
have the result that write operations are considerably more expensive
than they would be on a single server. In general, the cost of
distributed locking means that this clustering approach is only usable
across a cluster of servers at a local site.
There will only be a performance "win" if the cluster mostly processes
read-only traffic that the cluster can distribute across a larger
number of database servers. Write performance generally degrades a
fair bit as compared to using a single database server. Reliability
should be enhanced since the cluster should be able to continue work
even if some of the members of the cluster should fail."
<http://momjian.us/main/writings/pgsql/sgml/clustering-for-parallel-query-execution.html>
"24.7. Clustering For Parallel Query Execution
This allows multiple servers to work on a single query. One possible
way this could work is for the data to be split among servers and for
each server to execute its part of the query and results sent to a
central server to be combined and returned to the user. There
currently is no PostgreSQL open source solution for this."
This seems a bit thin.
"24.7. Clustering For Parallel Query Execution
This allows multiple servers to work concurrently on a single query,
analagous to the way RAID permits multiple disk drives to respond
concurrently to disk I/O requests.
One way this could work is for the data to be partitioned across the
servers, where each server executes its part of the query, submitting
results to a central server to be combined and returned to the user.
There currently is no PostgreSQL open source solution for this."
--
select 'cbbrowne' || '@' || 'acm.org';
http://cbbrowne.com/info/advocacy.html
Why do we put suits in a garment bag, and put garments in a suitcase?
Chris Browne wrote:
bruce@momjian.us (Bruce Momjian) writes:
With no new additions submitted today, I have moved my text into our
SGML documentation:http://momjian.us/main/writings/pgsql/sgml/failover.html
Please let me know what additional changes are needed.
It's looking a lot improved to me...
There are still numerous places where it needs s/Slony/Slony-I/g
because there is more than one thing out there called "Slony," only
one of which is the single-master-to-multiple-subscribers-asynchronous
replication system...
Fixed.
<http://momjian.us/main/writings/pgsql/sgml/query-broadcast-load-balancing.html>
"This can be complex to set up because functions like random() and
CURRENT_TIMESTAMP will have different values on different servers, and
sequences should be consistent across servers."It doesn't make sense to call this "complex to set up." This problem
isn't about complexity of setup; it is about whether updates are
processed identically on different hosts.Perhaps better:
"Query broadcasting can break down such that servers fall out of sync
if the queries have nondeterministic behavior. For instance,
functions like random(), CURRENT_TIMESTAMP, and
nextval('some_sequence') will take on different values on different
servers. Care must be taken at the application level to make sure
that queries are all fully deterministic and that they either COMMIT
or ABORT on all servers."
I redid the section with:
Because each server operates independently, functions like
<function>random()</>, <function>CURRENT_TIMESTAMP</>, and
sequences can have different values on different servers. If
this is unacceptable, applications must query such values from
a single server and then use those values in write queries.
Also, care must also be taken that all transactions either commit
or abort on all servers Pgpool is an example of this type of
replication.
<http://momjian.us/main/writings/pgsql/sgml/clustering-for-load-balancing.html>
"24.6. Clustering For Load BalancingIn clustering, each server can accept write requests, and these write
requests are broadcast from the original server to all other servers
before each transaction commits. Under heavy load, this can cause
excessive locking and performance degradation. It is implemented by
Oracle in their RAC product. PostgreSQL does not offer this type of
load balancing, though PostgreSQL two-phase commit can be used to
implement this in application code or middleware."Something doesn't feel entirely right here...
How about...
"24.6. Multimaster Replication For Load Balancing
In this scenario, each server can accept write requests, which are
broadcast from the original server to all other servers before each
transaction commits in order to ensure consistency. Unfortunately,
under heavy load, the cost of distributing locks across servers can
lead to substantial performance degradation. It is implemented by
Oracle in their RAC product. PostgreSQL does not offer this type of
load balancing, though PostgreSQL two-phase commit using <xref
linkend="sql-prepare-transaction-title"> and <xref linkend=
"sql-commit-prepared-title"> may be used to implement this in
application code or middleware.The communications costs involved in distributing locks and writes
have the result that write operations are considerably more expensive
than they would be on a single server. In general, the cost of
distributed locking means that this clustering approach is only usable
across a cluster of servers at a local site.There will only be a performance "win" if the cluster mostly processes
read-only traffic that the cluster can distribute across a larger
number of database servers. Write performance generally degrades a
fair bit as compared to using a single database server. Reliability
should be enhanced since the cluster should be able to continue work
even if some of the members of the cluster should fail."
Your description was too detailed, but I took some of your concepts:
<para>
In clustering, each server can accept write requests, and these
write requests are broadcast from the original server to all
other servers before each transaction commits. Heavy write
activity can cause excessive locking, leading to poor performance.
In fact, write performance is often worse than that of a single
server. Read requests can be sent to any server. Clustering
is best for mostly read workloads, though its big advantage is
that any server can accept write requests --- there is no need
to partition workloads between read/write and read-only servers.
</para>
<para>
Clustering is implemented by <productname>Oracle</> in their
<productname><acronym>RAC</></> product. <productname>PostgreSQL</>
does not offer this type of load balancing, though
<productname>PostgreSQL</> two-phase commit (<xref
linkend="sql-prepare-transaction-title"> and <xref linkend=
"sql-commit-prepared-title">) can be used to implement this in
application code or middleware.
</para>
<http://momjian.us/main/writings/pgsql/sgml/clustering-for-parallel-query-execution.html>
"24.7. Clustering For Parallel Query Execution
This allows multiple servers to work on a single query. One possible
way this could work is for the data to be split among servers and for
each server to execute its part of the query and results sent to a
central server to be combined and returned to the user. There
currently is no PostgreSQL open source solution for this."This seems a bit thin.
"24.7. Clustering For Parallel Query Execution
This allows multiple servers to work concurrently on a single query,
analagous to the way RAID permits multiple disk drives to respond
concurrently to disk I/O requests.One way this could work is for the data to be partitioned across the
servers, where each server executes its part of the query, submitting
results to a central server to be combined and returned to the user.
There currently is no PostgreSQL open source solution for this."
I took some of your wording:
This allows multiple servers to work concurrently on a single
query. One possible way this could work is for the data to be
split among servers and for each server to execute its part of
the query and results sent to a central server to be combined
and returned to the user. There currently is no
<productname>PostgreSQL</> open source solution for this.
Because RAID is often used for high availability, I thought mentioning
it in this context was too complicated.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
On Tue, 14 Nov 2006, Bruce Momjian wrote:
Your description was too detailed, but I took some of your concepts:
<para>
In clustering, each server can accept write requests, and these
write requests are broadcast from the original server to all
other servers before each transaction commits. Heavy write
activity can cause excessive locking, leading to poor performance.
In fact, write performance is often worse than that of a single
server. Read requests can be sent to any server. Clustering
is best for mostly read workloads, though its big advantage is
that any server can accept write requests --- there is no need
to partition workloads between read/write and read-only servers.
</para><para>
Clustering is implemented by <productname>Oracle</> in their
<productname><acronym>RAC</></> product. <productname>PostgreSQL</>
does not offer this type of load balancing, though
<productname>PostgreSQL</> two-phase commit (<xref
linkend="sql-prepare-transaction-title"> and <xref linkend=
"sql-commit-prepared-title">) can be used to implement this in
application code or middleware.
</para>
Bruce,
Continuent's uni/cluster middleware product implements this type of
clustering/load balancing. Perhaps it warrants a mention? Not sure how far
we want to get into listing external products.
--
Jeff Frost, Owner <jeff@frostconsultingllc.com>
Frost Consulting, LLC http://www.frostconsultingllc.com/
Phone: 650-780-7908 FAX: 650-649-1954
Jeff Frost wrote:
On Tue, 14 Nov 2006, Bruce Momjian wrote:
Your description was too detailed, but I took some of your concepts:
<para>
In clustering, each server can accept write requests, and these
write requests are broadcast from the original server to all
other servers before each transaction commits. Heavy write
activity can cause excessive locking, leading to poor performance.
In fact, write performance is often worse than that of a single
server. Read requests can be sent to any server. Clustering
is best for mostly read workloads, though its big advantage is
that any server can accept write requests --- there is no need
to partition workloads between read/write and read-only servers.
</para><para>
Clustering is implemented by <productname>Oracle</> in their
<productname><acronym>RAC</></> product. <productname>PostgreSQL</>
does not offer this type of load balancing, though
<productname>PostgreSQL</> two-phase commit (<xref
linkend="sql-prepare-transaction-title"> and <xref linkend=
"sql-commit-prepared-title">) can be used to implement this in
application code or middleware.
</para>Bruce,
Continuent's uni/cluster middleware product implements this type of
clustering/load balancing. Perhaps it warrants a mention? Not sure how far
we want to get into listing external products.
We had a long discussion about that and felt that recommending
commercial products or even every open source project was too much. The
idea was that we should reference a web page that has them all mentioned,
but no one has set one up yet.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
On Tue, 14 Nov 2006, Bruce Momjian wrote:
Jeff Frost wrote:
On Tue, 14 Nov 2006, Bruce Momjian wrote:
Your description was too detailed, but I took some of your concepts:
<para>
In clustering, each server can accept write requests, and these
write requests are broadcast from the original server to all
other servers before each transaction commits. Heavy write
activity can cause excessive locking, leading to poor performance.
In fact, write performance is often worse than that of a single
server. Read requests can be sent to any server. Clustering
is best for mostly read workloads, though its big advantage is
that any server can accept write requests --- there is no need
to partition workloads between read/write and read-only servers.
</para><para>
Clustering is implemented by <productname>Oracle</> in their
<productname><acronym>RAC</></> product. <productname>PostgreSQL</>
does not offer this type of load balancing, though
<productname>PostgreSQL</> two-phase commit (<xref
linkend="sql-prepare-transaction-title"> and <xref linkend=
"sql-commit-prepared-title">) can be used to implement this in
application code or middleware.
</para>Bruce,
Continuent's uni/cluster middleware product implements this type of
clustering/load balancing. Perhaps it warrants a mention? Not sure how far
we want to get into listing external products.We had a long discussion about that and felt that recommending
commercial products or even every open source project was too much. The
idea was that we should reference a web page that has them all mentioned,
but no one has set one up yet.
That makes sense, I just hate to see us say something like "Oracle can do
this with RAC but PostgreSQL cannot."
--
Jeff Frost, Owner <jeff@frostconsultingllc.com>
Frost Consulting, LLC http://www.frostconsultingllc.com/
Phone: 650-780-7908 FAX: 650-649-1954
Jeff Frost wrote:
<para>
Clustering is implemented by <productname>Oracle</> in their
<productname><acronym>RAC</></> product. <productname>PostgreSQL</>
does not offer this type of load balancing, though
<productname>PostgreSQL</> two-phase commit (<xref
linkend="sql-prepare-transaction-title"> and <xref linkend=
"sql-commit-prepared-title">) can be used to implement this in
application code or middleware.
</para>Bruce,
Continuent's uni/cluster middleware product implements this type of
clustering/load balancing. Perhaps it warrants a mention? Not sure how far
we want to get into listing external products.We had a long discussion about that and felt that recommending
commercial products or even every open source project was too much. The
idea was that we should reference a web page that has them all mentioned,
but no one has set one up yet.That makes sense, I just hate to see us say something like "Oracle can do
this with RAC but PostgreSQL cannot."
Agreed. I think we would mention any PostgreSQL solution for this, even
if it is not open source. We mention solutions as examples in this part
of the documentation.
FYI, as far as I know, Continuent's solution is "Query Broadcast Load
Balancing", not clustering.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
On Tue, 14 Nov 2006, Bruce Momjian wrote:
We had a long discussion about that and felt that recommending
commercial products or even every open source project was too much. The
idea was that we should reference a web page that has them all mentioned,
but no one has set one up yet.That makes sense, I just hate to see us say something like "Oracle can do
this with RAC but PostgreSQL cannot."Agreed. I think we would mention any PostgreSQL solution for this, even
if it is not open source. We mention solutions as examples in this part
of the documentation.FYI, as far as I know, Continuent's solution is "Query Broadcast Load
Balancing", not clustering.
I would speculate that your terminology is slightly more accurate than mine.
The do query broadcast, but they also do a bit more with it than that as they
evaluate many of the non deterministic write queries on a particular server
and update the broadcast query so each db gets the same value.
I guess middleware of this sort automatically ends up in the query broadcast
category. It just sounds awfully similar to the description of cluster for
load balancing:
In clustering, each server can accept write requests, and these write requests
are broadcast from the original server to all other servers before each
transaction commits.
I guess it's kind of a fine line how it gets defined?
--
Jeff Frost, Owner <jeff@frostconsultingllc.com>
Frost Consulting, LLC http://www.frostconsultingllc.com/
Phone: 650-780-7908 FAX: 650-649-1954
Jeff Frost wrote:
FYI, as far as I know, Continuent's solution is "Query Broadcast Load
Balancing", not clustering.I would speculate that your terminology is slightly more accurate than mine.
The do query broadcast, but they also do a bit more with it than that as they
evaluate many of the non deterministic write queries on a particular server
and update the broadcast query so each db gets the same value.I guess middleware of this sort automatically ends up in the query broadcast
category. It just sounds awfully similar to the description of cluster for
load balancing:In clustering, each server can accept write requests, and these write requests
are broadcast from the original server to all other servers before each
transaction commits.I guess it's kind of a fine line how it gets defined?
Hmmm. Interesting. Does anyone else have details or an opinion on
this? The fact that there is something sitting above the servers seems
to be the defining issue of calling it query broadcast.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
On Tue, 14 Nov 2006, Bruce Momjian wrote:
In clustering, each server can accept write requests, and these write requests
are broadcast from the original server to all other servers before each
transaction commits.I guess it's kind of a fine line how it gets defined?
Hmmm. Interesting. Does anyone else have details or an opinion on
this? The fact that there is something sitting above the servers seems
to be the defining issue of calling it query broadcast.
My thinking on the definition of clustering was that there is some smarts for
graceful failover and automated or semi-automated ways of bringing failed DB
servers back up to date and online with the rest of the servers in the
cluster. All servers need to be able to accept writes, but do we
differentiate on where the writes originated (i.e. middleware or another
postgresql server) or on functionality?
--
Jeff Frost, Owner <jeff@frostconsultingllc.com>
Frost Consulting, LLC http://www.frostconsultingllc.com/
Phone: 650-780-7908 FAX: 650-649-1954
Jeff Frost wrote:
On Tue, 14 Nov 2006, Bruce Momjian wrote:
In clustering, each server can accept write requests, and these write requests
are broadcast from the original server to all other servers before each
transaction commits.I guess it's kind of a fine line how it gets defined?
Hmmm. Interesting. Does anyone else have details or an opinion on
this? The fact that there is something sitting above the servers seems
to be the defining issue of calling it query broadcast.My thinking on the definition of clustering was that there is some smarts for
graceful failover and automated or semi-automated ways of bringing failed DB
servers back up to date and online with the rest of the servers in the
cluster. All servers need to be able to accept writes, but do we
No, even replication servers can have that.
differentiate on where the writes originated (i.e. middleware or another
postgresql server) or on functionality?
Fundamentally, broadcast means the queries are being propogated outside
the server, with the benefits and limitations inherent in that.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
On Tue, 14 Nov 2006, Bruce Momjian wrote:
My thinking on the definition of clustering was that there is some smarts for
graceful failover and automated or semi-automated ways of bringing failed DB
servers back up to date and online with the rest of the servers in the
cluster. All servers need to be able to accept writes, but do weNo, even replication servers can have that.
differentiate on where the writes originated (i.e. middleware or another
postgresql server) or on functionality?Fundamentally, broadcast means the queries are being propogated outside
the server, with the benefits and limitations inherent in that.
I'd definitely have to agree with you on that. I guess I'm trying to decide
what differentiates clustering for load balancing from query broadcast based
on your text. Maybe just don't use the word broadcast here:
"In clustering, each server can accept write requests, and these write
requests are broadcast from the original server to all other servers before
each transaction commits."
Unfortunately, I can't seem to come up with anything more clever.
--
Jeff Frost, Owner <jeff@frostconsultingllc.com>
Frost Consulting, LLC http://www.frostconsultingllc.com/
Phone: 650-780-7908 FAX: 650-649-1954
Jeff Frost wrote:
On Tue, 14 Nov 2006, Bruce Momjian wrote:
My thinking on the definition of clustering was that there is some smarts for
graceful failover and automated or semi-automated ways of bringing failed DB
servers back up to date and online with the rest of the servers in the
cluster. All servers need to be able to accept writes, but do weNo, even replication servers can have that.
differentiate on where the writes originated (i.e. middleware or another
postgresql server) or on functionality?Fundamentally, broadcast means the queries are being propogated outside
the server, with the benefits and limitations inherent in that.I'd definitely have to agree with you on that. I guess I'm trying to decide
what differentiates clustering for load balancing from query broadcast based
on your text. Maybe just don't use the word broadcast here:"In clustering, each server can accept write requests, and these write
requests are broadcast from the original server to all other servers before
each transaction commits."Unfortunately, I can't seem to come up with anything more clever.
Basically, when you are broadcasting outside the server, you are
broadcasting SQL queries, and those queries do not have information
about non-deterministic functions and have issues with universal commits
on all node.
I think I now see your point about using the word "broadcast" for both
clustering and middle-ware broadcast. Let me find some new wording and
repost.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
On Tue, 14 Nov 2006, Bruce Momjian wrote:
"In clustering, each server can accept write requests, and these write
requests are broadcast from the original server to all other servers before
each transaction commits."Unfortunately, I can't seem to come up with anything more clever.
Basically, when you are broadcasting outside the server, you are
broadcasting SQL queries, and those queries do not have information
about non-deterministic functions and have issues with universal commits
on all node.
Ahh..I like this explanation, because the inter-server communication in
clustering is not necessarily SQL queries.
--
Jeff Frost, Owner <jeff@frostconsultingllc.com>
Frost Consulting, LLC http://www.frostconsultingllc.com/
Phone: 650-780-7908 FAX: 650-649-1954
Jeff Frost wrote:
On Tue, 14 Nov 2006, Bruce Momjian wrote:
"In clustering, each server can accept write requests, and these write
requests are broadcast from the original server to all other servers before
each transaction commits."Unfortunately, I can't seem to come up with anything more clever.
Basically, when you are broadcasting outside the server, you are
broadcasting SQL queries, and those queries do not have information
about non-deterministic functions and have issues with universal commits
on all node.Ahh..I like this explanation, because the inter-server communication in
clustering is not necessarily SQL queries.
OK, I have updated the documentation with the attached patch, which
clarifies SQL broadcast vs. modified row propogation. Current version
is at:
http://momjian.us/main/writings/pgsql/sgml/failover.html
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Attachments:
/bjm/difftext/x-diffDownload
Index: doc/src/sgml/failover.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/failover.sgml,v
retrieving revision 1.5
diff -c -c -r1.5 failover.sgml
*** doc/src/sgml/failover.sgml 14 Nov 2006 22:25:15 -0000 1.5
--- doc/src/sgml/failover.sgml 15 Nov 2006 01:06:42 -0000
***************
*** 149,171 ****
<title>Query Broadcast Load Balancing</title>
<para>
! Query broadcast load balancing is accomplished by having a program
! intercept every query and send it to all servers. Read-only queries can
! be sent to a single server because there is no need for all servers to
! process it. This is unusual because most replication solutions have
! each write server propagate its changes to the other servers. With
! query broadcasting, each server operates independently.
</para>
<para>
! Because each server operates independently, functions like
<function>random()</>, <function>CURRENT_TIMESTAMP</>, and
! sequences can have different values on different servers. If
! this is unacceptable, applications must query such values from
! a single server and then use those values in write queries.
! Also, care must also be taken that all transactions either commit
! or abort on all servers Pgpool is an example of this type of
! replication.
</para>
</sect1>
--- 149,173 ----
<title>Query Broadcast Load Balancing</title>
<para>
! Query broadcast load balancing is accomplished by having a
! program intercept every SQL query and send it to all servers.
! This is unique because most replication solutions have the write
! server propagate its changes to the other servers. With query
! broadcasting, each server operates independently. Read-only
! queries can be sent to a single server because there is no need
! for all servers to process it.
</para>
<para>
! One limitation of this solution is that functions like
<function>random()</>, <function>CURRENT_TIMESTAMP</>, and
! sequences can have different values on different servers. This
! is because each server operates independently, and because SQL
! queries are broadcast (and not actual modified rows). If this
! is unacceptable, applications must query such values from a
! single server and then use those values in write queries. Also,
! care must be taken that all transactions either commit or abort
! on all servers Pgpool is an example of this type of replication.
</para>
</sect1>
***************
*** 173,186 ****
<title>Clustering For Load Balancing</title>
<para>
! In clustering, each server can accept write requests, and these
! write requests are broadcast from the original server to all
! other servers before each transaction commits. Heavy write
! activity can cause excessive locking, leading to poor performance.
! In fact, write performance is often worse than that of a single
server. Read requests can be sent to any server. Clustering
is best for mostly read workloads, though its big advantage is
! that any server can accept write requests --- there is no need
to partition workloads between read/write and read-only servers.
</para>
--- 175,188 ----
<title>Clustering For Load Balancing</title>
<para>
! In clustering, each server can accept write requests, and modified
! data is transmitted from the original server to every other
! server before each transaction commits. Heavy write activity
! can cause excessive locking, leading to poor performance. In
! fact, write performance is often worse than that of a single
server. Read requests can be sent to any server. Clustering
is best for mostly read workloads, though its big advantage is
! that any server can accept write requests — there is no need
to partition workloads between read/write and read-only servers.
</para>
Hi,
Jeff Frost wrote:
I would speculate that your terminology is slightly more accurate than mine.
I can't help it, but I'm still thinking the terminology in the
replication documentation is somewhat made up.
Bruce Momjian wrote:
Hmmm. Interesting. Does anyone else have details or an opinion on
this? The fact that there is something sitting above the servers seems
to be the defining issue of calling it query broadcast.
I'd argue that "Query Broadcast Load Balancing" and "Clustering For Load
Balancing" are both the same replication type: sync, multi-master. And
the problem they try to solve is the same (Load Balancing).
Listing them as two different types of replication... I don't know. But
we should at least clearly state that both are sync, multi-master
replication algorithms.
Anyway, instead of mocking around any longer I'm trying to come up with
a better proposal... patch will follow.
Regards
Markus
Bruce Momjian wrote:
Hmmm. Interesting. Does anyone else have details or an opinion on
this? The fact that there is something sitting above the servers
seems to be the defining issue of calling it query broadcast.
Well, clustering is just a general term for putting several things, say,
computers, together to a common cause. If you cluster a database
system, you need some way to distribute the incoming requests across
the machines, which you can either do on the network layer or on the
application layer. Sequoia does the latter. But I don't see
any "broadcasting" in there as a defining quality.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
On Nov 14, 2006, at 5:11 PM, Bruce Momjian wrote:
Basically, when you are broadcasting outside the server, you are
broadcasting SQL queries, and those queries do not have information
about non-deterministic functions and have issues with universal
commits
on all node.
That's true of simple query broadcasting (ie: pgpool), but not true
of Continuent/Sequoia. Continuent's software adds a lot of additional
features on top of simple query broadcasting, making it far more
robust than simply spewing queries out to every node in the cluster.
You still have to be very careful with how you use it, but not nearly
as much as with simpler solutions.
--
Jim Nasby jim@nasby.net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)
Jim,
That's true of simple query broadcasting (ie: pgpool), but not true
of Continuent/Sequoia. Continuent's software adds a lot of additional
features on top of simple query broadcasting, making it far more
robust than simply spewing queries out to every node in the cluster.
You still have to be very careful with how you use it, but not nearly
as much as with simpler solutions.
I think the general term is "statement-based replication", not "broadcasting".
--
Josh Berkus
PostgreSQL @ Sun
San Francisco
Hi,
Josh Berkus wrote:
I think the general term is "statement-based replication", not "broadcasting".
I agree that this is a better description.
Markus
Jim Nasby wrote:
On Nov 14, 2006, at 5:11 PM, Bruce Momjian wrote:
Basically, when you are broadcasting outside the server, you are
broadcasting SQL queries, and those queries do not have information
about non-deterministic functions and have issues with universal
commits
on all node.That's true of simple query broadcasting (ie: pgpool), but not true
of Continuent/Sequoia. Continuent's software adds a lot of additional
features on top of simple query broadcasting, making it far more
robust than simply spewing queries out to every node in the cluster.
You still have to be very careful with how you use it, but not nearly
as much as with simpler solutions.
Yes, I have heard that Continuent/Sequoia has a process running on each
server that deals with many of the problems with broadcasting. Not sure
how I should work that into the documentation. In fact, based on our
description, the improvements Continuent/Sequoia made are probably
clearer.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Josh Berkus wrote:
Jim,
That's true of simple query broadcasting (ie: pgpool), but not true ?
of Continuent/Sequoia. Continuent's software adds a lot of additional ?
features on top of simple query broadcasting, making it far more ?
robust than simply spewing queries out to every node in the cluster. ?
You still have to be very careful with how you use it, but not nearly ?
as much as with simpler solutions.I think the general term is "statement-based replication", not "broadcasting".
Well, the problem is that you can use a statement-based method to
replication from a master to a slave. I think MySQL used to use this
method, or still does, so I don't think the term "statement-based" is
clear enough, though I am open to other terms than "broadcast".
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Bruce Momjian wrote:
Josh Berkus wrote:
Jim,
That's true of simple query broadcasting (ie: pgpool), but not true ?
of Continuent/Sequoia. Continuent's software adds a lot of additional ?
features on top of simple query broadcasting, making it far more ?
robust than simply spewing queries out to every node in the cluster. ?
You still have to be very careful with how you use it, but not nearly ?
as much as with simpler solutions.I think the general term is "statement-based replication", not "broadcasting".
Well, the problem is that you can use a statement-based method to
replication from a master to a slave. I think MySQL used to use this
method, or still does, so I don't think the term "statement-based" is
clear enough, though I am open to other terms than "broadcast".
Oops, I see Markus Schiltknech likes the term "statement-based
replication" better too. Certainly master-slave communication using
"statement-based replication" has the same drawbacks as the broadcast
method, but I wanted to highlight that the broadcast was happening
outside the server. Do we need a master/slave "statement-based
replication" item and a middleware broadcast item?
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Bruce Momjian wrote:
Bruce Momjian wrote:
Josh Berkus wrote:
Jim,
That's true of simple query broadcasting (ie: pgpool), but not true ?
of Continuent/Sequoia. Continuent's software adds a lot of additional ?
features on top of simple query broadcasting, making it far more ?
robust than simply spewing queries out to every node in the cluster. ?
You still have to be very careful with how you use it, but not nearly ?
as much as with simpler solutions.I think the general term is "statement-based replication", not "broadcasting".
Well, the problem is that you can use a statement-based method to
replication from a master to a slave. I think MySQL used to use this
method, or still does, so I don't think the term "statement-based" is
clear enough, though I am open to other terms than "broadcast".Oops, I see Markus Schiltknech likes the term "statement-based
replication" better too. Certainly master-slave communication using
"statement-based replication" has the same drawbacks as the broadcast
method, but I wanted to highlight that the broadcast was happening
outside the server. Do we need a master/slave "statement-based
replication" item and a middleware broadcast item?
OK, new text:
<varlistentry>
<term>Statement-Based Replication</term>
<listitem>
<para>
In statement-based replication, a program intercepts every SQL
query and sends it to all servers. Each server operates
independently. Read-only queries can be sent to a single server
because there is no need for all servers to process it.
</para>
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Good morning Bruce,
Bruce Momjian wrote:
Oops, I see Markus Schiltknech likes the term "statement-based
replication" better too. Certainly master-slave communication using
"statement-based replication" has the same drawbacks as the broadcast
method, but I wanted to highlight that the broadcast was happening
outside the server. Do we need a master/slave "statement-based
replication" item and a middleware broadcast item?
Ah, I see you had a much narrower definition of statement-based
replication in mind. As I've pointed out, there are different
implementations of 'statement-based replication'. I don't know about
sequoia, but Postgres-R fails back to statement based replication in
certain situations. Thus having an external 'program intercept every SQL
query' is absolutely no necessity of this algorithm, it can very well be
done inside the db backend, where you can better catch non-deterministic
functions... but again, that's an implementation detail.
So, do you want to describe pgpool here or do you want to give a more
general description?
<varlistentry>
<term>Statement-Based Replication</term>
<listitem><para>
In statement-based replication, a program intercepts every SQL
query and sends it to all servers. Each server operates
independently. Read-only queries can be sent to a single server
because there is no need for all servers to process it.
</para>
If you want to go for the general description, I think the 'each server
operates independently' is somewhere between confusing and false. And
again, the last sentence applies to all multi-master replication solutions.
Regards
Markus
Markus Schiltknecht wrote:
Good morning Bruce,
Bruce Momjian wrote:
Oops, I see Markus Schiltknech likes the term "statement-based
replication" better too. Certainly master-slave communication using
"statement-based replication" has the same drawbacks as the broadcast
method, but I wanted to highlight that the broadcast was happening
outside the server. Do we need a master/slave "statement-based
replication" item and a middleware broadcast item?Ah, I see you had a much narrower definition of statement-based
replication in mind. As I've pointed out, there are different
implementations of 'statement-based replication'. I don't know about
sequoia, but Postgres-R fails back to statement based replication in
certain situations. Thus having an external 'program intercept every SQL
query' is absolutely no necessity of this algorithm, it can very well be
done inside the db backend, where you can better catch non-deterministic
functions... but again, that's an implementation detail.So, do you want to describe pgpool here or do you want to give a more
general description?
OK, I have updated the title to be "Statement-Based Replication Using
Middleware". I personally think statement-based replication only makes
sense in middleware because when you are in the backend, you have more
information and can do things better, either by modifying the statement
or passing actual data rows, like Slony does, so I want to restrict this
to middleware like pgpool, and Usogres, which was an early
implementation of this idea.
<varlistentry>
<term>Statement-Based Replication</term>
<listitem><para>
In statement-based replication, a program intercepts every SQL
query and sends it to all servers. Each server operates
independently. Read-only queries can be sent to a single server
because there is no need for all servers to process it.
</para>If you want to go for the general description, I think the 'each server
operates independently' is somewhere between confusing and false. And
again, the last sentence applies to all multi-master replication solutions.
Am I OK now?
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Bruce Momjian wrote:
OK, I have updated the title to be "Statement-Based Replication Using
Middleware". I personally think statement-based replication only makes
sense in middleware because when you are in the backend,
I completely agree.
you have more
information and can do things better, either by modifying the statement
or passing actual data rows, like Slony does, so I want to restrict this
to middleware like pgpool, and Usogres, which was an early
implementation of this idea.
That's fine and reasonable.
Am I OK now?
The title and first paragraph are fine.
I'd still say that the second paragraph, about limitations is too pgpool
specific. How's that for sequoia?
And I'm unsure what you mean by mentioning 2PC there. Do you have to
'make sure every transaction commits or aborts' yourself with pgpool? Or
did you just want to mention that pgpool does (and has to do) that for you?
Regards
Markus
Markus Schiltknecht wrote:
Bruce Momjian wrote:
OK, I have updated the title to be "Statement-Based Replication Using
Middleware". I personally think statement-based replication only makes
sense in middleware because when you are in the backend,I completely agree.
you have more
information and can do things better, either by modifying the statement
or passing actual data rows, like Slony does, so I want to restrict this
to middleware like pgpool, and Usogres, which was an early
implementation of this idea.That's fine and reasonable.
Am I OK now?
The title and first paragraph are fine.
I'd still say that the second paragraph, about limitations is too pgpool
specific. How's that for sequoia?
OK, I made it more open-ended:
If queries are simply broadcast unmodified, functions like
<function>random()</>, <function>CURRENT_TIMESTAMP</>, and
sequences would have different values on different servers.
This is because each server operates independently, and because
SQL queries are broadcast (and not actual modified rows). If
this is unacceptable, either the middleware or the application
must query such values from a single server and then use those
values in write queries. Also, care must be taken that all
transactions either commit or abort on all servers, perhaps
using two-phase commit (<xref linkend="sql-prepare-transaction"
endterm="sql-prepare-transaction-title"> and <xref
linkend="sql-commit-prepared" endterm="sql-commit-prepared-title">.
Pgpool is an example of this type of replication.
And I'm unsure what you mean by mentioning 2PC there. Do you have to
'make sure every transaction commits or aborts' yourself with pgpool? Or
did you just want to mention that pgpool does (and has to do) that for you?
I am not sure pgpool does that, but perhaps it should. Looking at the
pgpool web site, it seems it does not use 2PC (see replication_strict):
http://pgpool.projects.postgresql.org/
replication_mode
set this true if you are going to use replication functionality.
Default is false.
replication_strict
If true, pgpool will wait for the completion of the master query
before sending a query to the secondary server. This is the safest and
default operating mode for pgpool. Default is true.
The HA docs merely say that 2PC might be a good way to keep the servers
consistent.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +