Hello to all the Doers of Postgres!!!

Last time I went through forums, people spoke highly about 7.3 and its capability to do hot backups. My problem is if the database goes down and I lose my main data store, then I will lose all transactions back to the time I did the pg_dump.

Other databases (i e Oracle) solves this by retaining their archive logs in some physically separate storage. So, when you lose your data, you can restore the data from back-up, and then apply your archive log, and avoid losing any committed transactions. 

Postgresql has been lacking this all along. I've installed postgres 7.3b2 and still don't see any archive's flushed to any other place. Please let me know how is hot backup procedure implemented in current 7.3 beta(2) release.


Thanks.

Mon, 7 Oct 2002 13:21:06 -0400
"Sandeep Chadha" <sandeep@newnetco.com>
Hot Backup 
"Sandeep Chadha" <sandeep@newnetco.com> writes:
> Postgresql has been lacking this all along. I've installed postgres
> 7.3b2 and still don't see any archive's flushed to any other
> place. Please let me know how is hot backup procedure implemented in
> current 7.3 beta(2) release.

AFAIK no such hot backup feature has been implemented for 7.3 -- you
appear to have been misinformed.

That said, I agree that would be a good feature to have.

Cheers,

Neil

-- 
Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC


07 Oct 2002 13:48:00 -0400
Neil Conway <neilc@samurai.com>
Re: [HACKERS] Hot Backup
On 7 Oct 2002 at 13:48, Neil Conway wrote:

> "Sandeep Chadha" <sandeep@newnetco.com> writes:
> > Postgresql has been lacking this all along. I've installed postgres
> > 7.3b2 and still don't see any archive's flushed to any other
> > place. Please let me know how is hot backup procedure implemented in
> > current 7.3 beta(2) release.
> AFAIK no such hot backup feature has been implemented for 7.3 -- you
> appear to have been misinformed.

Is replication an answer to hot backup?

Bye
 Shridhar

--
ink, n.:	A villainous compound of tannogallate of iron, gum-arabic,	and water, 
chiefly used to facilitate the infection of	idiocy and promote intellectual 
crime.		-- H.L. Mencken


Tue, 08 Oct 2002 11:17:18 +0530
"Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>
Re: [HACKERS] Hot Backup
Shridhar Daithankar wrote:
> On 7 Oct 2002 at 13:48, Neil Conway wrote:
> 
> > "Sandeep Chadha" <sandeep@newnetco.com> writes:
> > > Postgresql has been lacking this all along. I've installed postgres
> > > 7.3b2 and still don't see any archive's flushed to any other
> > > place. Please let me know how is hot backup procedure implemented in
> > > current 7.3 beta(2) release.
> > AFAIK no such hot backup feature has been implemented for 7.3 -- you
> > appear to have been misinformed.
> 
> Is replication an answer to hot backup?

We already allow hot backups using pg_dump.  If you mean point-in-time
recovery, we have a patch for that ready for 7.4.

-- 
  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

Tue, 8 Oct 2002 20:26:57 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: [HACKERS] Hot Backup
Hi Sandeep.  What you were calling Hot Backup is really called Point in 
Time Recovery (PITR).  Hot Backup means making a complete backup of the 
database while it is running, something Postgresql has supported for a 
very long time.

On Mon, 7 Oct 2002, Sandeep Chadha wrote:

> Hello to all the Doers of Postgres!!!
> 
> Last time I went through forums, people spoke highly about 7.3 and its 
> capability to do hot backups. My problem is if the database goes down 
> and I lose my main data store, then I will lose all transactions back 
> to the time I did the pg_dump.

Let's make it clear that this kind of failure is EXTREMELY rare on real 
database servers since they almost ALL run their data sets on RAID arrays.  
While it is possible to lost >1 drive at the same time and all your 
database, it is probably more likely to have a bad memory chip corrupt 
your data silently, or a bad query delete data it shouldn't.

That said, there IS work ongoing to provide this facility for Postgresql, 
but I would much rather have work done on making large complex queries run 
faster, or fix the little issues with foreign keys cause deadlocks.

> Other databases (i e Oracle) solves this by retaining their archive 
> logs in some physically separate storage. So, when you lose your data, 
> you can restore the data from back-up, and then apply your archive log, 
> and avoid losing any committed transactions. 
> 
> > Postgresql has been lacking this all along. I've installed postgres 
> 7.3b2 and still don't see any archive's flushed to any other place. 
> Please let me know how is hot backup procedure implemented in current 
> 7.3 beta(2) release.

Again, you'll get better response to your questions if you call it "point 
in time recovery" or pitr.  Hot backup is the wrong word, and something 
Postgresql DOES have.

It also supports WALs, which stands for Write ahead logs.  These files 
store what the database is about to do before it does it.  Should the 
database crash with transactions pending, the server will come back up and 
process the pending transactions that are in the WAL files, ensuring the 
integrity of your database.

Point in Time recovery is very nice, but it's the last step in many to 
ensure a stable, coherent database, and will probably be in 7.4 or 
somewhere around there.  If you're running in a RAID array, then the loss 
of your datastore should be a very remote possibility.


Wed, 9 Oct 2002 10:19:26 -0600 (MDT)
"scott.marlowe" <scott.marlowe@ihs.com>
Point in Time Recovery WAS: Hot Backup 
Hi All,

I have a question related to postgres.I have an application which is transferring data from MSSQL to Postgres at some regular interval.

I had around 20,000 data in MSSQL which should be transferred to postgres.
After transferring around 12000 data I got a error message
ERROR: deadlock detected
And after that data transfer has stopped.

How to avoid this error and what is the reason for this error.
--
Best Regards
- Savita
----------------------------------------------------
Hewlett Packard (India)
+91 80 2051288 (Phone)
847 1288 (HP Telnet)
----------------------------------------------------



Hi All,
I have a question related to postgres.I have an application which is
transferring data from MSSQL to Postgres at some regular interval.
I had around 20,000 data in MSSQL which should be transferred to postgres.
After transferring around 12000 data I got a error message
ERROR: deadlock detected
And after that data transfer has stopped.
How to avoid this error and what is the reason
for this error.
--
Best Regards
- Savita
----------------------------------------------------
Hewlett Packard (India)
+91 80 2051288 (Phone)
847 1288 (HP Telnet)
----------------------------------------------------
Fri, 22 Nov 2002 11:54:00 +0530
Savita <savita@india.hp.com>
Question about DEADLOCK
On Fri, 22 Nov 2002, Savita wrote:

> Hi All,
>
> I have a question related to postgres.I have an application which is
> transferring data from MSSQL to Postgres at some regular interval.
>
> I had around 20,000 data in MSSQL which should be transferred to postgres.
> After transferring around 12000 data I got a error message
> ERROR: deadlock detected
> And after that data transfer has stopped.
>
> How to avoid this error and what is the reason for this error.

Most likely cause would be a concurrent transaction doing something that
caused a foreign key to get into a dead lock situation (the current
implementation grabs overly strong locks).  In any case, we'll need more
information about what else was going on probably.



Thu, 21 Nov 2002 23:04:52 -0800 (PST)
Stephan Szabo <sszabo@megazone23.bigpanda.com>
Re: Question about DEADLOCK
Thanks Stephan,

I wold like to know where to get LOCK manual/reference.

And what is ther error number it will return when this error will come.Is there
any work around this.HOw do I avoid this situation.

--
Best Regards
- Savita
----------------------------------------------------
Hewlett Packard (India)
+91 80 2051288 (Phone)
847 1288 (HP Telnet)
----------------------------------------------------


Stephan Szabo wrote:

> On Fri, 22 Nov 2002, Savita wrote:
>
> > Hi All,
> >
> > I have a question related to postgres.I have an application which is
> > transferring data from MSSQL to Postgres at some regular interval.
> >
> > I had around 20,000 data in MSSQL which should be transferred to postgres.
> > After transferring around 12000 data I got a error message
> > ERROR: deadlock detected
> > And after that data transfer has stopped.
> >
> > How to avoid this error and what is the reason for this error.
>
> Most likely cause would be a concurrent transaction doing something that
> caused a foreign key to get into a dead lock situation (the current
> implementation grabs overly strong locks).  In any case, we'll need more
> information about what else was going on probably.





Fri, 22 Nov 2002 12:40:09 +0530
Savita <savita@india.hp.com>
Re: Question about DEADLOCK
I recommend reading Tom Lane's talk "Concurrency Issues" at OSCON2002.
This will answer all questions and some more.

    Best regards,

            Hans



Savita wrote:

>--------------880B7BB5722DEBFDA92AF2C3
>Content-Type: text/plain; charset=us-ascii
>Content-Transfer-Encoding: 7bit
>
>Hi All,
>
>I have a question related to postgres.I have an application which is transferring data from MSSQL to Postgres at some regular interval.
>
>I had around 20,000 data in MSSQL which should be transferred to postgres.
>After transferring around 12000 data I got a error message
>ERROR: deadlock detected
>And after that data transfer has stopped.
>
>How to avoid this error and what is the reason for this error.
>--
>Best Regards
>- Savita
>----------------------------------------------------
>Hewlett Packard (India)
>+91 80 2051288 (Phone)
>847 1288 (HP Telnet)
>----------------------------------------------------
>
>
>--------------880B7BB5722DEBFDA92AF2C3
>Content-Type: text/html; charset=us-ascii
>Content-Transfer-Encoding: 7bit
>
><!doctype html public "-//w3c//dtd html 4.0 transitional//en">
><html>
>Hi All,
><p>I have a question related to postgres.I have an application which is
>transferring data from MSSQL to Postgres at some regular interval.
><p>I had around 20,000 data in MSSQL which should be transferred to postgres.
><br>After transferring around 12000 data I got a error message
><br><b><font color="#3333FF">ERROR: deadlock detected</font></b>
><br><font color="#000000">And after that data transfer has stopped.</font><font color="#000000"></font>
><p><font color="#000000">How to avoid this error and what is the reason
>for this error.</font>
><br>--
><br>Best Regards
><br>- Savita
><br>----------------------------------------------------
><br>Hewlett Packard (India)
><br>+91 80 2051288 (Phone)
><br>847 1288 (HP Telnet)
><br>----------------------------------------------------
><br>&nbsp;</html>
>
>--------------880B7BB5722DEBFDA92AF2C3--
>
>  
>


-- 
*Cybertec Geschwinde u Schoenig*
Ludo-Hartmannplatz 1/14, A-1160 Vienna, Austria
Tel: +43/1/913 68 09; +43/664/233 90 75
www.postgresql.at <http://www.postgresql.at>, cluster.postgresql.at 
<http://cluster.postgresql.at>, www.cybertec.at 
<http://www.cybertec.at>, kernel.cybertec.at <http://kernel.cybertec.at>


Fri, 22 Nov 2002 09:16:16 +0100
=?ISO-8859-1?Q?Hans-J=FCrgen_Sch=F6nig?= <hs@cybertec.at>
Re: Question about DEADLOCK

On Fri, 22 Nov 2002, Savita wrote:

> I wold like to know where to get LOCK manual/reference.

Well, there's the entry for the LOCK command, but I don't think
that's what you want, what exactly are you looking for?


> And what is ther error number it will return when this error will come.Is there
> any work around this.HOw do I avoid this situation.

I don't know of an error number, but the string will will have that
deadlock detected in it. :) As for a workaround, since we don't know
what's causing it, we can't really give you a workaround.

What's the schema of the table you're transferring to and what else
was going on in the server at the time you got the deadlock?  I'd
guess it was a foreign key, but that only applies if you've got
foreign keys, for example.


Fri, 22 Nov 2002 07:35:47 -0800 (PST)
Stephan Szabo <sszabo@megazone23.bigpanda.com>
Re: Question about DEADLOCK
Hello,
You try load data first and then referential constraints

regards
Haris Peco
On Friday 22 November 2002 07:10 am, Savita wrote:
> Thanks Stephan,
>
> I wold like to know where to get LOCK manual/reference.
>
> And what is ther error number it will return when this error will come.Is
> there any work around this.HOw do I avoid this situation.
>
> --
> Best Regards
> - Savita
> ----------------------------------------------------
> Hewlett Packard (India)
> +91 80 2051288 (Phone)
> 847 1288 (HP Telnet)
> ----------------------------------------------------
>
> Stephan Szabo wrote:
> > On Fri, 22 Nov 2002, Savita wrote:
> > > Hi All,
> > >
> > > I have a question related to postgres.I have an application which is
> > > transferring data from MSSQL to Postgres at some regular interval.
> > >
> > > I had around 20,000 data in MSSQL which should be transferred to
> > > postgres. After transferring around 12000 data I got a error message
> > > ERROR: deadlock detected
> > > And after that data transfer has stopped.
> > >
> > > How to avoid this error and what is the reason for this error.
> >
> > Most likely cause would be a concurrent transaction doing something that
> > caused a foreign key to get into a dead lock situation (the current
> > implementation grabs overly strong locks).  In any case, we'll need more
> > information about what else was going on probably.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html


Fri, 22 Nov 2002 17:30:35 +0000
snpe <snpe@snpe.co.yu>
Re: Question about DEADLOCK
I haven't seen this before, and I can't find it on techdocs. Can you 
post a link to it?

-tfo

In article <3DDDE7D0.5040803@cybertec.at>,
 Hans-Jurgen Schonig <hs@cybertec.at> wrote:

> I recommend reading Tom Lane's talk "Concurrency Issues" at OSCON2002.
> This will answer all questions and some more.
> 
>     Best regards,
> 
>             Hans

Thu, 09 Jan 2003 13:09:47 -0600
Thomas O'Connell <tfo@monsterlabs.com>
Re: Question about DEADLOCK
"Thomas O'Connell" <tfo@monsterlabs.com> writes:
>  Hans-Jurgen Schonig <hs@cybertec.at> wrote:
>> I recommend reading Tom Lane's talk "Concurrency Issues" at OSCON2002.

> I haven't seen this before, and I can't find it on techdocs. Can you 
> post a link to it?

You can find a PDF at O'Reilly's conferences archive,

http://conferences.oreillynet.com/cs/os2002/view/e_sess/2681

I recall asking Vince to put a copy on the Postgres website, but I don't
think he ever got around to it.

			regards, tom lane

Thu, 09 Jan 2003 16:04:58 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: Question about DEADLOCK 