398 Star 1.4K Fork 1.5K

GVPopenGauss / openGauss-server

 / 详情

执行gs_dump报错:ERROR: current transaction is aborted, commands ignored until end of transaction block, firstChar[Q]

已取消
缺陷
创建于  
2023-06-06 21:15

【操作系统和硬件信息】
输入图片说明
【测试环境】(单机/1主x备x级联备):
一主一备
【被测功能】:导出单表数据
【数据库版本】(查询命令: gaussdb -V):
gaussdb (openGauss 3.0.3 build 46134f73) compiled at 2023-01-10 22:42:07 commit 0 last mr
【预置条件】:
导出表时存在业务数据insert、update
【操作步骤】(请填写详细的操作步骤):
输入图片说明

评论 (7)

wangpy_1092 创建了缺陷

Hey @wangpy_1092, Welcome to openGauss Community.
All of the projects in openGauss Community are maintained by @opengauss-bot.
That means the developers can comment below every pull request or issue to trigger Bot Commands.
Please follow instructions at Here to find the details.

Hi @wangpy_1092, please use the command /sig xxx to add a SIG label to this issue.
For example: /sig sqlengine or /sig storageengine or /sig om or /sig ai and so on.
You can find more SIG labels from Here.
If you have no idea about that, please contact with @xiangxinyong , @zhangxubo .

jiexiao1413 优先级设置为次要
jiexiao1413 负责人设置为周斌
周斌 添加协作者周斌
周斌 负责人周斌 修改为吴岳川
周斌 取消协作者周斌
周斌 添加协作者pengjiong

@吴岳川 找下PR,印象中原来有一个bug是 recycle_obj 这个函数的问题,应该已经修复了

pengjiong 组织设置为待联系提单人获取具体场景
pengjiong 组织待联系提单人获取具体场景 修改为待联系提单人获取具体场景。本地未复现

您好,目前问题相关报错,猜测是上一条语句执行失败,导致事务失败导致的问题。
从目前提供的日志信息来看,无法确认具体问题。

可以请您提供对应pg_log或者提供下必先步骤吗?

pengjiong 计划开始日期设置为2023-06-25
pengjiong 计划截止日期设置为2023-06-30
pengjiong 组织待联系提单人获取具体场景。本地未复现 修改为未设置
吴岳川 组织未设置 修改为CCB降级,继续定位
  char* recycleObject = NULL;
    char* f = "f";

    /* Make sure we are in proper schema */
    selectSourceSchema(fout, "pg_catalog");

    appendPQExpBuffer(query,
        "SELECT pg_catalog.gs_is_recycle_obj(%u, %u, NULL)",
        classid,
        objid);
    res = ExecuteSqlQuery(fout, query->data, PGRES_TUPLES_OK);

    colNum = PQfnumber(res, "gs_is_recycle_obj");
    recycleObject = gs_strdup(PQgetvalue(res, tupNum, colNum));
    if (strcmp(recycleObject, f) == 0) {
        isRecycleObj = false;
    } else {
        isRecycleObj = true;
    }
static void selectSourceSchema(Archive* fout, const char* schemaName)
{
    static char* curSchemaName = NULL;
    PQExpBuffer query;

    /* Not relevant if fetching from pre-7.3 DB */
    if (fout->remoteVersion < 70300)
        return;
    /* Ignore null schema names */
    if (schemaName == NULL || *schemaName == '\0')
        return;
    /* Optimize away repeated selection of same schema */
    if ((curSchemaName != NULL) && strcmp(curSchemaName, schemaName) == 0)
        return;

    query = createPQExpBuffer();
    /*
     * It is invalid to set pg_temp or pg_catalog behind other schemas in search path explicitly.
     * The priority order is pg_temp, pg_catalog and other schemas.
     */
    appendPQExpBuffer(query, "SET search_path = %s", fmtId(schemaName));
    ExecuteSqlStatement(fout, query->data);

    destroyPQExpBuffer(query);
    if (curSchemaName != NULL) {
        free(curSchemaName);
        curSchemaName = NULL;
    }
    curSchemaName = gs_strdup(schemaName);
}
void ExecuteSqlStatement(Archive* AHX, const char* query)
{
    ArchiveHandle* AH = (ArchiveHandle*)AHX;
    PGresult* res = NULL;

    res = PQexec(AH->connection, query);
    if (PQresultStatus(res) != PGRES_COMMAND_OK)
        die_on_query_failure(AH, modulename, query);
    PQclear(res);
}
吴岳川 任务状态待办的 修改为已取消

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(4)
5622128 opengauss bot 1581905080
C++
1
https://gitee.com/opengauss/openGauss-server.git
git@gitee.com:opengauss/openGauss-server.git
opengauss
openGauss-server
openGauss-server

搜索帮助