Обсуждение: Questions about large objects and the WAL

Поиск
Список
Период
Сортировка

Questions about large objects and the WAL

От
Karen Ploski
Дата:
I'm trying to understand how large objects relate to
the write-ahead log.  I've read the following sections
in the 8.1 user guide:

Chapter 26 Reliability and the Write-Ahead Log
Chapter 29 Large Objects
Section 42.21 pg_lageobject

I have some naive questions

(1)When a large object is updated, how much of the
large object is placed in the WAL buffers in shared
memory by LogInsert?
  (a) None
  (b) Just the page (or pages) in pg_largeobject that
changed, or
  (c) the entire large object?

(2) Are the WAL buffer(s) that contain part (or all)
of the large object written to the log file, on
permanent storage?

(3) Section  E.1.3.12. pg_dump Changes in the 8.1
documentation describes a change to pg_dump:

• Allow pg_dump to dump large objects even in text
mode (Tom)
With this change, large objects are now always dumped;
the former -b switch is a no-op.

Does pg_dump take the large objects from the shared
WAL buffers, or the log file (or both)?


I have similar questions about TOAST fields.  I assume
that TOAST fields aren't "stored" in pg_largeobject,
they are not "broken into pages" like large objects.
Apart from that,

(4) are TOAST fields written to the log file, on
permanent storage?
(5) does pg_dump dump TOAST fields (8.1 and later)?

Thank you!
Karen

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Re: Questions about large objects and the WAL

От
Tom Lane
Дата:
Karen Ploski <ploskikl@yahoo.com> writes:
> I'm trying to understand how large objects relate to
> the write-ahead log.

Large objects are just some data in a table.  The API for them is a bit
odd, but the reliability issues are not any different from any other
transaction.

> (1)When a large object is updated, how much of the
> large object is placed in the WAL buffers in shared
> memory by LogInsert?

Every row you updated (which is any 2K segment of the
large object IIRC).

            regards, tom lane