!1867 修复cmake编译问题以及解决创建订阅时无发布表的空集合处理问题

Merge pull request !1867 from chenxiaobin/initial_data
This commit is contained in:
opengauss-bot
2022-06-20 01:36:25 +00:00
committed by Gitee
6 changed files with 13 additions and 13 deletions

View File

@ -613,7 +613,7 @@ void SnapshotSetCommandId(CommandId curcid)
* must take care of all the same considerations as the first-snapshot case
* in GetTransactionSnapshot.
*/
void SetTransactionSnapshot(Snapshot sourcesnap, VirtualTransactionId *sourcevxid, int sourcepid)
void SetTransactionSnapshot(Snapshot sourcesnap, VirtualTransactionId *sourcevxid, ThreadId sourcepid)
{
/* Caller should have checked this already */
Assert(!u_sess->utils_cxt.FirstSnapshotSet);
@ -1498,7 +1498,7 @@ void ImportSnapshot(const char* idstr)
struct stat stat_buf;
char* filebuf = NULL;
VirtualTransactionId src_vxid;
int src_pid;
ThreadId src_pid;
Oid src_dbid;
int src_isolevel;
bool src_readonly = false;

View File

@ -354,7 +354,7 @@ static uint32 predicatelock_hash(const void *key, Size keysize);
static void SummarizeOldestCommittedSxact(void);
static Snapshot GetSafeSnapshot(Snapshot snapshot);
static Snapshot GetSerializableTransactionSnapshotInt(Snapshot snapshot, VirtualTransactionId *sourcevxid,
int sourcepid);
ThreadId sourcepid);
static bool PredicateLockExists(const PREDICATELOCKTARGETTAG *targettag);
static bool GetParentPredicateLockTag(const PREDICATELOCKTARGETTAG* tag, PREDICATELOCKTARGETTAG* parent);
static bool CoarserLockCovers(const PREDICATELOCKTARGETTAG* newtargettag);
@ -1404,7 +1404,7 @@ Snapshot GetSerializableTransactionSnapshot(Snapshot snapshot)
* transaction; and if we're read-write, the source transaction must not be
* read-only.
*/
void SetSerializableTransactionSnapshot(Snapshot snapshot, VirtualTransactionId *sourcevxid, int sourcepid)
void SetSerializableTransactionSnapshot(Snapshot snapshot, VirtualTransactionId *sourcevxid, ThreadId sourcepid)
{
Assert(IsolationIsSerializable());
@ -1431,7 +1431,7 @@ void SetSerializableTransactionSnapshot(Snapshot snapshot, VirtualTransactionId
* We do that by calling ProcArrayInstallImportedXmin.
*/
static Snapshot GetSerializableTransactionSnapshotInt(Snapshot snapshot, VirtualTransactionId *sourcevxid,
int sourcepid)
ThreadId sourcepid)
{
PGPROC *proc = NULL;
VirtualTransactionId vxid;
@ -1482,7 +1482,7 @@ static Snapshot GetSerializableTransactionSnapshotInt(Snapshot snapshot, Virtual
LWLockRelease(SerializableXactHashLock);
ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), errmsg("could not import the requested snapshot"),
errdetail("The source process with pid %d is not running anymore.", sourcepid)));
errdetail("The source process with pid %lu is not running anymore.", sourcepid)));
}
/*

View File

@ -1395,10 +1395,6 @@ static void libpqrcv_processTuples(PGresult *pgres, WalRcvExecResult *walres, co
MemoryContext rowcontext;
MemoryContext oldcontext;
/* No point in doing anything here if there were no tuples returned. */
if (PQntuples(pgres) == 0)
return;
/* Make sure we got expected number of fields. */
if (nfields != nRetTypes)
ereport(ERROR,
@ -1412,6 +1408,10 @@ static void libpqrcv_processTuples(PGresult *pgres, WalRcvExecResult *walres, co
TupleDescInitEntry(walres->tupledesc, (AttrNumber)coln + 1, PQfname(pgres, coln), retTypes[coln], -1, 0);
attinmeta = TupleDescGetAttInMetadata(walres->tupledesc);
/* No point in doing anything here if there were no tuples returned. */
if (PQntuples(pgres) == 0)
return;
/* Create temporary context for local allocations. */
rowcontext = AllocSetContextCreate(CurrentMemoryContext, "libpqrcv query result context", ALLOCSET_DEFAULT_SIZES);

View File

@ -32,7 +32,7 @@
#include "pgtime.h" /* for pg_time_t */
#include "libpq/libpq-be.h"
#define InvalidPid (-1)
#define InvalidPid ((ThreadId)(-1))
#define PG_BACKEND_VERSIONSTR "gaussdb " DEF_GS_VERSION "\n"

View File

@ -35,7 +35,7 @@ extern bool PageIsPredicateLocked(Relation relation, BlockNumber blkno);
/* predicate lock maintenance */
extern Snapshot GetSerializableTransactionSnapshot(Snapshot snapshot);
extern void SetSerializableTransactionSnapshot(Snapshot snapshot, VirtualTransactionId *sourcevxid, int sourcepid);
extern void SetSerializableTransactionSnapshot(Snapshot snapshot, VirtualTransactionId *sourcevxid, ThreadId sourcepid);
extern void RegisterPredicateLockingXid(TransactionId xid);
extern void PredicateLockRelation(Relation relation, Snapshot snapshot);
extern void PredicateLockPage(Relation relation, BlockNumber blkno, Snapshot snapshot);

View File

@ -116,5 +116,5 @@ extern void SetupHistoricSnapshot(Snapshot snapshot_now, struct HTAB* tuplecids)
extern void TeardownHistoricSnapshot(bool is_error);
extern bool HistoricSnapshotActive(void);
extern void SetTransactionSnapshot(Snapshot sourcesnap, VirtualTransactionId *sourcevxid, int sourcepid);
extern void SetTransactionSnapshot(Snapshot sourcesnap, VirtualTransactionId *sourcevxid, ThreadId sourcepid);
#endif /* SNAPMGR_H */