[mythtv-users] PostgreSQL

Brian Wood beww at beww.org
Mon Jul 3 12:35:43 UTC 2006



On Jul 3, 2006, at 2:26 AM, Danny Brow wrote:

> On Sun, 2006-07-02 at 21:12 -0600, Brian Wood wrote:
>> On Jul 2, 2006, at 8:49 PM, Danny Brow wrote:
>>
>>> I was looking for an alternative to mysql for a reason, I've yet to
>>> have
>>> mysql last for longer then a few weeks on any applications that
>>> uses it.
>>> I've used a few different applications that use mysql db, they all
>>> have
>>> the same issue, power outage is the worst thing that can happen to
>>> mysql
>>> and when it does it takes time that I don't have to fix it. Unlike
>>> mysql
>>> PostgreSQL is rock solid, I've had a lot power outages, system
>>> shutdowns, user error, anything that can take down a server and
>>> PostgreSQL comes right back up, with no problems. Out of around 200
>>> DB's
>>> running PostgreSQL over the last few years I've only had to restore
>>> twice from back up, once for corruption and the other time from hard
>>> drive failure (system upgrades not included). This is why I want to
>>> use
>>> PostgreSQL. MySQL is only good when a system will never turn off or
>>> the
>>> db is never shutdown. I'm investing into a UPS for my MythTV box for
>>> just that reason, just hope we don't get a long power outage around
>>> here.
>>>
>>> Dan.
>>
>> If you set up your UPS properly you do not have to worry about a
>> "long" outage.
>>
>> The UPS should send a message to the system when it gets to a
>> specified amount of time left on the batteries which initiates a
>> controlled shutdown of the system, including the database.
>>
>> Just be sure that if you use your network to send such a message the
>> routers, switches, hubs etc. that are needed to make the network
>> operate are connected to the UPS. Generally a USB connection from the
>> UPS to the system is best.
>
> Serial is just as or more reliable.

Serial is probably more reliable, but what I discovered when looking  
at buying was that the ones with serial interfaces very often don't  
have the "smarts" to give info like minutes remaining, hence my  
statement that using USB is best.

>
>
> It's a pvr I don't want to spend $150 on a UPS for it, I'm guessing  
> the
> $60 one I'm going to buy will last about 5-7 minutes, good enough for
> power flickers, but most outages are 5-10 minutes plus around here.  
> But
> the reality is that I should not have to worry my pvr powers down.

I think you have to worry about *any* PC powering down unexpectedly  
these days, certainly anything storing perhaps hundreds of gigabytes  
of information. I think even a typical Windows XP "consumer" machine  
will have problems with a power failure.

More $$$ spent on a UPS buys you more wattage and/or more runtime. If  
you get a unit with sufficient wattage you can often extend the  
runtime by using an external battery, you may have to make cooling  
arrangements for the switching elements as well.

Power systems, both PSUs and UPSs, are the most overlooked components  
of home computers, and the most critical. IMHO you simply have to  
include a decent UPS in any modern system.

>
> I'm starting to wonder if this topic was pointless, I got bounces e- 
> mail
> from the developer of the patch for postgresql and the mythtv dev team
> has no interest in supporting it :( it would be real nice if I didn't
> even have to run a DB for my PVR at all.


I certainly don't have the database experience that you do, but the  
few times I've had a test Myth system crash I've never lost the mysql  
DB, of course this was just a small test box with very little data,  
I've never run my production machine on direct commercial power.

I think the use of a DB is to a large extent what gives Myth its  
power, it was a design decision at the very beginning that has stood  
the project in good stead.



More information about the mythtv-users mailing list