Re: [BUGS] BUG #1814: Cancelling a CLUSTER changes the OID counter

2005-08-09 Thread Tom Lane
Ian Burrell <[EMAIL PROTECTED]> writes:
> On 8/8/05, Tom Lane <[EMAIL PROTECTED]> wrote:
>> It looks to me like this could possibly happen due to CheckMaxObjectId()
>> being applied to each OID found in the existing table.
>> 
>> CheckMaxObjectId was always a kluge, and I'm not sure that it still has
>> any redeeming social value at all.  Can anyone think of a good reason
>> to keep it?

> From looking in the code, I am pretty sure CheckMaxObjectId is the
> culprit.  It sets the nextOID to the oid in the row if the
> assigned_oid is greater than the nextOID.

Yeah.  This is closely related to my recent speculations about putting
in a more direct defense against duplicate OIDs:

http://archives.postgresql.org/pgsql-hackers/2005-08/msg00074.php

I think if we did that, particularly in the general any-unique-OID-index
form suggested here

http://archives.postgresql.org/pgsql-hackers/2005-08/msg00247.php

then we could feel justified in simply discarding CheckMaxObjectId.
We would then have a mechanism that guaranteed OID uniqueness on a
per-table basis, but not at all on a cluster-wide basis, which is
the mindset that CheckMaxObjectId comes from.  In environments where
databases live long enough to have OID wraparound, CheckMaxObjectId
is worse than useless --- it creates uniqueness problems rather than
avoiding them, because it tends to force the OID counter to hover near
the high end of the range.

Comments?

regards, tom lane

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


[BUGS] BUG #1815: ECPGdebug causes crash on Windows XP

2005-08-09 Thread joshua masiko

The following bug has been logged online:

Bug reference:  1815
Logged by:  joshua masiko
Email address:  [EMAIL PROTECTED]
PostgreSQL version: 8.0.3
Operating system:   Windows XP SP2
Description:ECPGdebug causes crash on Windows XP
Details: 

/* Processed by ecpg (4.0.1) */
/* These include files are added by the preprocessor */
#include 
#include 
#include 
#include 
/* End of automatic include section */
#line 1 "main.pgc"
#include 

int main(int argc,char **argv)
{
ECPGdebug(1,stderr);
return 0;
}

Running the above program results in a reproducible crash on Windows XP 

Environment
Windows XP SP2
Visual Studio SP5
Postgresql 8.0.3

Any ideas??

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


Re: [BUGS] BUG #1808: bug: plan bugs on alert /drop table

2005-08-09 Thread Bruce Momjian

Please see the FAQ.  This is a known problem.

---

Michael Afanasiev wrote:
> 
> The following bug has been logged online:
> 
> Bug reference:  1808
> Logged by:  Michael Afanasiev
> Email address:  [EMAIL PROTECTED]
> PostgreSQL version: 8.0.0 & 7.4.6
> Operating system:   8.0.0 - WIN XP  7.4.6 FreeBSD
> Description:bug: plan bugs on alert /drop table
> Details: 
> 
> /*
> Postgres must recreate all plans when table recreated or alerted 
> */
> 
> 
> show server_version; --8.0.0 & 7.4.6
> CREATE TABLE public.a ( a int4);
> CREATE FUNCTION public.aa_func() RETURNS int4 AS
> 'BEGIN
> 
> insert into a (a) values (1);
> RETURN 1;
> END;'
> LANGUAGE 'plpgsql' VOLATILE;
> SELECT * FROM aa_func(); -- OK 1 row inserted
> 
> DROP TABLE  a;
> CREATE TABLE public.a ( a int4);
> SELECT * FROM a;
> SELECT * FROM aa_func();-- !!! ERROR:  relation with OID  does not
> exist
> 
> 
> DROP FUNCTION public.aa_func();
> CREATE FUNCTION public.aa_func() RETURNS int4 AS
> 'BEGIN
> 
> insert into a (a) values (1);
> RETURN 1;
> END;'
> LANGUAGE 'plpgsql' VOLATILE;  
> -- DROP function ,CREATE function or reconnect
> 
> SELECT * FROM aa_func(); -- OK 1 row inserted
> SELECT * FROM a;  
> DELETE FROM a;
> 
> ALTER TABLE public.a   ADD COLUMN b int4;
> ALTER TABLE public.a   ALTER COLUMN b SET NOT NULL;
> ALTER TABLE public.a   ALTER COLUMN b SET DEFAULT 0;
> 
> SELECT * FROM aa_func(); -- !!! ERROR: .. null value in column "b" violates
> not-null constraint
> 
> --DROP function ,CREATE function or reconnect
> SELECT * FROM aa_func(); --- OK 1 row inserted
> 
> ---(end of broadcast)---
> TIP 3: Have you checked our extensive FAQ?
> 
>http://www.postgresql.org/docs/faq
> 

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  pgman@candle.pha.pa.us   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [BUGS] BUG #1804: Installations Problems

2005-08-09 Thread Alvaro Herrera
On Wed, Aug 03, 2005 at 02:05:16PM +0100, Mario Reiley wrote:

> My installation failure when registering pgoledb.dll additionally the files:
>   
> pg_hba.conf  
> pg_ident.conf  
> postgresql.conf  
>   
> they were not created

Hmm, pgoledb.dll is client software, and those are server-side files.
Can you explain the failure in more detail?

-- 
Alvaro Herrera ()
"Puedes vivir solo una vez, pero si lo haces bien, una vez es suficiente"

---(end of broadcast)---
TIP 6: explain analyze is your friend