Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variuos fixups #58

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/offload_tablespace_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,7 @@ void YezzeyRegisterRelationOriginTablespaceName(Oid i_reloid, Name i_spcname) {

yezzey_endscan(scanoff);
UnregisterSnapshot(snap);
elog(ERROR,
"failed to map relation %d to its origin tablespace: mapping already "
"exists",
i_reloid);
return;
}
yezzey_endscan(scanoff);

Expand Down
11 changes: 3 additions & 8 deletions src/storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,20 @@

#include "pg.h"

#include "utils/rel.h"

#include "io.h"
#include <iostream>

#include "virtual_index.h"

#include "storage_lister.h"
#include "url.h"
#include "yproxy.h"

#include "yezzey_meta.h"

#include "offload_tablespace_map.h"

#include "cdb/cdbvars.h"

#include "cdb/cdbappendonlyxlog.h"

#include "ygpver.h"
#include "gucs.h"

#define USE_YPX_LISTER = 1

Expand Down Expand Up @@ -239,7 +235,6 @@ int loadSegmentFromExternalStorage(Relation rel, const std::string &nspname,
elog(DEBUG1, "yezzey: complete %s offloading", dest_path.c_str());
}
return 0;
// return std::rename(tmp_path.c_str(), dest_path.c_str());
}

int loadRelationSegment(Relation aorel, Oid orig_relnode, int segno,
Expand Down
21 changes: 0 additions & 21 deletions src/virtual_tablespace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,28 +90,7 @@ void YezzeyATExecSetTableSpace(Relation aorel, Oid reloid,

heap_close(pg_class, RowExclusiveLock);

// yezzey: do we need this?
// /* MPP-6929: metadata tracking */
// if ((Gp_role == GP_ROLE_DISPATCH) && MetaTrackValidKindNsp(rel->rd_rel))
// MetaTrackUpdObject(RelationRelationId,
// RelationGetRelid(rel),
// GetUserId(),
// "ALTER", "SET TABLESPACE");

/* Make sure the reltablespace change is visible */
CommandCounterIncrement();

/* yezzey: do we need to move indexes? */
// /*
// * MPP-7996 - bitmap index subobjects w/Alter Table Set tablespace
// */
// if (OidIsValid(relbmrelid))
// {
// Assert(!relaosegrelid);
// ATExecSetTableSpace(relbmrelid, newTableSpace, lockmode);
// }
// if (OidIsValid(relbmidxid))
// ATExecSetTableSpace(relbmidxid, newTableSpace, lockmode);

/* Clean up */
}
1 change: 0 additions & 1 deletion yezzey--1.8--1.8.1.sql
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ END;
$$
LANGUAGE PLPGSQL;


-- metadata migration

DROP TABLE IF EXISTS yezzey.yezzey_expire_index;
Expand Down
3 changes: 2 additions & 1 deletion yezzey.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,9 @@ int yezzey_load_relation_internal(Oid reloid, const char *dest_path) {
* Dropping yezzey virtual index for loaded relation allow to
* remove extension dependecy on this object (relation)
* empty all track info **
(void)emptyYezzeyIndex(YezzeyFindAuxIndex(reloid));
*/

(void)emptyYezzeyIndex(yandexoid, aorel->rd_node.relNode);
/* cleanup */

relation_close(aorel, NoLock);
Expand Down
Loading