Re: BufferAccessStrategy for bulk insert

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BufferAccessStrategy for bulk insert
Дата
Msg-id 17996.1225049097@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BufferAccessStrategy for bulk insert  ("Robert Haas" <robertmhaas@gmail.com>)
Ответы Re: BufferAccessStrategy for bulk insert  ("Robert Haas" <robertmhaas@gmail.com>)
Список pgsql-hackers
"Robert Haas" <robertmhaas@gmail.com> writes:
> I am kind of inclined to define flags like this:

> #define HEAP_INSERT_SKIP_WAL 0x0001
> #define HEAP_INSERT_SKIP_FSM 0x0002
> #define HEAP_INSERT_BULK 0x0004 /* do we even need this one? */

> And then:

> Oid heap_insert(Relation relation, HeapTuple tup, CommandId cid,
> unsigned options, BulkInsertState *bistate);
> BulkInsertState *GetBulkInsertState(void);
> void FreeBulkInsertState(BulkInsertState *);

Seems sane to me.  I don't see the point of the HEAP_INSERT_BULK flag
bit --- providing or not providing bistate would cover that, and if
you have a bit as well then you have to define what the inconsistent
combinations mean.  I concur with making all-zeroes be the typical
state of the flag bits, too.

FWIW, we generally declare bitmask flag variables as int, unless
there's some really good reason to do otherwise.
        regards, tom lane


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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: array_agg and array_accum (patch)
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: new correlation metric