pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
How to set the global OID counter? COPY WITH OIDS does not set global OID counter?
8+ messages / 5 participants
[nested] [flat]

* How to set the global OID counter? COPY WITH OIDS does not set global OID counter?
@ 2006-06-09 13:25  Dirk Lutzebäck <lutzeb@aeccom.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Dirk Lutzebäck @ 2006-06-09 13:25 UTC (permalink / raw)
  To: pgsql-admin; pgsql-general@postgresql.org; pgsql-bugs@postgresql.org; +Cc: tgl@sss.pgh.pa.us

Hi,

how can one set the global OID counter in 8.1.X? We think it would work 
in 8.0.X using the COPY WITH OIDS command but this does not work in 
8.1.X anymore.

We have the problem that we made a dump using 'pg_dump -o' in 8.0.X, 
created a new database in 8.1.X and read back in but the global OID 
counter stayed at 40.000 so OIDs will be allocated again!

Thanks for help,

Dirk



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: How to set the global OID counter? COPY WITH OIDS does not set global OID counter?
@ 2006-06-09 14:00  Alvaro Herrera <alvherre@commandprompt.com>
  parent: Dirk Lutzebäck <lutzeb@aeccom.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Alvaro Herrera @ 2006-06-09 14:00 UTC (permalink / raw)
  To: Dirk Lutzebäck <lutzeb@aeccom.com>; +Cc: pgsql-admin; pgsql-general@postgresql.org; pgsql-bugs@postgresql.org; tgl@sss.pgh.pa.us

Dirk Lutzebäck wrote:
> Hi,
> 
> how can one set the global OID counter in 8.1.X? We think it would work 
> in 8.0.X using the COPY WITH OIDS command but this does not work in 
> 8.1.X anymore.

pg_resetxlog -o
(Postmaster stopped of course)

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: How to set the global OID counter? COPY WITH OIDS does not set global OID counter?
@ 2006-06-09 14:26  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Alvaro Herrera <alvherre@commandprompt.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Tom Lane @ 2006-06-09 14:26 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@commandprompt.com>; +Cc: Dirk Lutzebäck <lutzeb@aeccom.com>; pgsql-admin; pgsql-general@postgresql.org; pgsql-bugs@postgresql.org

Alvaro Herrera <alvherre@commandprompt.com> writes:
> Dirk Lutzebäck wrote:
>> how can one set the global OID counter in 8.1.X? We think it would work 
>> in 8.0.X using the COPY WITH OIDS command but this does not work in 
>> 8.1.X anymore.

> pg_resetxlog -o
> (Postmaster stopped of course)

Possibly more to the point: why do you think you need to mess with the
counter?  8.1 is smart enough not to assign conflicting OIDs to large
objects.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: How to set the global OID counter? COPY WITH OIDS does
@ 2006-06-09 14:41  Dirk Lutzebäck <lutzeb@aeccom.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 8+ messages in thread

From: Dirk Lutzebäck @ 2006-06-09 14:41 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Alvaro Herrera <alvherre@commandprompt.com>; pgsql-admin@postgresql.org, pgsql-general@postgresql.org, pgsql-bugs@postgresql.org, Sven Geisler <sgeisler@aeccom.com>; pavel rabaev <pavel@aeccom.com>

This is not a large object. We are seeing rows with duplicate oids 
because the OID counter is not changed after the dump (exported with 
--oids) is being loaded.
How does 8.1 prevent to allocate duplicate OIDs?

Regards,

Dirk

Tom Lane wrote:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
>   
>> Dirk Lutzebäck wrote:
>>     
>>> how can one set the global OID counter in 8.1.X? We think it would work 
>>> in 8.0.X using the COPY WITH OIDS command but this does not work in 
>>> 8.1.X anymore.
>>>       
>
>   
>> pg_resetxlog -o
>> (Postmaster stopped of course)
>>     
>
> Possibly more to the point: why do you think you need to mess with the
> counter?  8.1 is smart enough not to assign conflicting OIDs to large
> objects.
>
> 			regards, tom lane
>   

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: How to set the global OID counter? COPY WITH OIDS does
@ 2006-06-09 14:49  Colin Freas <colinfreas@gmail.com>
  parent: Dirk Lutzebäck <lutzeb@aeccom.com>
  1 sibling, 0 replies; 8+ messages in thread

From: Colin Freas @ 2006-06-09 14:49 UTC (permalink / raw)
  To: pgsql-admin

this is an important enough question that no one who asks it has to provide
an answer as to why they're doing it.

i can imagine many situations where this would be useful, not the least of
which is reliability testing.  and ESPECIALLY since OID's apparently roll
over at 2^32.  what happens if you have more than 4 billion rows in the
database?

that's totally unrelated to setting the oid counter though.  come on.  give
it up!  how do you do it?

colin

On 6/9/06, Dirk Lutzebäck <lutzeb@aeccom.com> wrote:
>
>  This is not a large object. We are seeing rows with duplicate oids
> because the OID counter is not changed after the dump (exported with --oids)
> is being loaded.
> How does 8.1 prevent to allocate duplicate OIDs?
>
> Regards,
>
> Dirk
>
> Tom Lane wrote:
>
> Alvaro Herrera <alvherre@commandprompt.com> <alvherre@commandprompt.com> writes:
>
>  Dirk Lutzebäck wrote:
>
>  how can one set the global OID counter in 8.1.X? We think it would work
> in 8.0.X using the COPY WITH OIDS command but this does not work in
> 8.1.X anymore.
>
>     pg_resetxlog -o
> (Postmaster stopped of course)
>
>  Possibly more to the point: why do you think you need to mess with the
> counter?  8.1 is smart enough not to assign conflicting OIDs to large
> objects.
>
> 			regards, tom lane
>
>
>

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: How to set the global OID counter? COPY WITH OIDS does
@ 2006-06-09 15:18  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Dirk Lutzebäck <lutzeb@aeccom.com>
  1 sibling, 1 reply; 8+ messages in thread

From: Tom Lane @ 2006-06-09 15:18 UTC (permalink / raw)
  To: Dirk Lutzebäck <lutzeb@aeccom.com>; +Cc: Alvaro Herrera <alvherre@commandprompt.com>; pgsql-admin@postgresql.org, pgsql-general@postgresql.org, pgsql-bugs@postgresql.org, Sven Geisler <sgeisler@aeccom.com>; pavel rabaev <pavel@aeccom.com>

=?ISO-8859-1?Q?Dirk_Lutzeb=E4ck?= <lutzeb@aeccom.com> writes:
> This is not a large object. We are seeing rows with duplicate oids 
> because the OID counter is not changed after the dump (exported with 
> --oids) is being loaded.
> How does 8.1 prevent to allocate duplicate OIDs?

If there's a unique index on the OID column then 8.1 will not allocate
duplicate OIDs.  If there's not such a unique index, you had no
guarantee of no-duplicates before 8.1 either.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: How to set the global OID counter? COPY WITH OIDS does
@ 2006-06-09 15:27  Dirk Lutzebäck <lutzeb@aeccom.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 8+ messages in thread

From: Dirk Lutzebäck @ 2006-06-09 15:27 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Alvaro Herrera <alvherre@commandprompt.com>; pgsql-admin@postgresql.org, pgsql-general@postgresql.org, pgsql-bugs@postgresql.org, Sven Geisler <sgeisler@aeccom.com>; pavel rabaev <pavel@aeccom.com>

True.

Dirk

Tom Lane wrote:
> =?ISO-8859-1?Q?Dirk_Lutzeb=E4ck?= <lutzeb@aeccom.com> writes:
>   
>> This is not a large object. We are seeing rows with duplicate oids 
>> because the OID counter is not changed after the dump (exported with 
>> --oids) is being loaded.
>> How does 8.1 prevent to allocate duplicate OIDs?
>>     
>
> If there's a unique index on the OID column then 8.1 will not allocate
> duplicate OIDs.  If there's not such a unique index, you had no
> guarantee of no-duplicates before 8.1 either.
>
> 			regards, tom lane
>   

-- 
/This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom they are 
addressed. If you are not the intended recipient, you should not copy 
it, re-transmit it, use it or disclose its contents, but should return 
it to the sender immediately and delete your copy from your system. 
Thank you for your cooperation./

*Dirk Lutzebäck* <lutzeb@aeccom.com> Tel +49.30.5362.1635 Fax .1638
CTO AEC/communications GmbH <http://www.aeccom.com;, Berlin, Germany

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: [ADMIN] How to set the global OID counter? COPY WITH OIDS does
@ 2006-06-09 17:42  Jim C. Nasby <jnasby@pervasive.com>
  parent: Dirk Lutzebäck <lutzeb@aeccom.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Jim C. Nasby @ 2006-06-09 17:42 UTC (permalink / raw)
  To: Dirk Lutzeb?ck <lutzeb@aeccom.com>; +Cc: pgsql-general@postgresql.org

In the future, please don't send the same email to a bunch of pgsql
lists; one is almost always sufficient. (In this case, -admin OR
-general woulud have been best).

On Fri, Jun 09, 2006 at 05:27:47PM +0200, Dirk Lutzeb?ck wrote:
> True.
> 
> Dirk
> 
> Tom Lane wrote:
> >=?ISO-8859-1?Q?Dirk_Lutzeb=E4ck?= <lutzeb@aeccom.com> writes:
> >  
> >>This is not a large object. We are seeing rows with duplicate oids 
> >>because the OID counter is not changed after the dump (exported with 
> >>--oids) is being loaded.
> >>How does 8.1 prevent to allocate duplicate OIDs?
> >>    
> >
> >If there's a unique index on the OID column then 8.1 will not allocate
> >duplicate OIDs.  If there's not such a unique index, you had no
> >guarantee of no-duplicates before 8.1 either.
> >
> >			regards, tom lane
> >  
> 
> -- 
> /This email and any files transmitted with it are confidential and 
> intended solely for the use of the individual or entity to whom they are 
> addressed. If you are not the intended recipient, you should not copy 
> it, re-transmit it, use it or disclose its contents, but should return 
> it to the sender immediately and delete your copy from your system. 
> Thank you for your cooperation./
> 
> *Dirk Lutzeb?ck* <lutzeb@aeccom.com> Tel +49.30.5362.1635 Fax .1638
> CTO AEC/communications GmbH <http://www.aeccom.com;, Berlin, Germany
> 

-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461



^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2006-06-09 17:42 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-06-09 13:25 How to set the global OID counter? COPY WITH OIDS does not set global OID counter? Dirk Lutzebäck <lutzeb@aeccom.com>
2006-06-09 14:00 ` Alvaro Herrera <alvherre@commandprompt.com>
2006-06-09 14:26   ` Tom Lane <tgl@sss.pgh.pa.us>
2006-06-09 14:41     ` Re: How to set the global OID counter? COPY WITH OIDS does Dirk Lutzebäck <lutzeb@aeccom.com>
2006-06-09 14:49       ` Re: How to set the global OID counter? COPY WITH OIDS does Colin Freas <colinfreas@gmail.com>
2006-06-09 15:18       ` Re: How to set the global OID counter? COPY WITH OIDS does Tom Lane <tgl@sss.pgh.pa.us>
2006-06-09 15:27         ` Re: How to set the global OID counter? COPY WITH OIDS does Dirk Lutzebäck <lutzeb@aeccom.com>
2006-06-09 17:42           ` Re: [ADMIN] How to set the global OID counter? COPY WITH OIDS does Jim C. Nasby <jnasby@pervasive.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox