Re: [RFC] CREATE QUEUE (log-only table) for londiste/pgQ ccompatibility

Поиск
Список
Период
Сортировка
От Christopher Browne
Тема Re: [RFC] CREATE QUEUE (log-only table) for londiste/pgQ ccompatibility
Дата
Msg-id CAFNqd5VCr721=CGHe+eD4-A0Y4+T3TyF0Nhsve8MezY2pwX-sg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [RFC] CREATE QUEUE (log-only table) for londiste/pgQ ccompatibility  (Hannu Krosing <hannu@2ndQuadrant.com>)
Ответы Re: [RFC] CREATE QUEUE (log-only table) for londiste/pgQ ccompatibility  (Hannu Krosing <hannu@krosing.net>)
Список pgsql-hackers
On Thu, Oct 18, 2012 at 2:56 PM, Hannu Krosing <hannu@2ndquadrant.com> wrote:
> * works as table on INSERTS up to inserting logical WAL record describing
> the
> insert but no data is inserted locally.
>
> with all things that follow from the local table having no data
>   - unique constraints don't make sense
>   - indexes make no sense
>   -  updates and deletes hit no data
>   - etc. . .

Yep, I think I was understanding those aspects.

I think I disagree that "indexes make no sense."

I think that it would be meaningful to have an index type for this,
one that is a pointer at WAL records, to enable efficiently jumping to
the right WAL log to start accessing a data stream, given an XID.
That's a fundamentally different sort of index than we have today
(much the way that hash indexes, GiST indexes, and BTrees differ from
one another).

I'm having a hard time thinking about what happens if you have
cascaded replication, and want to carry records downstream.  In that
case, the XIDs from the original system aren't miscible with the XIDs
in a message queue on a downstream database, and I'm not sure what
we'd want to do.  Keep the original XIDs in a side attribute, maybe?
It seems weird, at any rate.  Or perhaps data from foreign sources has
got to go into a separate queue/'sorta-table', and thereby have two
XIDs, the "source system XID" and the "when we loaded it in locally
XID."
-- 
When confronted by a difficult problem, solve it by reducing it to the
question, "How would the Lone Ranger handle this?"



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Truncate if exists
Следующее
От: Noah Misch
Дата:
Сообщение: Re: Incorrect behaviour when using a GiST index on points