:original_name: dcs-pd-200813002.html .. _dcs-pd-200813002: Redis 5.0 Commands ================== DCS for Redis 5.0 is developed based on Redis 5.0.9 and is compatible with open-source protocols and commands. This section describes DCS for Redis 5.0's compatibility with Redis commands, including supported and disabled commands. For more information about the command syntax, visit the `Redis official website `__. DCS for Redis instances support most Redis commands. Any client compatible with the Redis protocol can access DCS. - For security purposes, some Redis commands are disabled in DCS, as listed in :ref:`Commands Disabled by DCS for Redis 5.0 `. - Some Redis commands are supported by cluster DCS instances for multi-key operations in the same slot. For details, see :ref:`Command Restrictions for Cluster Instances `. - Some Redis commands have usage restrictions, which are described in :ref:`Other Command Usage Restrictions `. Commands Supported by DCS for Redis 5.0 --------------------------------------- - :ref:`Table 1 ` and :ref:`Table 2 ` list commands supported by single-node, master/standby, and Redis Cluster DCS for Redis 5.0. .. note:: - Commands available since later Redis versions are not supported by earlier-version instances. Run a command on redis-cli to check whether it is supported by DCS for Redis. If the message "(error) ERR unknown command" is returned, the command is not supported. - For DCS Redis 5.0 instances in the Redis Cluster mode, ensure that all commands in a pipeline are executed on the same shard. .. _dcs-pd-200813002__table16556145351911: .. table:: **Table 1** Commands supported by single-node, master/standby, and Redis Cluster DCS Redis 5.0 instances (1) +----------------------------------------------+-----------------------------------------------+-------------------------------------------+-------------------------------------------+-----------------------------------------+-------------------------------------------------------+-----------------------------------------------+ | `Keys `__ | `String `__ | `Hash `__ | `List `__ | `Set `__ | `Sorted Set `__ | `Server `__ | +==============================================+===============================================+===========================================+===========================================+=========================================+=======================================================+===============================================+ | DEL | APPEND | HDEL | BLPOP | SADD | ZADD | FLUSHALL | +----------------------------------------------+-----------------------------------------------+-------------------------------------------+-------------------------------------------+-----------------------------------------+-------------------------------------------------------+-----------------------------------------------+ | DUMP | BITCOUNT | HEXISTS | BRPOP | SCARD | ZCARD | FLUSHDB | +----------------------------------------------+-----------------------------------------------+-------------------------------------------+-------------------------------------------+-----------------------------------------+-------------------------------------------------------+-----------------------------------------------+ | EXISTS | BITOP | HGET | BRPOPLRUSH | SDIFF | ZCOUNT | DBSIZE | +----------------------------------------------+-----------------------------------------------+-------------------------------------------+-------------------------------------------+-----------------------------------------+-------------------------------------------------------+-----------------------------------------------+ | EXPIRE | BITPOS | HGETALL | LINDEX | SDIFFSTORE | ZINCRBY | TIME | +----------------------------------------------+-----------------------------------------------+-------------------------------------------+-------------------------------------------+-----------------------------------------+-------------------------------------------------------+-----------------------------------------------+ | MOVE | DECR | HINCRBY | LINSERT | SINTER | ZRANGE | INFO | +----------------------------------------------+-----------------------------------------------+-------------------------------------------+-------------------------------------------+-----------------------------------------+-------------------------------------------------------+-----------------------------------------------+ | PERSIST | DECRBY | HINCRBYFLOAT | LLEN | SINTERSTORE | ZRANGEBYSCORE | KEYS | +----------------------------------------------+-----------------------------------------------+-------------------------------------------+-------------------------------------------+-----------------------------------------+-------------------------------------------------------+-----------------------------------------------+ | PTTL | GET | HKEYS | LPOP | SISMEMBER | ZRANK | CLIENT KILL | +----------------------------------------------+-----------------------------------------------+-------------------------------------------+-------------------------------------------+-----------------------------------------+-------------------------------------------------------+-----------------------------------------------+ | RANDOMKEY | GETRANGE | HMGET | LPUSHX | SMEMBERS | ZREMRANGEBYRANK | CLIENT LIST | +----------------------------------------------+-----------------------------------------------+-------------------------------------------+-------------------------------------------+-----------------------------------------+-------------------------------------------------------+-----------------------------------------------+ | RENAME | GETSET | HMSET | LRANGE | SMOVE | ZREMRANGEBYCORE | CLIENT GETNAME | +----------------------------------------------+-----------------------------------------------+-------------------------------------------+-------------------------------------------+-----------------------------------------+-------------------------------------------------------+-----------------------------------------------+ | RENAMENX | INCR | HSET | LREM | SPOP | ZREVRANGE | CLIENT SETNAME | +----------------------------------------------+-----------------------------------------------+-------------------------------------------+-------------------------------------------+-----------------------------------------+-------------------------------------------------------+-----------------------------------------------+ | RESTORE | INCRBY | HSETNX | LSET | SRANDMEMBER | ZREVRANGEBYSCORE | CONFIG GET | +----------------------------------------------+-----------------------------------------------+-------------------------------------------+-------------------------------------------+-----------------------------------------+-------------------------------------------------------+-----------------------------------------------+ | SORT | INCRBYFLOAT | HVALS | LTRIM | SREM | ZREVRANK | MONITOR | +----------------------------------------------+-----------------------------------------------+-------------------------------------------+-------------------------------------------+-----------------------------------------+-------------------------------------------------------+-----------------------------------------------+ | TTL | MGET | HSCAN | RPOP | SUNION | ZSCORE | SLOWLOG | +----------------------------------------------+-----------------------------------------------+-------------------------------------------+-------------------------------------------+-----------------------------------------+-------------------------------------------------------+-----------------------------------------------+ | TYPE | MSET | HSTRLEN | RPOPLPU | SUNIONSTORE | ZUNIONSTORE | ROLE | +----------------------------------------------+-----------------------------------------------+-------------------------------------------+-------------------------------------------+-----------------------------------------+-------------------------------------------------------+-----------------------------------------------+ | SCAN | MSETNX | HLEN | RPOPLPUSH | SSCAN | ZINTERSTORE | SWAPDB | +----------------------------------------------+-----------------------------------------------+-------------------------------------------+-------------------------------------------+-----------------------------------------+-------------------------------------------------------+-----------------------------------------------+ | OBJECT | PSETEX | - | RPUSH | SPOP | ZSCAN | MEMORY | +----------------------------------------------+-----------------------------------------------+-------------------------------------------+-------------------------------------------+-----------------------------------------+-------------------------------------------------------+-----------------------------------------------+ | PEXPIREAT | SET | - | RPUSHX | - | ZRANGEBYLEX | CONFIG | +----------------------------------------------+-----------------------------------------------+-------------------------------------------+-------------------------------------------+-----------------------------------------+-------------------------------------------------------+-----------------------------------------------+ | PEXPIRE | SETBIT | - | LPUSH | - | ZLEXCOUNT | - | +----------------------------------------------+-----------------------------------------------+-------------------------------------------+-------------------------------------------+-----------------------------------------+-------------------------------------------------------+-----------------------------------------------+ | - | SETEX | - | - | - | ZPOPMIN | - | +----------------------------------------------+-----------------------------------------------+-------------------------------------------+-------------------------------------------+-----------------------------------------+-------------------------------------------------------+-----------------------------------------------+ | - | SETNX | - | - | - | ZPOPMAX | - | +----------------------------------------------+-----------------------------------------------+-------------------------------------------+-------------------------------------------+-----------------------------------------+-------------------------------------------------------+-----------------------------------------------+ | - | SETRANGE | - | - | - | ZREMRANGEBYSCORE | - | +----------------------------------------------+-----------------------------------------------+-------------------------------------------+-------------------------------------------+-----------------------------------------+-------------------------------------------------------+-----------------------------------------------+ | - | STRLEN | - | - | - | ZREM | - | +----------------------------------------------+-----------------------------------------------+-------------------------------------------+-------------------------------------------+-----------------------------------------+-------------------------------------------------------+-----------------------------------------------+ | - | BITFIELD | - | - | - | - | - | +----------------------------------------------+-----------------------------------------------+-------------------------------------------+-------------------------------------------+-----------------------------------------+-------------------------------------------------------+-----------------------------------------------+ .. _dcs-pd-200813002__table16968255165120: .. table:: **Table 2** Commands supported by single-node, master/standby, and Redis Cluster DCS Redis 5.0 instances (2) +---------------------------------------------------------+------------------------------------------------+-----------------------------------------------------------+-------------------------------------------------------+-----------------------------------------------------+-----------------------------------------+-----------------------------------------------+ | `HyperLoglog `__ | `Pub/Sub `__ | `Transactions `__ | `Connection `__ | `Scripting `__ | `Geo `__ | `Stream `__ | +=========================================================+================================================+===========================================================+=======================================================+=====================================================+=========================================+===============================================+ | PFADD | PSUBSCRIBE | DISCARD | AUTH | EVAL | GEOADD | XACK | +---------------------------------------------------------+------------------------------------------------+-----------------------------------------------------------+-------------------------------------------------------+-----------------------------------------------------+-----------------------------------------+-----------------------------------------------+ | PFCOUNT | PUBLISH | EXEC | ECHO | EVALSHA | GEOHASH | XADD | +---------------------------------------------------------+------------------------------------------------+-----------------------------------------------------------+-------------------------------------------------------+-----------------------------------------------------+-----------------------------------------+-----------------------------------------------+ | PFMERGE | PUBSUB | MULTI | PING | SCRIPT EXISTS | GEOPOS | XCLAIM | +---------------------------------------------------------+------------------------------------------------+-----------------------------------------------------------+-------------------------------------------------------+-----------------------------------------------------+-----------------------------------------+-----------------------------------------------+ | - | PUNSUBSCRIBE | UNWATCH | QUIT | SCRIPT FLUSH | GEODIST | XDEL | +---------------------------------------------------------+------------------------------------------------+-----------------------------------------------------------+-------------------------------------------------------+-----------------------------------------------------+-----------------------------------------+-----------------------------------------------+ | - | SUBSCRIBE | WATCH | SELECT | SCRIPT KILL | GEORADIUS | XGROUP | +---------------------------------------------------------+------------------------------------------------+-----------------------------------------------------------+-------------------------------------------------------+-----------------------------------------------------+-----------------------------------------+-----------------------------------------------+ | - | UNSUBSCRIBE | - | - | SCRIPT LOAD | GEORADIUSBYMEMBER | XINFO | +---------------------------------------------------------+------------------------------------------------+-----------------------------------------------------------+-------------------------------------------------------+-----------------------------------------------------+-----------------------------------------+-----------------------------------------------+ | - | - | - | - | - | - | XLEN | +---------------------------------------------------------+------------------------------------------------+-----------------------------------------------------------+-------------------------------------------------------+-----------------------------------------------------+-----------------------------------------+-----------------------------------------------+ | - | - | - | - | - | - | XPENDING | +---------------------------------------------------------+------------------------------------------------+-----------------------------------------------------------+-------------------------------------------------------+-----------------------------------------------------+-----------------------------------------+-----------------------------------------------+ | - | - | - | - | - | - | XRANGE | +---------------------------------------------------------+------------------------------------------------+-----------------------------------------------------------+-------------------------------------------------------+-----------------------------------------------------+-----------------------------------------+-----------------------------------------------+ | - | - | - | - | - | - | XREAD | +---------------------------------------------------------+------------------------------------------------+-----------------------------------------------------------+-------------------------------------------------------+-----------------------------------------------------+-----------------------------------------+-----------------------------------------------+ | - | - | - | - | - | - | XREADGROUP | +---------------------------------------------------------+------------------------------------------------+-----------------------------------------------------------+-------------------------------------------------------+-----------------------------------------------------+-----------------------------------------+-----------------------------------------------+ | - | - | - | - | - | - | XREVRANGE | +---------------------------------------------------------+------------------------------------------------+-----------------------------------------------------------+-------------------------------------------------------+-----------------------------------------------------+-----------------------------------------+-----------------------------------------------+ | - | - | - | - | - | - | XTRIM | +---------------------------------------------------------+------------------------------------------------+-----------------------------------------------------------+-------------------------------------------------------+-----------------------------------------------------+-----------------------------------------+-----------------------------------------------+ .. _dcs-pd-200813002__section144182915424: Commands Disabled by DCS for Redis 5.0 -------------------------------------- The following lists commands disabled by DCS for Redis 5.0. .. table:: **Table 3** Redis commands disabled in single-node and master/standby Redis 5.0 instances +----------------------------------------------+-----------------------------------------------+ | `Keys `__ | `Server `__ | +==============================================+===============================================+ | MIGRATE | SLAVEOF | +----------------------------------------------+-----------------------------------------------+ | - | SHUTDOWN | +----------------------------------------------+-----------------------------------------------+ | - | LASTSAVE | +----------------------------------------------+-----------------------------------------------+ | - | DEBUG commands | +----------------------------------------------+-----------------------------------------------+ | - | COMMAND | +----------------------------------------------+-----------------------------------------------+ | - | SAVE | +----------------------------------------------+-----------------------------------------------+ | - | BGSAVE | +----------------------------------------------+-----------------------------------------------+ | - | BGREWRITEAOF | +----------------------------------------------+-----------------------------------------------+ | - | SYNC | +----------------------------------------------+-----------------------------------------------+ | - | PSYNC | +----------------------------------------------+-----------------------------------------------+ .. table:: **Table 4** Redis commands disabled in Redis Cluster Redis 5.0 instances +----------------------------------------------+-----------------------------------------------+-------------------------------------------------+ | `Keys `__ | `Server `__ | `Cluster `__ | +==============================================+===============================================+=================================================+ | MIGRATE | SLAVEOF | CLUSTER MEET | +----------------------------------------------+-----------------------------------------------+-------------------------------------------------+ | - | SHUTDOWN | CLUSTER FLUSHSLOTS | +----------------------------------------------+-----------------------------------------------+-------------------------------------------------+ | - | LASTSAVE | CLUSTER ADDSLOTS | +----------------------------------------------+-----------------------------------------------+-------------------------------------------------+ | - | DEBUG commands | CLUSTER DELSLOTS | +----------------------------------------------+-----------------------------------------------+-------------------------------------------------+ | - | COMMAND | CLUSTER SETSLOT | +----------------------------------------------+-----------------------------------------------+-------------------------------------------------+ | - | SAVE | CLUSTER BUMPEPOCH | +----------------------------------------------+-----------------------------------------------+-------------------------------------------------+ | - | BGSAVE | CLUSTER SAVECONFIG | +----------------------------------------------+-----------------------------------------------+-------------------------------------------------+ | - | BGREWRITEAOF | CLUSTER FORGET | +----------------------------------------------+-----------------------------------------------+-------------------------------------------------+ | - | SYNC | CLUSTER REPLICATE | +----------------------------------------------+-----------------------------------------------+-------------------------------------------------+ | - | PSYNC | CLUSTER COUNT-FAILURE-REPORTS | +----------------------------------------------+-----------------------------------------------+-------------------------------------------------+ | - | - | CLUSTER FAILOVER | +----------------------------------------------+-----------------------------------------------+-------------------------------------------------+ | - | - | CLUSTER SET-CONFIG-EPOCH | +----------------------------------------------+-----------------------------------------------+-------------------------------------------------+ | - | - | CLUSTER RESET | +----------------------------------------------+-----------------------------------------------+-------------------------------------------------+