Re: Minimizing Recovery Time (wal replication)

From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: Bryan Murphy <bmurphy1976(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Minimizing Recovery Time (wal replication)
Date: 2009-04-10 00:33:28
Message-ID: alpine.GSO.2.01.0904092005090.12261@westnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 9 Apr 2009, Bryan Murphy wrote:

>> 1) Decrease the maximum possible segment backlog so you can never get this
>>   far behind
>
> I understand conceptually what you are saying, but I don't know how to
> practically realize this. :) Do you mean lower checkpoint_segments?

Theoretically, every time the archive_command writes a new segment out you
can immediately move that to your standby, and setup the standby to
regularly look for those and apply them as they come in. The fact that
you're getting so many of them queued up suggests there's something in
that path that isn't moving that pipeline along aggressively enough,
without knowing more about what you're doing it's hard to say where that
is.

> It actually is an 8 drive raid 10, BUT, it's on virtualized
> infrastructure up in Amazon's cloud running on 8 EBS volumes. I've
> found performance to be... inconsistent at best.

Yeah, EBS is not exactly a high-performance or predictable database
storage solution, particularly when you get to where you're calling fsync
a lot--which is exactly what is happening during the period you note your
system is frozen.

--
* Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD
>From pgsql-general-owner(at)postgresql(dot)org Thu Apr 9 21:48:37 2009
Received: from localhost (unknown [200.46.208.211])
by mail.postgresql.org (Postfix) with ESMTP id A703963434A
for <pgsql-general-postgresql(dot)org(at)mail(dot)postgresql(dot)org>; Thu, 9 Apr 2009 21:48:35 -0300 (ADT)
Received: from mail.postgresql.org ([200.46.204.86])
by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024)
with ESMTP id 77007-04
for <pgsql-general-postgresql(dot)org(at)mail(dot)postgresql(dot)org>;
Thu, 9 Apr 2009 21:48:25 -0300 (ADT)
Received: from news.hub.org (news.hub.org [200.46.204.72])
by mail.postgresql.org (Postfix) with ESMTP id B423E634341
for <pgsql-general(at)postgresql(dot)org>; Thu, 9 Apr 2009 21:48:33 -0300 (ADT)
Received: from news.hub.org (news.hub.org [200.46.204.72])
by news.hub.org (8.14.3/8.14.3) with ESMTP id n3A0mR4S021492
for <pgsql-general(at)postgresql(dot)org>; Thu, 9 Apr 2009 21:48:28 -0300 (ADT)
(envelope-from news(at)news(dot)hub(dot)org)
Received: (from news(at)localhost)
by news.hub.org (8.14.3/8.14.3/Submit) id n3A0WKIt015464
for pgsql-general(at)postgresql(dot)org; Thu, 9 Apr 2009 21:32:20 -0300 (ADT)
(envelope-from news)
From: linnewbie <linnewbie(at)gmail(dot)com>
X-Newsgroups: pgsql.general
Subject: Re: Storing HTML: HTML entities being rendered in that raw form
Date: Thu, 9 Apr 2009 17:32:18 -0700 (PDT)
Organization: http://groups.google.com
Lines: 52
Message-ID: <b2f99921-a708-4678-8faf-42374f903b70(at)s20g2000vbp(dot)googlegroups(dot)com>
References: <52efa629-7399-48a3-be85-380cb24b334d(at)e38g2000vbe(dot)googlegroups(dot)com>
<2AC845F1-B6AA-43A2-B688-428101E941DA(at)blighty(dot)com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Complaints-To: groups-abuse(at)google(dot)com
Complaints-To: groups-abuse(at)google(dot)com
Injection-Info: s20g2000vbp.googlegroups.com; posting-host=69.73.194.153;
posting-account=zttU0AoAAADLGCugO7lc2A1UNV7fqqHj
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.8)
Gecko/2009032711 Linux Mint/5 (Elyssa) Firefox/3.0.8,gzip(gfe),gzip(gfe)
To: pgsql-general(at)postgresql(dot)org
X-Virus-Scanned: Maia Mailguard 1.0.1
X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none
X-Spam-Level:
X-Archive-Number: 200904/410
X-Sequence-Number: 146366

On Apr 9, 1:00=A0pm, st(dot)(dot)(dot)(at)blighty(dot)com (Steve Atkins) wrote:
> On Apr 9, 2009, at 9:27 AM, linnewbie wrote:
>
> > Hi all,
>
> > I have stored HTML in a text field that I subsequently render on the
> > web. =A0However when I retrieve and render this data on the web I =A0am
> > getting the entities being rendered in their raw form, ie, instead of
> > getting the '&' symbol when '&amp;' is stored =A0I'm getting the 'raw'
> > '&amp;'.
>
> > I would be grateful if anyone can point out how I can get around this.
>
> It's a problem in your code, not the database. You're probably
> escaping it one time to many or unescaping it one time too few.
>
> Cheers,
> =A0 =A0Steve
>
> --
> Sent via pgsql-general mailing list (pgsql-gene(dot)(dot)(dot)(at)postgresql(dot)org)
> To make changes to your subscription:http://www.postgresql.org/mailpref/p=
gsql-general

To clarify, I am not escaping the string in any way.

Say the page I am saving the database is the about us page form a
company website.
First, make a from to create the about us page in a text area field,
then I copy the
html from my text editor and past it ino this text area from. I then
have a cgi script which
takes the contents from the text area field and stores it in the
database.

What I have on disk would be:

................................
..............................
<p> Bonnie &amp; Clyde</p>

which would usually be rendered as:

Bonnie & Clype

but this is not happening, it's being rendered
as:

Bonnie &amp; Clyde

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bryan Murphy 2009-04-10 00:58:16 Re: Minimizing Recovery Time (wal replication)
Previous Message Bryan Murphy 2009-04-09 23:58:55 Re: Minimizing Recovery Time (wal replication)