citusdata / citusdata/citus

%I doesn't work with run_command_on_shards

Aperta
#1,663 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C
Stelle
12.8k
Fork
794
Merge medio
2g 14h
PR unite (30g)
31

Descrizione

Steps to reproduce:

```
create table test_table (col1 int, col2 int);
select create_distributed_table('test_table' , 'col1');
select run_command_on_shards('test_table', 'update %I set col1 = 1 where col2 = 2');
```

```
run_command_on_shards
---------------------------------------------------------------------------
(102724,f,"ERROR: relation ""public.test_table_102724"" does not exist")
(102725,f,"ERROR: relation ""public.test_table_102725"" does not exist")
(102726,f,"ERROR: relation ""public.test_table_102726"" does not exist")
(102727,f,"ERROR: relation ""public.test_table_102727"" does not exist")
(102728,f,"ERROR: relation ""public.test_table_102728"" does not exist")
(102729,f,"ERROR: relation ""public.test_table_102729"" does not exist")
(102730,f,"ERROR: relation ""public.test_table_102730"" does not exist")
(102731,f,"ERROR: relation ""public.test_table_102731"" does not exist")
(102732,f,"ERROR: relation ""public.test_table_102732"" does not exist")
(102733,f,"ERROR: relation ""public.test_table_102733"" does not exist")
(102734,f,"ERROR: relation ""public.test_table_102734"" does not exist")
(102735,f,"ERROR: relation ""public.test_table_102735"" does not exist")
(102736,f,"ERROR: relation ""public.test_table_102736"" does not exist")
(102737,f,"ERROR: relation ""public.test_table_102737"" does not exist")
(102738,f,"ERROR: relation ""public.test_table_102738"" does not exist")
(102739,f,"ERROR: relation ""public.test_table_102739"" does not exist")
(102740,f,"ERROR: relation ""public.test_table_102740"" does not exist")
(102741,f,"ERROR: relation ""public.test_table_102741"" does not exist")
(102742,f,"ERROR: relation ""public.test_table_102742"" does not exist")
(102743,f,"ERROR: relation ""public.test_table_102743"" does not exist")
(102744,f,"ERROR: relation ""public.test_table_102744"" does not exist")
(102745,f,"ERROR: relation ""public.test_table_102745"" does not exist")
(102746,f,"ERROR: relation ""public.test_table_102746"" does not exist")
(102747,f,"ERROR: relation ""public.test_table_102747"" does not exist")
(102748,f,"ERROR: relation ""public.test_table_102748"" does not exist")
(102749,f,"ERROR: relation ""public.test_table_102749"" does not exist")
(102750,f,"ERROR: relation ""public.test_table_102750"" does not exist")
(102751,f,"ERROR: relation ""public.test_table_102751"" does not exist")
(102752,f,"ERROR: relation ""public.test_table_102752"" does not exist")
(102753,f,"ERROR: relation ""public.test_table_102753"" does not exist")
(102754,f,"ERROR: relation ""public.test_table_102754"" does not exist")
(102755,f,"ERROR: relation ""public.test_table_102755"" does not exist")
(32 rows)
```

This used to work with previous Citus releases. I think the issue is that we're adding an extra quote to the tablename. Probably introduced in https://github.com/citusdata/citus/pull/1266 . Most scripts I've shared with customers have %I in them, so I think we should fix this soon.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Riproduci il problema con le chiamate fornite a CREATE TABLE, create_distributed_table e run_command_on_shards, quindi esamina le modifiche nella PR 1266 e l’implementazione di run_command_on_shards. Verifica che %I non aggiunga più una virgoletta aggiuntiva e che i nomi delle tabelle shard generati possano essere risolti correttamente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
c, postgresql, sql
Ambito
databases, distributed-systems
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.