Re: Possible causes for database corruption and solutions

From: Michael Clark <codingninja(at)gmail(dot)com>
To: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
Cc: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Possible causes for database corruption and solutions
Date: 2009-12-16 13:37:25
Message-ID: bf5d83510912160537u7b54595ev82e1c20a7cf0d35e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Scott and Craig,

On Tue, Dec 15, 2009 at 9:45 PM, Craig Ringer
<craig(at)postnewspapers(dot)com(dot)au>wrote:

> On 16/12/2009 9:07 AM, Scott Marlowe wrote:
>
> I'd also recommend moving off of OSX as you're using a minority OS as
>> far as databases are concerned, and you won't have a very large
>> community to help out when things do go wrong.
>>
>
> It sounds like PostgreSQL is being used as a DB bundled with an app - not
> quite embedded, but as close as Pg gets. Right, OP?
>
> If so, they wouldn't be moving off Mac OS X, they'd be moving off Pg.
>
>
Correct. We are using PG for the backing store of our OS X desktop
application.
It has been working really well for us (minus these issues), and it is
pretty much embedded. We have built an OS X framework around PG,
specialized the building process to generate a proper universal binary of
the PG executables/libraries and set it up to run in place from within our
application files. We do not install PG to the users machine separately.
And we run it in two modes, multi user mode where we allow ip based
connections, and single user mode where we restrict connections to unix file
sockets (we had to patch pg_ctl to handle this special case in fact).

Loving Postgres!

> While Pg doesn't seem to be hugely used on Mac OS X as a production
> environment for running dedicated database servers, it should still work
> safely and with acceptable performance. If it doesn't then good problem
> reports will help improve that. So I for one encourage them to stick with Pg
> and stay in touch on the list. They shouldn't have issues now that they've
> got OS X honouring fsync, and if they do then it'd be good to hear about it.
> I'll be happy to help out if I can - I don't use Pg on OS X, but I do have
> access to OS X machines and have to administrate them on the network at
> work, so I can do testing if I need to.
>
> Just because Pg isn't targeted at app embedding doesn't mean it shouldn't
> work well on a mostly end-user platform when shipped with an application. If
> the app installer is prepared to put up with the fuss of setting up Pg on
> the machine, it should be able to (and can) reasonably expect it to work.
>
> For what its worth, there are clearly a fair few Mac OS X users of Pg out
> there - especially dev setups on Mac laptops. They turn up on the lists
> sometimes, and the things they ask about don't suggest to me that Mac OS X
> is a particularly untrustworthy platform for running Pg on.
>
>
I was quite shocked to hear the concern over OS X to be honest. It is a
very stable environment with a strong pedigree.

But having said that, it does provide for a hostile* environment for PG in
our use case. Now with fsync set properly I think it will deal fine with
the hostilities, the much larger percentage of our user base with no
problems already speaks volumes.

Thanks again for the reply,
Michael.

*Hostile in that generally OS X based machines are not treated like a glass
houses, with hd redundancy, UPS protection, massive up times, etc.

--
> Craig Ringer
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Howard Cole 2009-12-16 13:51:53 Re: Interesting Benchmark Article
Previous Message Mai Fawzy 2009-12-16 13:36:19 Re: Cause of error message?