Skip to content

Commit e0ddb0c

Browse files
committed
Address review feedback
1 parent e25b366 commit e0ddb0c

9 files changed

Lines changed: 64 additions & 66 deletions

articles/cosmos-db/postgresql/concepts-colocation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ In Azure Cosmos DB for PostgreSQL, a row is stored in a shard if the hash of the
2424

2525
## A practical example of colocation
2626

27-
Consider the following tables that might be part of a multi-tenant web
27+
Consider the following tables that might be part of a multitenant web
2828
analytics SaaS:
2929

3030
```sql
@@ -153,4 +153,4 @@ In some cases, queries and table schemas must be changed to include the tenant I
153153

154154
## Next steps
155155

156-
- See how tenant data is colocated in the [multi-tenant tutorial](tutorial-design-database-multi-tenant.md).
156+
- See how tenant data is colocated in the [multitenant tutorial](tutorial-design-database-multi-tenant.md).

articles/cosmos-db/postgresql/concepts-nodes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ When you use Azure Cosmos DB for PostgreSQL, the coordinator node you connect to
7878

7979
A good candidate for local tables would be small administrative tables that don't participate in join queries. An example is a `users` table for application sign-in and authentication.
8080

81-
### Type 4: Local Managed Tables
81+
### Type 4: Local managed tables
8282

83-
Azure Cosmos DB for PostgreSQL may automatically add local tables to metadata if a foreign key reference exists between a local table and a reference table. Additionally locally managed tables can be manually created by executing [create_reference_table](reference-functions.md#citus_add_local_table_to_metadata) citus_add_local_table_to_metadata function on regular local tables. Tables present in metadata are considered managed tables and can be queried from any node, Citus knows to route to the coordinator to obtain data from the local managed table. Such tables are displayed as local in [citus_tables](reference-metadata.md#distributed-tables-view) view.
83+
Azure Cosmos DB for PostgreSQL might automatically add local tables to metadata if a foreign key reference exists between a local table and a reference table. Additionally locally managed tables can be manually created by executing [create_reference_table](reference-functions.md#citus_add_local_table_to_metadata) citus_add_local_table_to_metadata function on regular local tables. Tables present in metadata are considered managed tables and can be queried from any node, Citus knows to route to the coordinator to obtain data from the local managed table. Such tables are displayed as local in [citus_tables](reference-metadata.md#distributed-tables-view) view.
8484

85-
### Type 5: Schema Tables
85+
### Type 5: Schema tables
8686

8787
With [schema-based sharding](concepts-sharding-models.md#schema-based-sharding) introduced in Citus 12.0, distributed schemas are automatically associated with individual colocation groups. Tables created in those schemas are automatically converted to colocated distributed tables without a shard key. Such tables are considered schema tables and are displayed as schema in [citus_tables](reference-metadata.md#distributed-tables-view) view.
8888

articles/cosmos-db/postgresql/concepts-sharding-models.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Drawbacks:
3636

3737
## Schema-based sharding
3838

39-
Available with Citus 12.0 in Azure Cosmos DB for PostgreSQL, schema-based sharding is the shared database, separate schema model, the schema becomes the logical shard within the database. Multi-tenant apps can use a schema per tenant to easily shard along the tenant dimension. Query changes aren't required and the application only needs a small modification to set the proper search_path when switching tenants. Schema-based sharding is an ideal solution for microservices, and for ISVs deploying applications that can't undergo the changes required to onboard row-based sharding.
39+
Available with Citus 12.0 in Azure Cosmos DB for PostgreSQL, schema-based sharding is the shared database, separate schema model, the schema becomes the logical shard within the database. Multitenant apps can use a schema per tenant to easily shard along the tenant dimension. Query changes aren't required and the application only needs a small modification to set the proper search_path when switching tenants. Schema-based sharding is an ideal solution for microservices, and for ISVs deploying applications that can't undergo the changes required to onboard row-based sharding.
4040

4141
Benefits:
4242

articles/cosmos-db/postgresql/concepts-upgrade.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ms.date: 10/01/2023
1616
The Azure Cosmos DB for PostgreSQL managed service can handle upgrades of both the
1717
PostgreSQL server, and the Citus extension. All clusters are created with [the latest Citus version](./reference-extensions.md#citus-extension) available for the major PostgreSQL version you select during cluster provisioning. When you select a PostgreSQL version such as PostgreSQL 15 for in-place cluster upgrade, the latest Citus version supported for selected PostgreSQL version is going to be installed.
1818

19-
If you need to upgrade the Citus version only, you can do so by using an in-place upgrade. For instance, you may want to upgrade Citus 11.0 to Citus 11.3 on your PostgreSQL 14 cluster without upgrading Postgres version.
19+
If you need to upgrade the Citus version only, you can do so by using an in-place upgrade. For instance, you might want to upgrade Citus 11.0 to Citus 11.3 on your PostgreSQL 14 cluster without upgrading Postgres version.
2020

2121
## Upgrade precautions
2222

@@ -36,8 +36,8 @@ Noteworthy Citus 12 changes:
3636

3737
Noteworthy Citus 11 changes:
3838

39-
* Table shards may disappear in your SQL client. Their visibility
40-
is now controlled by
39+
* Table shards might disappear in your SQL client. You can control their visibility
40+
using
4141
[citus.show_shards_for_app_name_prefixes](reference-parameters.md#citusshow_shards_for_app_name_prefixes-text).
4242
* There are several [deprecated
4343
features](https://www.citusdata.com/updates/v11-0/#deprecated-features).

articles/cosmos-db/postgresql/howto-useful-diagnostic-queries.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ms.date: 10/01/2023
1515

1616
## Finding which node contains data for a specific tenant
1717

18-
In the multi-tenant use case, we can determine which worker node contains the
18+
In the multitenant use case, we can determine which worker node contains the
1919
rows for a specific tenant. Azure Cosmos DB for PostgreSQL groups the rows of distributed
2020
tables into shards, and places each shard on a worker node in the cluster.
2121

@@ -91,7 +91,7 @@ Each distributed table has a "distribution column." (For
9191
more information, see [Distributed Data
9292
Modeling](howto-choose-distribution-column.md).) It can be
9393
important to know which column it is. For instance, when joining or filtering
94-
tables, you may see error messages with hints like, "add a filter to the
94+
tables, you might see error messages with hints like, "add a filter to the
9595
distribution column."
9696

9797
The `pg_dist_*` tables on the coordinator node contain diverse metadata about

articles/cosmos-db/postgresql/quickstart-build-scalable-apps-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ms.date: 10/01/2023
1818
There are three steps involved in building scalable apps with Azure Cosmos DB for PostgreSQL:
1919

2020
1. Classify your application workload. There are use-case where Azure Cosmos DB for PostgreSQL
21-
shines: multi-tenant SaaS, microservices, real-time operational analytics, and high
21+
shines: Multitenant SaaS, microservices, real-time operational analytics, and high
2222
throughput OLTP. Determine whether your app falls into one of these categories.
2323
2. Based on the workload, use [schema-based sharding](concepts-sharding-models.md#schema-based-sharding) or identify the optimal shard key for the distributed
2424
tables. Classify your tables as reference, distributed, or local.

articles/cosmos-db/postgresql/reference-functions.md

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Converts existing regular schemas into distributed schemas. Distributed schemas
3232

3333
**schemaname:** Name of the schema, which needs to be distributed.
3434

35-
#### Return Value
35+
#### Return value
3636

3737
N/A
3838

@@ -54,7 +54,7 @@ Converts an existing distributed schema back into a regular schema. The process
5454

5555
**schemaname:** Name of the schema, which needs to be distributed.
5656

57-
#### Return Value
57+
#### Return value
5858

5959
N/A
6060

@@ -119,7 +119,7 @@ or colocation group, use the [alter_distributed_table](#alter_distributed_table)
119119
Possible values for `shard_count` are between 1 and 64000. For guidance on
120120
choosing the optimal value, see [Shard Count](howto-shard-count.md).
121121

122-
#### Return Value
122+
#### Return value
123123

124124
N/A
125125

@@ -175,7 +175,7 @@ distribution.
175175
**table_name:** Name of the distributed table whose local counterpart on the
176176
coordinator node should be truncated.
177177

178-
#### Return Value
178+
#### Return value
179179

180180
N/A
181181

@@ -198,7 +198,7 @@ worker node.
198198
**table\_name:** Name of the small dimension or reference table that
199199
needs to be distributed.
200200

201-
#### Return Value
201+
#### Return value
202202

203203
N/A
204204

@@ -225,7 +225,7 @@ When you undistribute the table, Citus removes the resulting local tables from m
225225

226226
**cascade\_via\_foreign\_keys**: (Optional) When this argument set to “true,” citus_add_local_table_to_metadata adds other tables that are in a foreign key relationship with given table into metadata automatically. Use caution with this parameter, because it can potentially affect many tables.
227227

228-
#### Return Value
228+
#### Return value
229229

230230
N/A
231231

@@ -261,7 +261,7 @@ tables that were previously colocated with the table, and the colocation will
261261
be preserved. If it is "false", the current colocation of this table will be
262262
broken.
263263

264-
#### Return Value
264+
#### Return value
265265

266266
N/A
267267

@@ -300,7 +300,7 @@ This function doesn't move any data around physically.
300300
If you want to break the colocation of a table, you should specify
301301
`colocate_with => 'none'`.
302302

303-
#### Return Value
303+
#### Return value
304304

305305
N/A
306306

@@ -357,7 +357,7 @@ undistribute_table also undistributes all tables that are related to table_name
357357
through foreign keys. Use caution with this parameter, because it can
358358
potentially affect many tables.
359359

360-
#### Return Value
360+
#### Return value
361361

362362
N/A
363363

@@ -406,7 +406,7 @@ a distributed table (or, more generally, colocation group), be sure to name
406406
that table using the `colocate_with` parameter. Then each invocation of the
407407
function will run on the worker node containing relevant shards.
408408

409-
#### Return Value
409+
#### Return value
410410

411411
N/A
412412

@@ -460,11 +460,11 @@ overridden with these GUCs:
460460
**table_name:** Name of the columnar table.
461461

462462
**chunk_row_count:** (Optional) The maximum number of rows per chunk for
463-
newly inserted data. Existing chunks of data won't be changed and may have
463+
newly inserted data. Existing chunks of data won't be changed and might have
464464
more rows than this maximum value. The default value is 10000.
465465

466466
**stripe_row_count:** (Optional) The maximum number of rows per stripe for
467-
newly inserted data. Existing stripes of data won't be changed and may have
467+
newly inserted data. Existing stripes of data won't be changed and might have
468468
more rows than this maximum value. The default value is 150000.
469469

470470
**compression:** (Optional) `[none|pglz|zstd|lz4|lz4hc]` The compression type
@@ -500,7 +500,7 @@ The alter_table_set_access_method() function changes access method of a table
500500

501501
**access_method:** Name of the new access method.
502502

503-
#### Return Value
503+
#### Return value
504504

505505
N/A
506506

@@ -529,7 +529,7 @@ will contain the point end_at, and no later partitions will be created.
529529
**start_from:** (timestamptz, optional) pick the first partition so that it
530530
contains the point start_from. The default value is `now()`.
531531

532-
#### Return Value
532+
#### Return value
533533

534534
True if it needed to create new partitions, false if they all existed already.
535535

@@ -562,7 +562,7 @@ be partitioned on one column, of type date, timestamp, or timestamptz.
562562
**older_than:** (timestamptz) drop partitions whose upper range is less than or
563563
equal to older_than.
564564

565-
#### Return Value
565+
#### Return value
566566

567567
N/A
568568

@@ -591,7 +591,7 @@ or equal to older_than.
591591
**new_access_method:** (name) either 'heap' for row-based storage, or
592592
'columnar' for columnar storage.
593593

594-
#### Return Value
594+
#### Return value
595595

596596
N/A
597597

@@ -623,7 +623,7 @@ doesn't work for the append distribution.
623623

624624
**distribution\_value:** The value of the distribution column.
625625

626-
#### Return Value
626+
#### Return value
627627

628628
The shard ID Azure Cosmos DB for PostgreSQL associates with the distribution column value
629629
for the given table.
@@ -655,7 +655,7 @@ column](howto-choose-distribution-column.md).
655655
**column\_var\_text:** The value of `partkey` in the `pg_dist_partition`
656656
table.
657657

658-
#### Return Value
658+
#### Return value
659659

660660
The name of `table_name`'s distribution column.
661661

@@ -689,7 +689,7 @@ visibility map and free space map for the shards.
689689

690690
**logicalrelid:** the name of a distributed table.
691691

692-
#### Return Value
692+
#### Return value
693693

694694
Size in bytes as a bigint.
695695

@@ -714,7 +714,7 @@ excluding indexes (but including TOAST, free space map, and visibility map).
714714

715715
**logicalrelid:** the name of a distributed table.
716716

717-
#### Return Value
717+
#### Return value
718718

719719
Size in bytes as a bigint.
720720

@@ -739,7 +739,7 @@ distributed table, including all indexes and TOAST data.
739739

740740
**logicalrelid:** the name of a distributed table.
741741

742-
#### Return Value
742+
#### Return value
743743

744744
Size in bytes as a bigint.
745745

@@ -766,7 +766,7 @@ all stats, call both functions.
766766

767767
N/A
768768

769-
#### Return Value
769+
#### Return value
770770

771771
None
772772

@@ -779,7 +779,7 @@ host names and port numbers.
779779

780780
N/A
781781

782-
#### Return Value
782+
#### Return value
783783

784784
List of tuples where each tuple contains the following information:
785785

@@ -833,7 +833,7 @@ placement is present (\"target\" node).
833833
**target\_node\_port:** The port on the target worker node on which the
834834
database server is listening.
835835

836-
#### Return Value
836+
#### Return value
837837

838838
N/A
839839

@@ -893,7 +893,7 @@ command. The possible values are:
893893
> - `block_writes`: Use COPY (blocking writes) for tables lacking
894894
> primary key or replica identity.
895895
896-
#### Return Value
896+
#### Return value
897897

898898
N/A
899899

@@ -927,7 +927,7 @@ The "by\_shard\_count" strategy is appropriate under these circumstances:
927927

928928
If any of these assumptions don’t hold, then rebalancing “by_shard_count” can result in a bad plan.
929929

930-
The default rebalancing starategy is “by_disk_size”. You can always customize the strategy, using the `rebalance_strategy` parameter.
930+
The default rebalancing strategy is “by_disk_size”. You can always customize the strategy, using the `rebalance_strategy` parameter.
931931

932932
It's advisable to call
933933
[get_rebalance_table_shards_plan](#get_rebalance_table_shards_plan) before
@@ -975,7 +975,7 @@ other shards.
975975
If this argument is omitted, the function chooses the default strategy, as
976976
indicated in the table.
977977

978-
#### Return Value
978+
#### Return value
979979

980980
N/A
981981

@@ -1010,7 +1010,7 @@ The same arguments as rebalance\_table\_shards: relation, threshold,
10101010
max\_shard\_moves, excluded\_shard\_list, and drain\_only. See
10111011
documentation of that function for the arguments' meaning.
10121012

1013-
#### Return Value
1013+
#### Return value
10141014

10151015
Tuples containing these columns:
10161016

@@ -1032,7 +1032,7 @@ executed by `rebalance_table_shards()`.
10321032

10331033
N/A
10341034

1035-
#### Return Value
1035+
#### Return value
10361036

10371037
Tuples containing these columns:
10381038

@@ -1092,7 +1092,7 @@ precisely the cumulative shard cost should be balanced between nodes
10921092
minimum value allowed for the threshold argument of
10931093
rebalance\_table\_shards(). Its default value is 0
10941094

1095-
#### Return Value
1095+
#### Return value
10961096

10971097
N/A
10981098

@@ -1107,7 +1107,7 @@ when rebalancing shards.
11071107

11081108
**name:** the name of the strategy in pg\_dist\_rebalance\_strategy
11091109

1110-
#### Return Value
1110+
#### Return value
11111111

11121112
N/A
11131113

@@ -1142,7 +1142,7 @@ SELECT * from citus_remote_connection_stats();
11421142
### isolate\_tenant\_to\_new\_shard
11431143

11441144
This function creates a new shard to hold rows with a specific single value in
1145-
the distribution column. It's especially handy for the multi-tenant
1145+
the distribution column. It's especially handy for the multitenant
11461146
use case, where a large tenant can be placed alone on its own shard and
11471147
ultimately its own physical node.
11481148

@@ -1157,7 +1157,7 @@ assigned to the new shard.
11571157
from all tables in the current table's [colocation
11581158
group](concepts-colocation.md).
11591159

1160-
#### Return Value
1160+
#### Return value
11611161

11621162
**shard\_id:** The function returns the unique ID assigned to the newly
11631163
created shard.

0 commit comments

Comments
 (0)