From 183dd693f0ec6e720e43ec3313c9331723586bb8 Mon Sep 17 00:00:00 2001 From: reshke Date: Mon, 26 Aug 2024 17:02:42 +0500 Subject: [PATCH] Fixes (#55) * Fixes * Fixes & nitpick --- pkg/message/message.go | 2 ++ pkg/proc/interaction.go | 6 ++++++ pkg/tablespace/tablespace.go | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pkg/message/message.go b/pkg/message/message.go index ba80836..9fd8a65 100644 --- a/pkg/message/message.go +++ b/pkg/message/message.go @@ -38,6 +38,8 @@ func (m MessageType) String() string { return "CAT" case MessageTypePut: return "PUT" + case MessageTypePutV2: + return "PUTV2" case MessageTypeCommandComplete: return "COMMAND COMPLETE" case MessageTypeReadyForQuery: diff --git a/pkg/proc/interaction.go b/pkg/proc/interaction.go index 252070e..591ec49 100644 --- a/pkg/proc/interaction.go +++ b/pkg/proc/interaction.go @@ -95,6 +95,10 @@ func ProcessPutExtended( } }() + for _, s := range settings { + ylogger.Zero.Debug().Str("name", name).Str("name", s.Name).Str("value", s.Value).Msg("offloading setting") + } + /* Should go after reader dispatch! */ err := s.PutFileToDest(name, r, settings) @@ -187,6 +191,8 @@ func ProcConn(s storage.StorageInteractor, cr crypt.Crypter, ycl client.YproxyCl msg := message.PutMessageV2{} msg.Decode(body) + // ylogger.Zero.Debug().Bytes("msg", body).Msg("log info") + if err := ProcessPutExtended(s, pr, msg.Name, msg.Encrypt, msg.Settings, cr, ycl); err != nil { return err } diff --git a/pkg/tablespace/tablespace.go b/pkg/tablespace/tablespace.go index 4fe80c2..684e2a5 100644 --- a/pkg/tablespace/tablespace.go +++ b/pkg/tablespace/tablespace.go @@ -1,3 +1,3 @@ package tablespace -const DefaultTableSpace = "BASE" +const DefaultTableSpace = "pg_default"