pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
archive logs recovery
7+ messages / 3 participants
[nested] [flat]

* archive logs recovery
@ 2006-08-31 19:12 Sriram Dandapani <sdandapani@counterpane.com>
  2006-08-31 20:19 ` Re: archive logs recovery Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 7+ messages in thread

From: Sriram Dandapani @ 2006-08-31 19:12 UTC (permalink / raw)
  To: pgsql-admin

I have a situation where the database needs to be restarted
periodically. Will this affect recovery of a database using a base
online backup that took place earlier than the restart. i.e 

 

1.	Take a base online backup
2.	Later shutdown and restart
3.	Perform a recovery using the base backup and the archive logs

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: archive logs recovery
  2006-08-31 19:12 archive logs recovery Sriram Dandapani <sdandapani@counterpane.com>
@ 2006-08-31 20:19 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2006-08-31 20:19 UTC (permalink / raw)
  To: Sriram Dandapani <sdandapani@counterpane.com>; +Cc: pgsql-admin

"Sriram Dandapani" <sdandapani@counterpane.com> writes:
> I have a situation where the database needs to be restarted
> periodically. Will this affect recovery of a database using a base
> online backup that took place earlier than the restart.

No.  But why do you need to shut down the database?  Most people
around here seem to want 24x7 operation ...

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: archive logs recovery
@ 2006-08-31 20:27 Sriram Dandapani <sdandapani@counterpane.com>
  2006-08-31 20:36 ` Re: archive logs recovery Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 7+ messages in thread

From: Sriram Dandapani @ 2006-08-31 20:27 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin

I have a very high traffic db with lots of table partitions. The only
reliable way to drop the partitioned tables is to prevent any
insert/select on the parent table , otherwise, the drop table locks out
the inserts, and strangely enough, the drop table command goes into a
wait state. During shutdown and restart, I switch the pg_hba.conf to
disallow client access for a brief period when the tables are dropped.

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us] 
Sent: Thursday, August 31, 2006 1:20 PM
To: Sriram Dandapani
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] archive logs recovery 

"Sriram Dandapani" <sdandapani@counterpane.com> writes:
> I have a situation where the database needs to be restarted
> periodically. Will this affect recovery of a database using a base
> online backup that took place earlier than the restart.

No.  But why do you need to shut down the database?  Most people
around here seem to want 24x7 operation ...

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: archive logs recovery
  2006-08-31 20:27 Re: archive logs recovery Sriram Dandapani <sdandapani@counterpane.com>
@ 2006-08-31 20:36 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2006-08-31 20:36 UTC (permalink / raw)
  To: Sriram Dandapani <sdandapani@counterpane.com>; +Cc: pgsql-admin

"Sriram Dandapani" <sdandapani@counterpane.com> writes:
> I have a very high traffic db with lots of table partitions. The only
> reliable way to drop the partitioned tables is to prevent any
> insert/select on the parent table , otherwise, the drop table locks out
> the inserts, and strangely enough, the drop table command goes into a
> wait state. During shutdown and restart, I switch the pg_hba.conf to
> disallow client access for a brief period when the tables are dropped.

You do know you can change pg_hba.conf without a restart?

As for the drop going into a wait state, you might want to look around
for client code that's sitting idle with an open transaction.  The drop
should not block for longer than whatever is your longest transaction
touching that table.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: archive logs recovery
@ 2006-08-31 20:38 Sriram Dandapani <sdandapani@counterpane.com>
  0 siblings, 0 replies; 7+ messages in thread

From: Sriram Dandapani @ 2006-08-31 20:38 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin

The issue is that the drop table immediately puts the jdbc insert into a
wait state and goes into a wait state itself. 

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us] 
Sent: Thursday, August 31, 2006 1:37 PM
To: Sriram Dandapani
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] archive logs recovery 

"Sriram Dandapani" <sdandapani@counterpane.com> writes:
> I have a very high traffic db with lots of table partitions. The only
> reliable way to drop the partitioned tables is to prevent any
> insert/select on the parent table , otherwise, the drop table locks
out
> the inserts, and strangely enough, the drop table command goes into a
> wait state. During shutdown and restart, I switch the pg_hba.conf to
> disallow client access for a brief period when the tables are dropped.

You do know you can change pg_hba.conf without a restart?

As for the drop going into a wait state, you might want to look around
for client code that's sitting idle with an open transaction.  The drop
should not block for longer than whatever is your longest transaction
touching that table.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: archive logs recovery
@ 2006-08-31 20:39 Sriram Dandapani <sdandapani@counterpane.com>
  2006-09-03 23:25 ` Re: archive logs recovery Aaron Bono <postgresql@aranya.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Sriram Dandapani @ 2006-08-31 20:39 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin

Also, the dynamic pg_hba changes work only for new connections that are
being established via jdbc. Existing connections seem to able to make
connections.

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us] 
Sent: Thursday, August 31, 2006 1:37 PM
To: Sriram Dandapani
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] archive logs recovery 

"Sriram Dandapani" <sdandapani@counterpane.com> writes:
> I have a very high traffic db with lots of table partitions. The only
> reliable way to drop the partitioned tables is to prevent any
> insert/select on the parent table , otherwise, the drop table locks
out
> the inserts, and strangely enough, the drop table command goes into a
> wait state. During shutdown and restart, I switch the pg_hba.conf to
> disallow client access for a brief period when the tables are dropped.

You do know you can change pg_hba.conf without a restart?

As for the drop going into a wait state, you might want to look around
for client code that's sitting idle with an open transaction.  The drop
should not block for longer than whatever is your longest transaction
touching that table.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: archive logs recovery
  2006-08-31 20:39 Re: archive logs recovery Sriram Dandapani <sdandapani@counterpane.com>
@ 2006-09-03 23:25 ` Aaron Bono <postgresql@aranya.com>
  0 siblings, 0 replies; 7+ messages in thread

From: Aaron Bono @ 2006-09-03 23:25 UTC (permalink / raw)
  To: Sriram Dandapani <sdandapani@counterpane.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-admin

On 8/31/06, Sriram Dandapani <sdandapani@counterpane.com> wrote:
>
> Also, the dynamic pg_hba changes work only for new connections that are
> being established via jdbc. Existing connections seem to able to make
> connections.



What about changing the permissions on the tables using the GRANT/REVOKE?
That way you can stop access to the tables you are working with without
having to change the pg_hba.conf or restarting the database.

==================================================================
   Aaron Bono
   Aranya Software Technologies, Inc.
   http://www.aranya.com
   http://codeelixir.com
==================================================================

^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2006-09-03 23:25 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-08-31 19:12 archive logs recovery Sriram Dandapani <sdandapani@counterpane.com>
2006-08-31 20:19 ` Tom Lane <tgl@sss.pgh.pa.us>
2006-08-31 20:27 Re: archive logs recovery Sriram Dandapani <sdandapani@counterpane.com>
2006-08-31 20:36 ` Tom Lane <tgl@sss.pgh.pa.us>
2006-08-31 20:38 Re: archive logs recovery Sriram Dandapani <sdandapani@counterpane.com>
2006-08-31 20:39 Re: archive logs recovery Sriram Dandapani <sdandapani@counterpane.com>
2006-09-03 23:25 ` Aaron Bono <postgresql@aranya.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox