Thread: Data missing from table........

Data missing from table........

From
Archana K N
Date:
Hi,

         Recently  I updated my database with more columns and added data into it.

Even works were performed on it. After updating  "postgresql.conf" and "pg_hba.conf"

 files I restarted postgresql using 'service postgresql restart' . Now when I checked 

newly added data are gone and am not able to update any more using code(I used 

same code for updation before).  What can I do.Is there a way to recover the lost data.
         

--
-------------------
regards
archana
--------------------

Re: Data missing from table........

From
Raymond O'Donnell
Date:
On 22/01/2014 12:21, Archana K N wrote:
> Hi,
>
>          Recently  I updated my database with more columns and added
> data into it.
>
> Even works were performed on it. After updating  "postgresql.conf" and
> "pg_hba.conf"
>
>  files I restarted postgresql using 'service postgresql restart' . Now
> when I checked
>
> newly added data are gone and am not able to update any more using
> code(I used
>
> same code for updation before).  What can I do.Is there a way to recover
> the lost data.

A lot more information about what you did will make it easier for people
to help you -

- What platform are you on - both server and client?

- What commands did you execute in order to add columns?

- How did you insert data into the database?

- How did you establish that the data is gone?

Ray.


--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie


Re: Data missing from table........

From
Raymond O'Donnell
Date:
On 22/01/2014 12:29, Raymond O'Donnell wrote:
> On 22/01/2014 12:21, Archana K N wrote:
>> Hi,
>>
>>          Recently  I updated my database with more columns and added
>> data into it.
>>
>> Even works were performed on it. After updating  "postgresql.conf" and
>> "pg_hba.conf"

Also, what changes did you make to postgresql.conf and pg_hba.conf?

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie


Re: Data missing from table........

From
Raymond O'Donnell
Date:
On 22/01/2014 13:02, Archana K N wrote:
> Hi,
>
> I am working on Debian OS. Using Python for scripting and Psycopg2 as
> interface for postgres.

Hi Archana,

Please keep your replies on-list. Also, you'd probably be better off to
post to pgsql-general; this list is for PHP.

>
> For adding columns:-
> ALTER TABLE name ADD COLUMN;
>
> For Updation:-
>
>  UPDATE tbl_name SET col=value FROM(SELECT col FROM tabl2) AS somnam
> WHERE condition;
>
> For Insertion:-
>
>  INSERT INTO table_name VALUES();
>
>
> I tried to update another column , when I retrieved that specific one ,
> say updated col-1 and retrieved it, then all the retrieved value was
>
> blank.  Tried thru script then the updated columns where 'None'.
>
> In .conf files I just made the 'LISTEN ADDRESS to * and added a new line
> in hba.conf say 'host all all ip/mask md5. thats all.

I don't see anything there that would cause data to disappear.

I'm not familiar with either Python or Psycopg2, but could something be
rolling back the transaction after the UPDATE?

The other thought I had was that you were inadvertently connecting to a
different database - probably a silly question, but could that be possible?

Ray.


--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie


Re: Data missing from table........

From
Archana K N
Date:

No....

But I recovered data from another table....thanks for helping..

On Jan 22, 2014 11:30 PM, "Raymond O'Donnell" <rod@iol.ie> wrote:
On 22/01/2014 13:02, Archana K N wrote:
> Hi,
>
> I am working on Debian OS. Using Python for scripting and Psycopg2 as
> interface for postgres.

Hi Archana,

Please keep your replies on-list. Also, you'd probably be better off to
post to pgsql-general; this list is for PHP.

>
> For adding columns:-
> ALTER TABLE name ADD COLUMN;
>
> For Updation:-
>
>  UPDATE tbl_name SET col=value FROM(SELECT col FROM tabl2) AS somnam
> WHERE condition;
>
> For Insertion:-
>
>  INSERT INTO table_name VALUES();
>
>
> I tried to update another column , when I retrieved that specific one ,
> say updated col-1 and retrieved it, then all the retrieved value was
>
> blank.  Tried thru script then the updated columns where 'None'.
>
> In .conf files I just made the 'LISTEN ADDRESS to * and added a new line
> in hba.conf say 'host all all ip/mask md5. thats all.

I don't see anything there that would cause data to disappear.

I'm not familiar with either Python or Psycopg2, but could something be
rolling back the transaction after the UPDATE?

The other thought I had was that you were inadvertently connecting to a
different database - probably a silly question, but could that be possible?

Ray.


--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie