Re: OID's

Поиск
Список
Период
Сортировка
От Terry Lee Tucker
Тема Re: OID's
Дата
Msg-id 200411170707.00039.terry@esc1.com
обсуждение исходный текст
Ответ на Re: OID's  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
Helps me. Thanks for the clairification.

On Wednesday 17 November 2004 06:49 am, Martijn van Oosterhout saith:
> Just to clarify, there is a difference between OIDs and XIDs. Object
> IDs (OID) are a system assigned field to every row that eventually
> wraps around. If you don't use them in your application you'll hever
> really have a problem. The only exception is that statements that
> modify structures in the database (CREATE TRIGGER/TABLE/INDEX/etc) may
> fail if you're unlucky enough to try them and it happens to be exactly
> the OID of an existing thing of that type.
>
> Most people don't create 4 billion rows in their database so it's not
> an issue. People who do are recommended to create their high churn
> tables WITHOUT OIDS so they don't get used as fast. As an added bonus,
> in recent versions you can actually save diskspace by not having them.
>
> Transaction IDs (XID) are a different story, they track transactions
> and what is visible and what isn't. Transaction wraparound means that
> rows will disappear when their transaction ID (which was considered in
> the past) is now in the future. Since 7.2 this problem is avoided by
> doing a database wide VACUUM (not necessarily FULL) at least once every
> billion transactions. This is not an onerous requirement so people
> don't run into this anymore.
>
> Before 7.2 you'd simply find your data missing one morning as the only
> way to reset the XID was with an initdb. If you're still running a busy
> database on something older than that, you *really* need to consider
> taking appropriate measures! 7.2 is already fairly old now and all of
> the major database destroying issues from then are now fixed.
>
> Hope this helps,
>
> On Tue, Nov 16, 2004 at 01:06:57PM +0200, Kostis Mentzelos wrote:
> > I have read about oid wraparound in many messages but I don't understand
> > when it happens and when it is dangerus for my tables.
> >
> > It affects developers that uses OIDS in their queryies?
> > What about database and tables (not total or total) disappearences?
> >
> > Kostis.
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 9: the planner will ignore your desire to choose an index scan if
> > your joining column's datatypes do not match

--
Quote: 28
"Without question, we need to disarm Saddam Hussein.  He is a brutal,
 murderous dictator, leading an oppressive regime . . . He presents a
 particularly grievous threat because he is so consistently prone to
 miscalculation. . . . And now he is miscalculating America's response
 to his continued deceit and his consistent grasp for weapons of mass
 destruction. . . . So the threat of Saddam Hussein with weapons of mass
 destruction is real. . . ."

 -- Sen. John F. Kerry (D, MA), Jan. 23. 2003

 Work: 1-336-372-6812
 Cell: 1-336-363-4719
email: terry@esc1.com

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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: OID's
Следующее
От: "Alejandro D. Burne"
Дата:
Сообщение: Re: Fwd: Problem installing Postgresql on MDK10.0