Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 49a2e9d

Browse files
committed
Small fixes.
1 parent 45847e8 commit 49a2e9d

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

shard.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,14 +192,15 @@ BEGIN
192192
-- and dangerous: what if table was created and dropped before this
193193
-- change reached us? We might also use it with local table (create
194194
-- foreign server pointing to it, etc), but that's just ugly.
195+
RAISE DEBUG '[SHARDMAN] my id: %, creating ft %',
196+
shardman.get_node_id(), part.part_name;
195197
EXECUTE format('CREATE FOREIGN TABLE %I %s SERVER %I OPTIONS (table_name %L)',
196198
fdw_part_name,
197199
(SELECT
198200
shardman.reconstruct_table_attrs(
199201
format('%I', part.relation))),
200202
part.part_name,
201203
part.part_name);
202-
RAISE DEBUG '[SHARDMAN] my id: %, new part: %', shardman.get_node_id(), part.part_name;
203204
-- replace local partition with foreign table
204205
EXECUTE format('SELECT replace_hash_partition(%L, %L)',
205206
part.part_name, fdw_part_name);

src/shard.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -626,11 +626,10 @@ calc_timeout(slist_head *timeout_states)
626626
CopyPartState *cps = cps_node->cps;
627627

628628
/* If waketm is not set, what this node does in this list? */
629-
elog(INFO, "waketm is %ld:%ld", cps->waketm.tv_sec, cps->waketm.tv_nsec);
630629
Assert(cps->waketm.tv_nsec != 0);
631630
if (!waketm_set || timespeccmp(cps->waketm, waketm) < 0)
632631
{
633-
shmn_elog(DEBUG1, "Waketm updated, old %d s, new %d s",
632+
shmn_elog(DEBUG5, "Waketm updated, old %d s, new %d s",
634633
waketm_set ? (int) waketm.tv_sec : 0,
635634
(int) cps->waketm.tv_sec);
636635
waketm = cps->waketm;
@@ -1011,7 +1010,7 @@ reset_pqconn_and_res(PGconn **conn, PGresult *res)
10111010
*/
10121011
void configure_retry(CopyPartState *cps, int millis)
10131012
{
1014-
shmn_elog(DEBUG1, "Moving mpart %s: sleeping %d ms and retrying",
1013+
shmn_elog(DEBUG1, "Copying mpart %s: sleeping %d ms and retrying",
10151014
cps->part_name, millis);
10161015
cps->waketm = timespec_now_plus_millis(millis);
10171016
cps->exec_res = TASK_WAKEMEUP;

src/shardman_hooks.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ shardman_log_hook(ErrorData *edata)
3636

3737
edata->message = psprintf("[SHNODE %d] %s",
3838
shardman_my_node_id, edata->message);
39-
printf("Log hook called, line pref is %s, message is %s", Log_line_prefix,
40-
edata->message);
4139

4240
MemoryContextSwitchTo(oldcontext);
4341
}

0 commit comments

Comments
 (0)