diff --git a/docs/en_US/images/publication_definition.png b/docs/en_US/images/publication_definition.png deleted file mode 100644 index 6b490fd9e..000000000 Binary files a/docs/en_US/images/publication_definition.png and /dev/null differ diff --git a/docs/en_US/images/publication_general.png b/docs/en_US/images/publication_general.png index fc92cadd4..9545ef030 100644 Binary files a/docs/en_US/images/publication_general.png and b/docs/en_US/images/publication_general.png differ diff --git a/docs/en_US/images/publication_options.png b/docs/en_US/images/publication_options.png index 263b3255d..abc0bfb47 100644 Binary files a/docs/en_US/images/publication_options.png and b/docs/en_US/images/publication_options.png differ diff --git a/docs/en_US/images/publication_sql.png b/docs/en_US/images/publication_sql.png index 0a3bdab6b..5edb41cb4 100644 Binary files a/docs/en_US/images/publication_sql.png and b/docs/en_US/images/publication_sql.png differ diff --git a/docs/en_US/images/publication_tables.png b/docs/en_US/images/publication_tables.png deleted file mode 100644 index a5d29cfd0..000000000 Binary files a/docs/en_US/images/publication_tables.png and /dev/null differ diff --git a/docs/en_US/images/publication_tables_14.png b/docs/en_US/images/publication_tables_14.png new file mode 100644 index 000000000..6d394b5be Binary files /dev/null and b/docs/en_US/images/publication_tables_14.png differ diff --git a/docs/en_US/images/publication_tables_15.png b/docs/en_US/images/publication_tables_15.png new file mode 100644 index 000000000..50f389a34 Binary files /dev/null and b/docs/en_US/images/publication_tables_15.png differ diff --git a/docs/en_US/publication_dialog.rst b/docs/en_US/publication_dialog.rst index bfafa3e9a..8b043311f 100644 --- a/docs/en_US/publication_dialog.rst +++ b/docs/en_US/publication_dialog.rst @@ -4,11 +4,11 @@ `Publication Dialog`:index: *************************** -`Logical replication `_ uses a *publish* and *subscribe* model with one or more *subscribers* subscribing to one or more *publications* on a publisher node. +`Logical replication `_ 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. -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 :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. * 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 :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. -* Move the switch next to *Only table?* to *Yes* to replicate only the listed tables excluding all its descendant tables. -* 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 +.. image:: images/publication_tables_15.png + :alt: Publication dialog definition tab :align: center 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 *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 to replicate all the listed table along with specific columns and/or WHERE clause to filter rows. +* 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. +* 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. @@ -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. -.. 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 `_. +.. 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 `_. 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: .. image:: images/publication_sql.png - :alt: Publication dialog sql tab for PostgreSQL version <= 14 + :alt: Publication dialog sql tab :align: center The example creates a publication named *pub1* that is owned by *postgres*. It diff --git a/web/pgadmin/browser/server_groups/servers/databases/publications/static/js/publication.ui.js b/web/pgadmin/browser/server_groups/servers/databases/publications/static/js/publication.ui.js index 6628ce151..669506215 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/publications/static/js/publication.ui.js +++ b/web/pgadmin/browser/server_groups/servers/databases/publications/static/js/publication.ui.js @@ -260,11 +260,11 @@ export default class PublicationSchema extends BaseUISchema { mode: ['edit', 'properties', 'create'], controlProps: { allowClear: false}, },{ 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);}, },{ 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) => { if(obj.isNew(state)) return obj.isTable(state); @@ -291,7 +291,7 @@ export default class PublicationSchema extends BaseUISchema { 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, }, { @@ -299,7 +299,7 @@ export default class PublicationSchema extends BaseUISchema { type: this.version < 150000 ? 'select' : 'collection', controlProps: this.version < 150000 ? { allowClear: true, multiple: true, creatable: true } : null, 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, uniqueCol: this.version < 150000 ? null : ['table_name'], 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'], - label: gettext('With'), group: this.version < 150000 ? gettext('Definition') : gettext('Options'), + label: gettext('With'), group: gettext('Options'), schema : new DefaultWithSchema(this.node_info), }, ];