| From: | Noah Misch <noah(at)leadboat(dot)com> |
|---|---|
| To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
| Cc: | Leonardo Francalanci <m_lists(at)yahoo(dot)it>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: switch UNLOGGED to LOGGED |
| Date: | 2011-05-29 08:29:38 |
| Message-ID: | 20110529082938.GA13718@tornado.gateway.2wire.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Sat, May 28, 2011 at 09:33:09PM -0400, Robert Haas wrote:
> On Fri, May 27, 2011 at 6:19 AM, Noah Misch <noah(at)leadboat(dot)com> wrote:
> >> So, it's ok to have a log item that is replayed only if
> >>
> >> WalRcvInProgress()
> >>
> >> is true?
> >
> > No, that checks for WAL streaming in particular. ?A log-shipping standby needs
> > the same treatment.
> >
> >> Is it a correct approach? I couldn't find any other way to
> >> find out if we are in a standby or a master...
> >
> > InArchiveRecovery looks like the right thing, but it's currently static to
> > xlog.c. ?Perhaps exporting that is the way to go.
>
> Why is it necessary to replay the operation only on the slave? Can we
> just use XLOG_HEAP_NEWPAGE?
I don't think it is *necessary*. If we're replaying WAL on a master, we'll also
be resetting unlogged relations after recovery; what we write or do not write to
them in the mean time has no functional impact. Seemed like a sensible
optimization, but maybe it's premature.
nm
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Cédric Villemain | 2011-05-29 08:40:28 | Re: [ADMIN] pg_class reltuples/relpages not updated by autovacuum/vacuum |
| Previous Message | Tom Lane | 2011-05-29 05:23:26 | Re: Getting a bug tracker for the Postgres project |