Home > Archive > PostgreSQL Discussion > April 2005 > oid wraparound









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author oid wraparound
Hubert Fröhlich

2005-04-26, 7:23 am

Hi list,

some time ago, there was a discussion about oid wraparound. See
http://archives.postgresql.org/pgsq...10/msg00561.php .

Those days, we had PostgreSQL 7.1 and 7.2, and we had to be careful
oids approaching 2^32 (2.14 billion)

Now, we have 8.0. What does the situation look like? Where do I have to
be careful:

OID > 2billion? 4billion?

What about the danger of TID wraparounds? (databases are VACUUMed regularly)


--
Mit freundlichen Grüßen / With kind regards

Hubert Fröhlich

-------------------------------------------------------------------------------
Dr.-Ing. Hubert Fröhlich
Bezirksfinanzdirekti
on München
Alexandrastr. 3, D-80538 München, GERMANY
Tel. :+49 (0)89 / 2190 - 2980
Fax :+49 (0)89 / 2190 - 2997
hubert dot froehlich at bvv dot bayern dot de

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere
" to majordomo@postgresql
.org)

Russell Smith

2005-04-26, 7:23 am

On Tue, 26 Apr 2005 07:24 pm, Hubert Fröhlich wrote:
> Hi list,
>
> some time ago, there was a discussion about oid wraparound. See
> http://archives.postgresql.org/pgsq...10/msg00561.php .
>
> Those days, we had PostgreSQL 7.1 and 7.2, and we had to be careful
> oids approaching 2^32 (2.14 billion)
>
> Now, we have 8.0. What does the situation look like? Where do I have to
> be careful:
>
> OID > 2billion? 4billion?
>
> What about the danger of TID wraparounds? (databases are VACUUMed regularly)
>

With 8.0 you only need to make sure you do database wide vacuums every 1 billion transactions
or so. If you do that, then there is not problem when the XID (Transaction ID) wraps around.
Postgresql will know which transaction were in the past, and which were in the future.

Regards

Russell Smith.
>


---------------------------(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

Neil Conway

2005-04-26, 7:23 am

Hubert Fröhlich wrote:
> Those days, we had PostgreSQL 7.1 and 7.2, and we had to be careful oids
> approaching 2^32 (2.14 billion)
>
> Now, we have 8.0. What does the situation look like?


With the default settings, there is exactly the same risk of OID
wraparound as in earlier releases. However, you can set the
"default_with_oids" configuration parameter to false to significantly
reduce OID consumption, to the point that you probably won't need to
worry about it. It will mean that tables will not have OIDs by default,
so you should specify WITH OIDS when creating tables that need OIDs if
necessary (although think twice before doing this, as there are only a
few good reasons to use OIDs in user tables).

(This setting will default to false in 8.1)

-Neil

---------------------------(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

Hubert Fröhlich

2005-04-27, 3:23 am

Thanks, Neil.

> Hubert Fröhlich wrote:
>
>
>
> With the default settings, there is exactly the same risk of OID
> wraparound as in earlier releases. However, you can set the
> "default_with_oids" configuration parameter to false to significantly
> reduce OID consumption, to the point that you probably won't need to
> worry about it. It will mean that tables will not have OIDs by default,
> so you should specify WITH OIDS when creating tables that need OIDs if
> necessary (although think twice before doing this, as there are only a
> few good reasons to use OIDs in user tables).


What good reasons to use OIDs in user tables are still left?
* For speeding up some special types of queries?

--
Mit freundlichen Grüßen / With kind regards

Hubert Fröhlich

-------------------------------------------------------------------------------
Dr.-Ing. Hubert Fröhlich
Bezirksfinanzdirekti
on München
Alexandrastr. 3, D-80538 München, GERMANY
Tel. :+49 (0)89 / 2190 - 2980
Fax :+49 (0)89 / 2190 - 2997
hubert dot froehlich at bvv dot bayern dot de

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere
" to majordomo@postgresql
.org)

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com