Discussion:
MySQL Blackhole Engine
(too old to reply)
Deron
2012-11-06 23:07:21 UTC
Permalink
Hello,

We are looking at integrating a 3rd party application. They currently use
MySQL for their database solution. We are asking them to see about porting
to PostgreSQL. One of the issues they are running into is that they use
MySQL "BLACKHOLE" storage engine.

I don't honestly know what this is used for. Of course I did know what
/dev/null was used for until I started using it. So maybe this has some
merit? Is there some sort of equivelent structure in PG?

http://dev.mysql.com/doc/refman/5.0/en/blackhole-storage-engine.html

Thanks,

Deron
Tom Lane
2012-11-06 23:25:13 UTC
Permalink
Post by Deron
We are looking at integrating a 3rd party application. They currently use
MySQL for their database solution. We are asking them to see about porting
to PostgreSQL. One of the issues they are running into is that they use
MySQL "BLACKHOLE" storage engine.
Really? I've always assumed that was utterly useless except as a
template for writing new mysql storage engines. What are they using it
for?

You could presumably approximate the behavior by attaching a BEFORE
INSERT trigger to a table that just always returns NULL.

regards, tom lane
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Simon Riggs
2012-11-06 23:51:17 UTC
Permalink
Post by Tom Lane
Post by Deron
We are looking at integrating a 3rd party application. They currently use
MySQL for their database solution. We are asking them to see about porting
to PostgreSQL. One of the issues they are running into is that they use
MySQL "BLACKHOLE" storage engine.
Really? I've always assumed that was utterly useless except as a
template for writing new mysql storage engines. What are they using it
for?
I had also assumed that they were useless.

The docs say that the actions are binary logged, but the actual INSERT ignored.

Which is exactly what Hannu is asking for with LOG ONLY TABLEs.
--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Deron
2012-11-06 23:56:14 UTC
Permalink
Yes, I can't really find a good use case for it. I am meeting with some
of them in the next few days to find out exactly what they are using it
for. If there is a legitimate use case for this, I will forward that
information.

Thanks for the suggestions. I will pass this information along as well if
they really need the behavior.

Deron
Post by Deron
Post by Deron
We are looking at integrating a 3rd party application. They currently
use
Post by Deron
MySQL for their database solution. We are asking them to see about
porting
Post by Deron
to PostgreSQL. One of the issues they are running into is that they use
MySQL "BLACKHOLE" storage engine.
Really? I've always assumed that was utterly useless except as a
template for writing new mysql storage engines. What are they using it
for?
You could presumably approximate the behavior by attaching a BEFORE
INSERT trigger to a table that just always returns NULL.
regards, tom lane
Scott Ribe
2012-11-07 00:18:56 UTC
Permalink
Yes, I can't really find a good use case for it. I am meeting with some of them in the next few days to find out exactly what they are using it for. If there is a legitimate use case for this, I will forward that information.
Thanks for the suggestions. I will pass this information along as well if they really need the behavior.
From the docs, half a page down:

Inserts into a BLACKHOLE table do not store any data, but if the binary log is enabled, the SQL statements are logged (and replicated to slave servers). This can be useful as a repeater or filter mechanism. Suppose that your application requires slave-side filtering rules, but transferring all binary log data to the slave first results in too much traffic. In such a case, it is possible to set up on the master host a “dummy” slave process whose default storage engine is BLACKHOLE
--
Scott Ribe
***@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Sergey Konoplev
2012-11-06 23:26:40 UTC
Permalink
Post by Deron
We are looking at integrating a 3rd party application. They currently use
MySQL for their database solution. We are asking them to see about porting
to PostgreSQL. One of the issues they are running into is that they use
MySQL "BLACKHOLE" storage engine.
I don't honestly know what this is used for. Of course I did know what
/dev/null was used for until I started using it. So maybe this has some
merit? Is there some sort of equivelent structure in PG?
You can create a row-level BEFORE INSERT trigger on a table that does
nothing but RETURN NULL. In this case all the inserts into this table
will be ignored.
Post by Deron
http://dev.mysql.com/doc/refman/5.0/en/blackhole-storage-engine.html
Thanks,
Deron
--
Sergey Konoplev

a database and software architect
http://www.linkedin.com/in/grayhemp

Jabber: ***@gmail.com Skype: gray-hemp Phone: +14158679984
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Loading...