mirror of
https://github.com/postgres/postgres.git
synced 2025-11-13 16:22:44 +03:00
Transaction log manager core code.
It doesn't work currently but also don't break anything -:)
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
# Makefile for access/transam
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $Header: /cvsroot/pgsql/src/backend/access/transam/Makefile,v 1.6 1998/04/06 00:21:52 momjian Exp $
|
||||
# $Header: /cvsroot/pgsql/src/backend/access/transam/Makefile,v 1.7 1999/09/27 15:47:37 vadim Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@@ -13,7 +13,7 @@ include ../../../Makefile.global
|
||||
|
||||
CFLAGS += -I../..
|
||||
|
||||
OBJS = transam.o transsup.o varsup.o xact.o xid.o
|
||||
OBJS = transam.o transsup.o varsup.o xact.o xid.o xlog.o rmgr.o
|
||||
|
||||
all: SUBSYS.o
|
||||
|
||||
|
||||
4
src/backend/access/transam/rmgr.c
Normal file
4
src/backend/access/transam/rmgr.c
Normal file
@@ -0,0 +1,4 @@
|
||||
#include "postgres.h"
|
||||
#include "access/rmgr.h"
|
||||
|
||||
RmgrData *RmgrTable = NULL;
|
||||
1434
src/backend/access/transam/xlog.c
Normal file
1434
src/backend/access/transam/xlog.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -10,7 +10,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.117 1999/09/27 03:13:05 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.118 1999/09/27 15:47:43 vadim Exp $
|
||||
*
|
||||
* NOTES
|
||||
*
|
||||
@@ -204,9 +204,10 @@ static int SendStop = false;
|
||||
|
||||
static bool NetServer = false; /* if not zero, postmaster listen for
|
||||
* non-local connections */
|
||||
#ifdef USE_SSL
|
||||
static bool SecureNetServer = false; /* if not zero, postmaster listens for only SSL
|
||||
* non-local connections */
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* GH: For !HAVE_SIGPROCMASK (NEXTSTEP), TRH implemented an
|
||||
@@ -990,12 +991,17 @@ readStartupPacket(void *arg, PacketLen len, void *pkt)
|
||||
|
||||
/* Could add additional special packet types here */
|
||||
|
||||
/* Any SSL negotiation must have taken place here, so drop the connection
|
||||
* ASAP if we require SSL */
|
||||
if (SecureNetServer && !port->ssl) {
|
||||
PacketSendError(&port->pktInfo, "Backend requires secure connection.");
|
||||
return STATUS_OK;
|
||||
#ifdef USE_SSL
|
||||
/*
|
||||
* Any SSL negotiation must have taken place here, so drop the connection
|
||||
* ASAP if we require SSL
|
||||
*/
|
||||
if (SecureNetServer && !port->ssl)
|
||||
{
|
||||
PacketSendError(&port->pktInfo, "Backend requires secure connection.");
|
||||
return STATUS_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Check we can handle the protocol the frontend is using. */
|
||||
|
||||
@@ -1832,6 +1838,7 @@ CountChildren(void)
|
||||
}
|
||||
|
||||
|
||||
#ifdef USE_SSL
|
||||
/*
|
||||
* Initialize SSL library and structures
|
||||
*/
|
||||
@@ -1860,3 +1867,4 @@ static void InitSSL(void) {
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Id: fd.c,v 1.47 1999/07/17 20:17:42 momjian Exp $
|
||||
* $Id: fd.c,v 1.48 1999/09/27 15:47:49 vadim Exp $
|
||||
*
|
||||
* NOTES:
|
||||
*
|
||||
@@ -49,6 +49,7 @@
|
||||
#include "miscadmin.h"
|
||||
#include "storage/fd.h"
|
||||
|
||||
bool ReleaseDataFile(void);
|
||||
/*
|
||||
* Problem: Postgres does a system(ld...) to do dynamic loading.
|
||||
* This will open several extra files in addition to those used by
|
||||
@@ -410,6 +411,19 @@ ReleaseLruFile()
|
||||
LruDelete(VfdCache[0].lruMoreRecently);
|
||||
}
|
||||
|
||||
bool
|
||||
ReleaseDataFile()
|
||||
{
|
||||
DO_DB(elog(DEBUG, "ReleaseDataFile. Opened %d", nfile));
|
||||
|
||||
if (nfile <= 0)
|
||||
return(false);
|
||||
Assert(VfdCache[0].lruMoreRecently != 0);
|
||||
LruDelete(VfdCache[0].lruMoreRecently);
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
static File
|
||||
AllocateVfd()
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.66 1999/09/23 17:02:52 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.67 1999/09/27 15:47:54 vadim Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -220,13 +220,13 @@ ProcessUtility(Node *parsetree,
|
||||
relname);
|
||||
}
|
||||
|
||||
rel = heap_openr(relname);
|
||||
rel = heap_openr(relname, AccessExclusiveLock);
|
||||
if (RelationIsValid(rel)) {
|
||||
if (rel->rd_rel->relkind == RELKIND_SEQUENCE) {
|
||||
elog(ERROR, "TRUNCATE cannot be used on sequences. '%s' is a sequence",
|
||||
relname);
|
||||
}
|
||||
heap_close(rel);
|
||||
heap_close(rel, NoLock);
|
||||
}
|
||||
#ifndef NO_SECURITY
|
||||
if (!pg_ownercheck(userName, relname, RELNAME)) {
|
||||
|
||||
Reference in New Issue
Block a user