pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
MySQL Blackhole Engine
6+ messages / 5 participants
[nested] [flat]

* MySQL Blackhole Engine
@ 2012-11-06 23:07 Deron <fecastle@gmail.com>
  2012-11-06 23:25 ` Re: MySQL Blackhole Engine Tom Lane <tgl@sss.pgh.pa.us>
  2012-11-06 23:26 ` Re: MySQL Blackhole Engine Sergey Konoplev <gray.ru@gmail.com>
  0 siblings, 2 replies; 6+ messages in thread

From: Deron @ 2012-11-06 23:07 UTC (permalink / raw)
  To: pgsql-admin

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

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: MySQL Blackhole Engine
  2012-11-06 23:07 MySQL Blackhole Engine Deron <fecastle@gmail.com>
@ 2012-11-06 23:25 ` Tom Lane <tgl@sss.pgh.pa.us>
  2012-11-06 23:51   ` Re: MySQL Blackhole Engine Simon Riggs <simon@2ndQuadrant.com>
  2012-11-06 23:56   ` Re: MySQL Blackhole Engine Deron <fecastle@gmail.com>
  1 sibling, 2 replies; 6+ messages in thread

From: Tom Lane @ 2012-11-06 23:25 UTC (permalink / raw)
  To: Deron <fecastle@gmail.com>; +Cc: pgsql-admin

Deron <fecastle@gmail.com> writes:
> 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




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: MySQL Blackhole Engine
  2012-11-06 23:07 MySQL Blackhole Engine Deron <fecastle@gmail.com>
  2012-11-06 23:25 ` Re: MySQL Blackhole Engine Tom Lane <tgl@sss.pgh.pa.us>
@ 2012-11-06 23:51   ` Simon Riggs <simon@2ndQuadrant.com>
  1 sibling, 0 replies; 6+ messages in thread

From: Simon Riggs @ 2012-11-06 23:51 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Deron <fecastle@gmail.com>; pgsql-admin

On 6 November 2012 23:25, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Deron <fecastle@gmail.com> writes:
>> 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




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: MySQL Blackhole Engine
  2012-11-06 23:07 MySQL Blackhole Engine Deron <fecastle@gmail.com>
  2012-11-06 23:25 ` Re: MySQL Blackhole Engine Tom Lane <tgl@sss.pgh.pa.us>
@ 2012-11-06 23:56   ` Deron <fecastle@gmail.com>
  2012-11-07 00:18     ` Re: MySQL Blackhole Engine Scott Ribe <scott_ribe@elevated-dev.com>
  1 sibling, 1 reply; 6+ messages in thread

From: Deron @ 2012-11-06 23:56 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin

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



On Tue, Nov 6, 2012 at 3:25 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Deron <fecastle@gmail.com> writes:
> > 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
>

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: MySQL Blackhole Engine
  2012-11-06 23:07 MySQL Blackhole Engine Deron <fecastle@gmail.com>
  2012-11-06 23:25 ` Re: MySQL Blackhole Engine Tom Lane <tgl@sss.pgh.pa.us>
  2012-11-06 23:56   ` Re: MySQL Blackhole Engine Deron <fecastle@gmail.com>
@ 2012-11-07 00:18     ` Scott Ribe <scott_ribe@elevated-dev.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Scott Ribe @ 2012-11-07 00:18 UTC (permalink / raw)
  To: Deron <fecastle@gmail.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-admin

On Nov 6, 2012, at 4:56 PM, Deron wrote:

> 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
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice








^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: MySQL Blackhole Engine
  2012-11-06 23:07 MySQL Blackhole Engine Deron <fecastle@gmail.com>
@ 2012-11-06 23:26 ` Sergey Konoplev <gray.ru@gmail.com>
  1 sibling, 0 replies; 6+ messages in thread

From: Sergey Konoplev @ 2012-11-06 23:26 UTC (permalink / raw)
  To: Deron <fecastle@gmail.com>; +Cc: pgsql-admin

On Tue, Nov 6, 2012 at 3:07 PM, Deron <fecastle@gmail.com> wrote:
> 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.

>
> 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: gray.ru@gmail.com Skype: gray-hemp Phone: +14158679984




^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2012-11-07 00:18 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-11-06 23:07 MySQL Blackhole Engine Deron <fecastle@gmail.com>
2012-11-06 23:25 ` Tom Lane <tgl@sss.pgh.pa.us>
2012-11-06 23:51   ` Simon Riggs <simon@2ndQuadrant.com>
2012-11-06 23:56   ` Deron <fecastle@gmail.com>
2012-11-07 00:18     ` Scott Ribe <scott_ribe@elevated-dev.com>
2012-11-06 23:26 ` Sergey Konoplev <gray.ru@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox