Re: transaction limits?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: transaction limits?
Дата
Msg-id 26127.1129931637@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: transaction limits?  (Chris Browne <cbbrowne@acm.org>)
Список pgsql-general
Chris Browne <cbbrowne@acm.org> writes:
> MaXX <bs139412@skynet.be> writes:
>> An error string in the source code stands:
>> "cannot have more than 2^32-1 commands in a transaction"

> That means you couldn't do more than 2^32-1 INSERT statements.

Right.

> But that wouldn't (in principle) prevent having each of the 2^32-1 commands
> use COPY to insert 2^31 rows, which would presumably mean that the
> limit on the number of rows insertable could be 2^63-1.

In theory a single COPY command can insert an unlimited number of rows,
or anyway up till you run up against the N-terabyte table size limit.
(Its internal row counter would wrap around of course, but I'm pretty
sure that's only used for error reporting.)

The case where the CID limit would affect a COPY is if you have triggers
on the table being inserted into, and the triggers themselves perform
SQL commands --- then you'd run into the CID limit in some number of
rows depending on how many commands per trigger function.

            regards, tom lane

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

Предыдущее
От: Chris Browne
Дата:
Сообщение: Re: transaction limits?
Следующее
От: CSN
Дата:
Сообщение: How much slower are numerics?