Update the publication dialog tabs and the docs. #5868
Before Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 8.4 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 9.9 KiB |
Before Width: | Height: | Size: 38 KiB |
BIN
docs/en_US/images/publication_tables_14.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
docs/en_US/images/publication_tables_15.png
Normal file
After Width: | Height: | Size: 18 KiB |
@ -4,11 +4,11 @@
|
|||||||
`Publication Dialog`:index:
|
`Publication Dialog`:index:
|
||||||
***************************
|
***************************
|
||||||
|
|
||||||
`Logical replication <https://www.postgresql.org/docs/13/logical-replication.html>`_ uses a *publish* and *subscribe* model with one or more *subscribers* subscribing to one or more *publications* on a publisher node.
|
`Logical replication <https://www.postgresql.org/docs/15/logical-replication.html>`_ uses a *publish* and *subscribe* model with one or more *subscribers* subscribing to one or more *publications* on a publisher node.
|
||||||
|
|
||||||
Use the *publication* dialog to create a publication. A publication is a set of changes generated from a table or a group of tables or a schema or a group of schemas, and might also be described as a change set or replication set.
|
Use the *publication* dialog to create a publication. A publication is a set of changes generated from a table or a group of tables or a schema or a group of schemas, and might also be described as a change set or replication set.
|
||||||
|
|
||||||
The *publication* dialog organizes the development of a publication through the following dialog tabs: *General* and *Definition*. The *SQL* tab displays the SQL code generated by dialog selections. In place of *Definition* tab *Tables* and *Options* tab will come for PostgreSQL version >= 15.
|
The *publication* dialog organizes the development of a publication through the following dialog tabs: *General*, *Tables* and *Options*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||||
|
|
||||||
.. image:: images/publication_general.png
|
.. image:: images/publication_general.png
|
||||||
:alt: Publication dialog general tab
|
:alt: Publication dialog general tab
|
||||||
@ -19,33 +19,26 @@ Use the fields in the *General* tab to identify the publication:
|
|||||||
* Use the *Name* field to add a descriptive name for the publication. The name will be displayed in the *pgAdmin* tree control.
|
* Use the *Name* field to add a descriptive name for the publication. The name will be displayed in the *pgAdmin* tree control.
|
||||||
* The *Owner* field takes the name of the user automatically as current connected user. You can change the owner after creating publication using alter publication.
|
* The *Owner* field takes the name of the user automatically as current connected user. You can change the owner after creating publication using alter publication.
|
||||||
|
|
||||||
Click the *Definition* tab to continue.
|
Click the *Tables* tab to continue.
|
||||||
|
|
||||||
.. image:: images/publication_definition.png
|
Tables tab for PostgreSQL version <= 14
|
||||||
|
|
||||||
|
.. image:: images/publication_tables_14.png
|
||||||
:alt: Publication dialog definition tab
|
:alt: Publication dialog definition tab
|
||||||
:align: center
|
:align: center
|
||||||
|
|
||||||
Use the *Definition* tab to set properties for the publication:
|
Tables tab for PostgreSQL version >= 15
|
||||||
|
|
||||||
* Move the switch next to *All tables?* to *Yes* to replicate all the tables of the database, including tables created in the future.
|
.. image:: images/publication_tables_15.png
|
||||||
* Move the switch next to *Only table?* to *Yes* to replicate only the listed tables excluding all its descendant tables.
|
:alt: Publication dialog definition tab
|
||||||
* Specify a table or list of tables separated by a comma in *Tables* field to replicate all the listed table.
|
|
||||||
* Use the *With* section to determine which DML operations will be published by the new publication to the subscribers. Move the switch next to *INSERT*, *UPDATE*, *DELETE*, or *TRUNCATE* to *No* if you do not want to replicate any of these DML operations from Publication to Subscription. By default, all the switches are set to *Yes* allowing all the DML operations.
|
|
||||||
|
|
||||||
With PostgreSQL 15 forward, the *Tables* and *Options* tab will be visible.
|
|
||||||
|
|
||||||
Click the *Tables* tab to continue.
|
|
||||||
|
|
||||||
.. image:: images/publication_tables.png
|
|
||||||
:alt: Publication dialog tables tab
|
|
||||||
:align: center
|
:align: center
|
||||||
|
|
||||||
Use the *Tables* tab to set table properties for the publication:
|
Use the *Tables* tab to set table properties for the publication:
|
||||||
|
|
||||||
* Move the switch next to *All tables?* to *Yes* to replicate all the tables of the database, including tables created in the future.
|
* Move the switch next to *All tables?* to *Yes* to replicate all the tables of the database, including tables created in the future.
|
||||||
* Move the switch next to *Only table?* to *Yes* to replicate only the listed tables excluding all its descendant tables.
|
* Move the switch next to *Only table?* to *Yes* to replicate only the listed tables excluding all its descendant tables.
|
||||||
* Specify a schema or list of schemas separated by a comma in *Tables In Schema* field to replicate all the listed schemas. This field will be disabled if any columns are selected for tables in subsequent field.
|
* Specify a table or list of tables separated by a comma in *Tables* field to replicate all the listed table. With PostgreSQL 15 forward, specify a table or list of tables to replicate all the listed tables along with specific columns and/or WHERE clause to filter rows.
|
||||||
* Specify a table or list of tables to replicate all the listed table along with specific columns and/or WHERE clause to filter rows.
|
* With PostgreSQL 15 forward, specify a schema or list of schemas separated by a comma in *Tables In Schema* field to replicate all the listed schemas. This field will be disabled if any columns are selected for tables.
|
||||||
|
|
||||||
Click the *Options* tab to continue.
|
Click the *Options* tab to continue.
|
||||||
|
|
||||||
@ -58,7 +51,7 @@ Use the *Options* tab to set option properties for the publication:
|
|||||||
* Use the *With* section to determine which DML operations will be published by the new publication to the subscribers. Move the switch next to *INSERT*, *UPDATE*, *DELETE*, or *TRUNCATE* to *No* if you do not want to replicate any of these DML operations from Publication to Subscription. By default, all the switches are set to *Yes* allowing all the DML operations.
|
* Use the *With* section to determine which DML operations will be published by the new publication to the subscribers. Move the switch next to *INSERT*, *UPDATE*, *DELETE*, or *TRUNCATE* to *No* if you do not want to replicate any of these DML operations from Publication to Subscription. By default, all the switches are set to *Yes* allowing all the DML operations.
|
||||||
|
|
||||||
|
|
||||||
.. note:: A published table must have a “replica identity” configured in order to be able to replicate UPDATE and DELETE operations. You can change with ALTER TABLE statement. For more information on replica identity see `Logical Replication Publication <https://www.postgresql.org/docs/13/logical-replication-publication.html>`_.
|
.. note:: A published table must have a “replica identity” configured in order to be able to replicate UPDATE and DELETE operations. You can change with ALTER TABLE statement. For more information on replica identity see `Logical Replication Publication <https://www.postgresql.org/docs/15/logical-replication-publication.html>`_.
|
||||||
|
|
||||||
Click the *SQL* tab to continue.
|
Click the *SQL* tab to continue.
|
||||||
|
|
||||||
@ -70,7 +63,7 @@ The following is an example of the sql command generated by user selections in
|
|||||||
the *Publication* dialog:
|
the *Publication* dialog:
|
||||||
|
|
||||||
.. image:: images/publication_sql.png
|
.. image:: images/publication_sql.png
|
||||||
:alt: Publication dialog sql tab for PostgreSQL version <= 14
|
:alt: Publication dialog sql tab
|
||||||
:align: center
|
:align: center
|
||||||
|
|
||||||
The example creates a publication named *pub1* that is owned by *postgres*. It
|
The example creates a publication named *pub1* that is owned by *postgres*. It
|
||||||
|
@ -260,11 +260,11 @@ export default class PublicationSchema extends BaseUISchema {
|
|||||||
mode: ['edit', 'properties', 'create'], controlProps: { allowClear: false},
|
mode: ['edit', 'properties', 'create'], controlProps: { allowClear: false},
|
||||||
},{
|
},{
|
||||||
id: 'all_table', label: gettext('All tables?'), type: 'switch',
|
id: 'all_table', label: gettext('All tables?'), type: 'switch',
|
||||||
group: this.version < 150000 ? gettext('Definition') : gettext('Tables'), mode: ['edit', 'properties', 'create'], deps: ['name'],
|
group: gettext('Tables'), mode: ['edit', 'properties', 'create'], deps: ['name'],
|
||||||
readonly: (state) => {return !obj.isNew(state);},
|
readonly: (state) => {return !obj.isNew(state);},
|
||||||
},{
|
},{
|
||||||
id: 'only_table', label: gettext('Only table?'), type: 'switch',
|
id: 'only_table', label: gettext('Only table?'), type: 'switch',
|
||||||
group: this.version < 150000 ? gettext('Definition') : gettext('Tables'), mode: ['edit', 'create'],
|
group: gettext('Tables'), mode: ['edit', 'create'],
|
||||||
deps: ['name', 'pubtable', 'all_table'], readonly: (state) => {
|
deps: ['name', 'pubtable', 'all_table'], readonly: (state) => {
|
||||||
if(obj.isNew(state))
|
if(obj.isNew(state))
|
||||||
return obj.isTable(state);
|
return obj.isTable(state);
|
||||||
@ -291,7 +291,7 @@ export default class PublicationSchema extends BaseUISchema {
|
|||||||
controlProps: { allowClear: true, multiple: true, creatable: true },
|
controlProps: { allowClear: true, multiple: true, creatable: true },
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
group: this.version < 150000? gettext('Definition') : gettext('Tables'), mode: ['properties'],
|
group: gettext('Tables'), mode: ['properties'],
|
||||||
deps: ['all_table'], disabled: obj.isAllTable,
|
deps: ['all_table'], disabled: obj.isAllTable,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -299,7 +299,7 @@ export default class PublicationSchema extends BaseUISchema {
|
|||||||
type: this.version < 150000 ? 'select' : 'collection',
|
type: this.version < 150000 ? 'select' : 'collection',
|
||||||
controlProps: this.version < 150000 ? { allowClear: true, multiple: true, creatable: true } : null,
|
controlProps: this.version < 150000 ? { allowClear: true, multiple: true, creatable: true } : null,
|
||||||
options: this.version < 150000 ? this.fieldOptions.allTables : [],
|
options: this.version < 150000 ? this.fieldOptions.allTables : [],
|
||||||
group: this.version < 150000 ? gettext('Definition') : gettext('Tables'), mode: ['edit', 'create'],
|
group: gettext('Tables'), mode: ['edit', 'create'],
|
||||||
deps: ['all_table'], disabled: obj.isAllTable, schema: this.version < 150000 ? null : this.paramSchema,
|
deps: ['all_table'], disabled: obj.isAllTable, schema: this.version < 150000 ? null : this.paramSchema,
|
||||||
uniqueCol: this.version < 150000 ? null : ['table_name'],
|
uniqueCol: this.version < 150000 ? null : ['table_name'],
|
||||||
canAdd: this.version < 150000 ? null : (state)=> !obj.isConnected(state),
|
canAdd: this.version < 150000 ? null : (state)=> !obj.isConnected(state),
|
||||||
@ -307,7 +307,7 @@ export default class PublicationSchema extends BaseUISchema {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'nested-fieldset', mode: ['create','edit', 'properties'],
|
type: 'nested-fieldset', mode: ['create','edit', 'properties'],
|
||||||
label: gettext('With'), group: this.version < 150000 ? gettext('Definition') : gettext('Options'),
|
label: gettext('With'), group: gettext('Options'),
|
||||||
schema : new DefaultWithSchema(this.node_info),
|
schema : new DefaultWithSchema(this.node_info),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|