mirror of
https://github.com/postgres/postgres.git
synced 2025-05-28 05:21:27 +03:00
Prevent multiple archivers from starting. Backpatch to 8.1.X.
Simon Riggs
This commit is contained in:
parent
f671bee9d0
commit
7bec90969f
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/catalog/pg_conversion.c,v 1.28 2005/10/18 01:06:23 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/catalog/pg_conversion.c,v 1.28.2.1 2006/05/30 13:31:01 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -18,6 +18,7 @@
|
||||
#include "catalog/dependency.h"
|
||||
#include "catalog/indexing.h"
|
||||
#include "catalog/pg_conversion.h"
|
||||
#include "catalog/pg_namespace.h"
|
||||
#include "catalog/pg_proc.h"
|
||||
#include "catalog/namespace.h"
|
||||
#include "utils/builtins.h"
|
||||
@ -124,6 +125,12 @@ ConversionCreate(const char *conname, Oid connamespace,
|
||||
recordDependencyOnOwner(ConversionRelationId, HeapTupleGetOid(tup),
|
||||
conowner);
|
||||
|
||||
/* create dependency on namespace */
|
||||
myself.classId = ConversionRelationId;
|
||||
referenced.classId = NamespaceRelationId;
|
||||
referenced.objectId = connamespace;
|
||||
recordDependencyOn(&myself, &referenced, DEPENDENCY_NORMAL);
|
||||
|
||||
heap_freetuple(tup);
|
||||
heap_close(rel, RowExclusiveLock);
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/postmaster/pgarch.c,v 1.18 2005/10/15 02:49:23 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/postmaster/pgarch.c,v 1.18.2.1 2006/05/30 13:31:01 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -352,7 +352,7 @@ pgarch_ArchiverCopyLoop(void)
|
||||
* some backend will add files onto the list of those that need archiving
|
||||
* while we are still copying earlier archives
|
||||
*/
|
||||
while (pgarch_readyXlog(xlog))
|
||||
while (PostmasterIsAlive(true) && pgarch_readyXlog(xlog))
|
||||
{
|
||||
int failures = 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user