Re: [GENERAL] [COMMITTERS] recover deleted records

2009-11-24 Thread Scott Bailey

Pavel Stehule wrote:

2009/11/24 Allan Morris Caras :

Hi,

I tried to test it but it says couldn't find class 'pg_attribute'


It is strange - but this software isn't maintained long time, and it's
not actual.

so it is a bad

Pavel


When I tried looking into the table that deleted records from, it didn't revert 
back what I've deleted.

Any clues?


Easiest is to restore from backup ;)

It would be cool if there was an XID override function. If you could for 
instance say "run this query, but I want you to use the XID immediately 
before the one that wiped out my table," then you could see all of those 
deleted rows. To my knowledge, no such functionality exists, but it 
might not be that hard.


And if you were really brave, you could copy the binary file for that 
table and walk it removing the xmax values that matched the offending 
transaction. There may be problems with the freespace map or other 
issues that I'm not aware of, but I'd probably at least try it if I was 
going to lose my job or the company lose mega $ over it.


Scott Bailey


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] [COMMITTERS] recover deleted records

2009-11-24 Thread Pavel Stehule
2009/11/24 Allan Morris Caras :
> Hi,
>
> I tried to test it but it says couldn't find class 'pg_attribute'

It is strange - but this software isn't maintained long time, and it's
not actual.

so it is a bad

Pavel

>
> When I tried looking into the table that deleted records from, it didn't 
> revert back what I've deleted.
>
> Any clues?
>
>
>
>
>
> - Original Message 
> From: Pavel Stehule 
> To: Allan Morris Caras 
> Cc: pgsql-general@postgresql.org
> Sent: Tue, November 24, 2009 6:31:17 PM
> Subject: Re: [COMMITTERS] recover deleted records
>
> 2009/11/24 Allan Morris Caras :
>> Hi,
>>
>> No, auto vacuum is not enabled.
>
> ok then don't try to call vacuum in any form. so some undelete is
> possible. It was good new. Bad new - nobody wrote any tool for it.
> There are pgfsck, but itsn't three years actualised - but you can try
> it.
>
> look on http://svana.org/kleptog/pgsql/pgfsck.html
>
> good luck
> Pavel Stehule
>
>
>
>>
>>
>>
>>
>>
>> - Original Message 
>> From: Pavel Stehule 
>> To: Allan Morris Caras 
>> Cc: "pgsql-general@postgresql.org >> PG-General Mailing List" 
>> 
>> Sent: Tue, November 24, 2009 6:14:22 PM
>> Subject: Re: [COMMITTERS] recover deleted records
>>
>> Hello
>>
>> Have you enabled autovacuum?
>>
>> Pavel
>>
>> p.s. please, don't use pgsql-commiters mailing list for general questions.
>>
>> use pgsql-general.
>>
>> 2009/11/24 Allan Morris Caras :
>>> I have accidentally / stupidly deleted records from a table.
>>>
>>> I tried delete from where exist and it deleted the whole table.
>>>
>>> Is there a way I can recover it?
>>>
>>> I'm using postgres 8.4
>>>
>>> Any help is appreciated. TIA
>>>
>>>
>>>
>>>
>>>
>>> --
>>> Sent via pgsql-committers mailing list (pgsql-committ...@postgresql.org)
>>> To make changes to your subscription:
>>> http://www.postgresql.org/mailpref/pgsql-committers
>>>
>>
>>
>>
>>
>>
>
>
>
>
>

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] [COMMITTERS] recover deleted records

2009-11-24 Thread Allan Morris Caras
Hi,

I tried to test it but it says couldn't find class 'pg_attribute'

When I tried looking into the table that deleted records from, it didn't revert 
back what I've deleted.

Any clues?





- Original Message 
From: Pavel Stehule 
To: Allan Morris Caras 
Cc: pgsql-general@postgresql.org
Sent: Tue, November 24, 2009 6:31:17 PM
Subject: Re: [COMMITTERS] recover deleted records

2009/11/24 Allan Morris Caras :
> Hi,
>
> No, auto vacuum is not enabled.

ok then don't try to call vacuum in any form. so some undelete is
possible. It was good new. Bad new - nobody wrote any tool for it.
There are pgfsck, but itsn't three years actualised - but you can try
it.

look on http://svana.org/kleptog/pgsql/pgfsck.html

good luck
Pavel Stehule



>
>
>
>
>
> - Original Message 
> From: Pavel Stehule 
> To: Allan Morris Caras 
> Cc: "pgsql-general@postgresql.org >> PG-General Mailing List" 
> 
> Sent: Tue, November 24, 2009 6:14:22 PM
> Subject: Re: [COMMITTERS] recover deleted records
>
> Hello
>
> Have you enabled autovacuum?
>
> Pavel
>
> p.s. please, don't use pgsql-commiters mailing list for general questions.
>
> use pgsql-general.
>
> 2009/11/24 Allan Morris Caras :
>> I have accidentally / stupidly deleted records from a table.
>>
>> I tried delete from where exist and it deleted the whole table.
>>
>> Is there a way I can recover it?
>>
>> I'm using postgres 8.4
>>
>> Any help is appreciated. TIA
>>
>>
>>
>>
>>
>> --
>> Sent via pgsql-committers mailing list (pgsql-committ...@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-committers
>>
>
>
>
>
>



  

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] [COMMITTERS] recover deleted records

2009-11-24 Thread Pavel Stehule
2009/11/24 Allan Morris Caras :
> Hi,
>
> No, auto vacuum is not enabled.

ok then don't try to call vacuum in any form. so some undelete is
possible. It was good new. Bad new - nobody wrote any tool for it.
There are pgfsck, but itsn't three years actualised - but you can try
it.

look on http://svana.org/kleptog/pgsql/pgfsck.html

good luck
Pavel Stehule



>
>
>
>
>
> - Original Message 
> From: Pavel Stehule 
> To: Allan Morris Caras 
> Cc: "pgsql-general@postgresql.org >> PG-General Mailing List" 
> 
> Sent: Tue, November 24, 2009 6:14:22 PM
> Subject: Re: [COMMITTERS] recover deleted records
>
> Hello
>
> Have you enabled autovacuum?
>
> Pavel
>
> p.s. please, don't use pgsql-commiters mailing list for general questions.
>
> use pgsql-general.
>
> 2009/11/24 Allan Morris Caras :
>> I have accidentally / stupidly deleted records from a table.
>>
>> I tried delete from where exist and it deleted the whole table.
>>
>> Is there a way I can recover it?
>>
>> I'm using postgres 8.4
>>
>> Any help is appreciated. TIA
>>
>>
>>
>>
>>
>> --
>> Sent via pgsql-committers mailing list (pgsql-committ...@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-committers
>>
>
>
>
>
>

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] [COMMITTERS] recover deleted records

2009-11-24 Thread Allan Morris Caras
Hi,

No, auto vacuum is not enabled.





- Original Message 
From: Pavel Stehule 
To: Allan Morris Caras 
Cc: "pgsql-general@postgresql.org >> PG-General Mailing List" 

Sent: Tue, November 24, 2009 6:14:22 PM
Subject: Re: [COMMITTERS] recover deleted records

Hello

Have you enabled autovacuum?

Pavel

p.s. please, don't use pgsql-commiters mailing list for general questions.

use pgsql-general.

2009/11/24 Allan Morris Caras :
> I have accidentally / stupidly deleted records from a table.
>
> I tried delete from where exist and it deleted the whole table.
>
> Is there a way I can recover it?
>
> I'm using postgres 8.4
>
> Any help is appreciated. TIA
>
>
>
>
>
> --
> Sent via pgsql-committers mailing list (pgsql-committ...@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-committers
>



  

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] [COMMITTERS] recover deleted records

2009-11-24 Thread Pavel Stehule
Hello

Have you enabled autovacuum?

Pavel

p.s. please, don't use pgsql-commiters mailing list for general questions.

use pgsql-general.

2009/11/24 Allan Morris Caras :
> I have accidentally / stupidly deleted records from a table.
>
> I tried delete from where exist and it deleted the whole table.
>
> Is there a way I can recover it?
>
> I'm using postgres 8.4
>
> Any help is appreciated. TIA
>
>
>
>
>
> --
> Sent via pgsql-committers mailing list (pgsql-committ...@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-committers
>

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] [COMMITTERS]

2009-04-06 Thread Emanuel Calvo Franco
2009/4/6 eehab hamzeh :
> Dear Sir
>
> I am trying to build some functions using C language. these functions are
> mentioned in the postgresql documentation.
>
> the only function that are work are the one with int32 variable.
> the other function bring errors and are not working
> any body can give directions
>
> here are the code and the error , i compile them using vc++ 6 and VC++ 2008
> and minGW the example below are for minGW
>
> THANKS
>
> #include "postgres.h"
> #include 
> #include "fmgr.h"
>
> #ifdef PG_MODULE_MAGIC
> PG_MODULE_MAGIC;
> #endif
>
> /* by value */
>
> PG_FUNCTION_INFO_V1(add_one);
>
> Datum
> add_one(PG_FUNCTION_ARGS)
> {
>     int32   arg = PG_GETARG_INT32(0);
>
>     PG_RETURN_INT32(arg + 1);
> }
>
> /* by reference, fixed length */
>
> PG_FUNCTION_INFO_V1(add_on e_float8);
>
> Datum
> add_one_float8(PG_FUNCTION_ARGS)
> {
>     /* The macros for FLOAT8 hide its pass-by-reference nature. */
>     float8   arg = PG_GETARG_FLOAT8(0);
>
>     PG_RETURN_FLOAT8(arg + 1.0);
> }
>
> PG_FUNCTION_INFO_V1(makepoint);
>
> Datum
> makepoint(PG_FUNCTION_ARGS)
> {
>     /* Here, the pass-by-reference nature of Point is not hidden. */
>     Point     *pointx = PG_GETARG_POINT_P(0);
>     Point     *pointy = PG_GETARG_POINT_P(1);
>     Point     *new_point = (Point *) palloc(sizeof(Point));
>
>     new_point->x = pointx->x;
>     new_point->y = pointy->y;
>
>     PG_RETURN_POINT_P(new_point);
> }
>
> /* by reference, variable length */
>
> PG_FUNCTION_INFO_V1(copytext);
>
> Datum
> copytext(PG_FUNCTION_ARGS)
> {
>     text     *t = PG_GETARG_TEXT_P(0);
>     /*
>      * VARSIZE is the total size of the struct in bytes.
>      */
>     text     *new_t = (text *) palloc(VARSIZE(t));
>     VARATT_SIZEP(new_t) = VARSIZE(t);
>     /*
>      * VARDATA is a pointer to the data region of the struct.
>      */
>     memcpy((void *) VARDATA(new_t), /* destination */
>            (void *) VARDATA(t),     /* source */
>            VARSIZE(t)-VARHDRSZ);    /* how many bytes */
>     PG_RETURN_TEXT_P(new_t);
> }
>
> PG_FUNCTION_INFO_V1(concat_text);
>
> Datum
> concat_text(PG_FUNCTION_ARGS)
> {
>     text  *arg1 = PG_GETARG_TEXT_P(0);
>     text  *arg2 = PG_GETARG_TEXT_P(1);
>     int32 new_text_size = VARSIZE(arg1) + VARSIZE(arg2) - VARHDRSZ;
>     text *new_text = (text *) palloc(new_text_size);
>
>     VARATT_SIZEP(new_text) = new_text_size;
>     memcpy(VARDATA(new_text), VARDATA(arg1), VARSIZE(arg1)-VARHDRSZ);
>     memcpy(VARDATA(new_text) + (VARSIZE(arg1)-VARHDRSZ ),
>            VARDATA(arg2), VARSIZE(arg2)-VARHDRSZ);
>     PG_RETURN_TEXT_P(new_text);
> }
>
>
> the error
>
> in function 'makepoint':
> error: 'Point' undeclared (first use in this function)
> error: (each undeclared identifier is reported only one
> error: for each function it appears in.)
> error: 'pointx' undeclared (first use in ´this function)
> error: 'pointy' undeclared (first use in his fnction)
> error 'new_point' undeclared (first use in his function)
> error: syntax error befre ')' oken
> in function 'copy text':
> error: 'invalid lvalue in assinment
> In function 'concat_text'
> error: invalid lvalue in assignement
> warning no new line at end of file
>
> Please any direction of how to solve the problem
>
> here is the command i wrote in MinGW
>
> gcc -shared -o hamzeh.dll tt1.o -L "c:/programme/postgresql/8.3/lib"
> -lpostgres
>

try c:\programme\ 

And try the option -I (include)

REPLY TO pgsql-gene...@portgresql.org,please...

Comitters is not a list to make questions :)

And please, when you post a question put a description
in the subject of the mail.

Thanks.

-- 
  Emanuel Calvo Franco
Sumate al ARPUG !
  (www.postgres-arg.org -
 www.arpug.com.ar)
ArPUG / AOSUG Member
   Postgresql Support & Admin

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] [COMMITTERS]

2009-04-06 Thread Emanuel Calvo Franco
2009/4/6 eehab hamzeh :
> here are the code and the error , i compile them using vc++ 6 and VC++ 2008
> and minGW the example below are for minGW
> THANKS
>
> #include "postgres.h"
> #include 
> #include "fmgr.h"
>
> #ifdef PG_MODULE_MAGIC
> PG_MODULE_MAGIC;
> #endif
>
> /* by value */
>
> PG_FUNCTION_INFO_V1(add_one);
>
> Datum
> add_one(PG_FUNCTION_ARGS)
> {
>     int32   arg = PG_GETARG_INT32(0);
>
>     PG_RETURN_INT32(arg + 1);
> }
>
> /* by reference, fixed length */
>
> PG_FUNCTION_INFO_V1(add_one_float8);
>
> Datum
> add_one_float8(PG_FUNCTION_ARGS)
> {
>     /* The macros for FLOAT8 hide its pass-by-reference nature. */
>     float8   arg = PG_GETARG_FLOAT8(0);
>
>     PG_RETURN_FLOAT8(arg + 1.0);
> }
>
> PG_FUNCTION_INFO_V1(makepoint);
>
> Datum
> makepoint(PG_FUNCTION_ARGS)
> {
>     /* Here, the pass-by-reference nature of Point is not hidden. */
>     Point     *pointx = PG_GETARG_POINT_P(0);
>     Point     *pointy = PG_GETARG_POINT_P(1);
>     Point     *new_point = (Point *) palloc(sizeof(Point));
>
>     new_point->x = pointx->x;
>     new_point->y = pointy->y;
>
>     PG_RETURN_POINT_P(new_point);
> }
>
> /* by reference, variable length */
>
> PG_FUNCTION_INFO_V1(copytext);
>
> Datum
> copytext(PG_FUNCTION_ARGS)
> {
>     text     *t = PG_GETARG_TEXT_P(0);
>     /*
>      * VARSIZE is the total size of the struct in bytes.
>      */
>     text     *new_t = (text *) palloc(VARSIZE(t));
>     VARATT_SIZEP(new_t) = VARSIZE(t);
>     /*
>      * VARDATA is a pointer to the data region of the struct.
>      */
>     memcpy((void *) VARDATA(new_t), /* destination */
>            (void *) VARDATA(t),     /* source */
>            VARSIZE(t)-VARHDRSZ);    /* how many bytes */
>     PG_RETURN_TEXT_P(new_t);
> }
>
> PG_FUNCTION_INFO_V1(concat_text);
>
> Datum
> concat_text(PG_FUNCTION_ARGS)
> {
>     text  *arg1 = PG_GETARG_TEXT_P(0);
>     text  *arg2 = PG_GETARG_TEXT_P(1);
>     int32 new_text_size = VARSIZE(arg1) + VARSIZE(arg2) - VARHDRSZ;
>     text *new_text = (text *) palloc(new_text_size);
>
>     VARATT_SIZEP(new_text) = new_text_size;
>     memcpy(VARDATA(new_text), VARDATA(arg1), VARSIZE(arg1)-VARHDRSZ);
>     memcpy(VARDATA(new_text) + (VARSIZE(arg1)-VARHDRSZ),
>            VARDATA(arg2), VARSIZE(arg2)-VARHDRSZ);
>     PG_RETURN_TEXT_P(new_text);
> }
>
>
> the error
>
> in function 'makepoint':
> error: 'Point' undeclared (first use in this function)
> error: (each undeclared identifier is reported only one
> error: for each function it appears in.)
> error: 'pointx' undeclared (first use in ´this function)
> error: 'pointy' undeclared (first use in his fnction)
> error 'new_point' undeclared (first use in his function)
> error: syntax error befre ')' oken
> in function 'copy text':
> error: 'invalid lvalue in assinment
> In function 'concat_text'
> error: invalid lvalue in assignement
> warning no new line at end of file
>
> Please any direction of how to solve the problem
>
> thanks
>
>

You aren't including the path of the libs when you compiling (option -I).

don't send to comitters please, send into pgsql-general.

Thanks.


-- 
  Emanuel Calvo Franco
Sumate al ARPUG !
  (www.postgres-arg.org -
 www.arpug.com.ar)
ArPUG / AOSUG Member
   Postgresql Support & Admin

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] [COMMITTERS]

2009-04-06 Thread Emanuel Calvo Franco
2009/4/6 eehab hamzeh :
>     Hello
>
> I am trying to build some functions using C language. these functions are
> mentioned in the postgresql documentation.
>
> http://www.postgresql.org/docs/8.3/interactive/xfunc-c.html
>
> Datum
> add_one_float8(PG_FUNCTION_ARGS)
> {
> /* The macros for FLOAT8 hide its pass-by-reference nature. */
> float8   arg = PG_GETARG_FLOAT8(0);
>
> PG_RETURN_FLOAT8(arg + 1.0);
> }
>
> PG_FUNCTION_INFO_V1(makepoint);
>
> Datum
> makepoint(PG_FUNCTION_ARGS)
> {
> /* Here, the pass-by-reference nature of Point is not hidden. */
> Point *pointx = PG_GETARG_POINT_P(0);
> Point *pointy = PG_GETARG_POINT_P(1);
> Point *new_point = (Point *) palloc(sizeof(Point));
>
> new_point->x = pointx->x;
> new_point->y = pointy->y;
>
> PG_RETURN_POINT_P(new_
>  point);
> }
>
> the only function that are work are the one with int32 variable.
> the other function bring errors and are not working
> any body can give directions
>
>
> kind regards
> ihab

Re-send to pgsql-general.

Can you paste these errors and how you're compiling this?

-- 
  Emanuel Calvo Franco
Sumate al ARPUG !
  (www.postgres-arg.org -
 www.arpug.com.ar)
ArPUG / AOSUG Member
   Postgresql Support & Admin

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] [COMMITTERS] How I can add new function writing on C under Win32

2005-02-08 Thread Bruce Momjian
deeps1 wrote:
> Hello pgsql-committers,
> 
> 
> 
> How I can compiling and linking Dynamically-Loaded Functions on Win32?
> 
> In  Docs describe all platforms BSD , FreeBSD,
> 
> 
> Linux for example
> The compiler flag to create PIC is -fpic. On some platforms in some 
> situations -fPIC must be used if -fpic does not work. Refer to the GCC manual 
> for more information. The compiler flag to create a shared library is 
> -shared. A complete example looks like this: 
> 
> cc -fpic -c foo.c
> cc -shared -o foo.so foo.o
> 
> but no describe under Win32 for Postges 8.0.1 under Win32

[ Moved to 'general'.]

Take a look at how the regression tests link regress.so using the MinGW
tools and that will show the flags to use.

-- 
  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 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [GENERAL] [COMMITTERS] PostgreSQL on MAINFRAME

2001-09-24 Thread Tatsuo Ishii

[Moved to general]

> We are attempting to introduce LINUX/POSTGRESQL into our environment.
> 
> We will test TURBOLINUX on the mainframe.   Has anyone installed POSTGRESQL
> on the MAINFRAME?

I got an account on IBM/S390/Turbo Linux combo and happily ran
PostgreSQL 7.1.
--
Tatsuo Ishii

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]