Skip site navigation (1) Skip section navigation (2)

pg_dump fails to dump database

From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: pg_dump fails to dump database
Date: 2000-12-17 11:09:48
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Mirek Hankus (M(dot)Hankus(at)ce3(dot)pl) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
pg_dump fails to dump database

Long Description
pg_dump in postgreSQL 7.0.3 fails to dump database. Problem is becomeUser procedure in which lastusername stores pointer to name of username which is currently connected. becomeUser is called for the first time in dumpSchema, which allocated memory, calls becomeUser and then frees memory. Then becomeUser is called again during dumping of table data, but lastusername points to deallocated memory, so it receives SIGSEGV (in strcmp). 


   Use strdup to copy username, and do not use pointer to memory allocated in other procedures

In my case this bug made it imposible to backup database, upgrade also will be imposible.

Sample Code

No file was uploaded with this report


pgsql-bugs by date

Next:From: Tom LaneDate: 2000-12-17 17:36:23
Subject: Re: pg_dump fails to dump database
Previous:From: Thomas LockhartDate: 2000-12-17 07:49:13
Subject: Re: Table name scope (was Re: Outer joins aren't working with views)

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group