I've installed Stash 3.8.0, and when I start it up for the first time and configure it to talk to the external database I am seeing the following:
Stash does not have adequate permissions to modify the target database when connected as the specified user. Please check that the user has permission to CREATE and DROP tables and to INSERT and DELETE data. For information about creating a database for use with Stash, please refer to the Stash documentation.If you continue having issues, get in touch with our support team and we'll help get you up and running.
Hide details
Stash does not have adequate permissions to modify the target database when connected as the specified user. Please check that the user has permission to CREATE and DROP tables and to INSERT and DELETE data. For information about creating a database for use with Stash, please refer to the Stash documentation.
com.atlassian.stash.internal.db.DefaultDatabaseManager.validateConfiguration(DefaultDatabaseManager.java:231)
com.atlassian.stash.internal.migration.DefaultMigrationService.validateConfiguration(DefaultMigrationService.java:85)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
From the same host I'm able to create and drop tables without any issue though. In the database log we are then seeing the following:
ERROR: Cannot run UPDATE or DELETE on table sta_cs_test because it does not have primary key.
HINT: Add primary key to the table
STATEMENT: DELETE FROM STA_CS_TEST WHERE TEST_COLUMN = 'test'
ERROR: current transaction is aborted, commands ignored until end of transaction block
STATEMENT: DROP TABLE STA_CS_TEST
LOG: unexpected EOF on standby connection
LOG: starting logical decoding for slot "bdr_16385_6135100484192149981_1_16385__"
DETAIL: streaming transactions committing after 0/1913480, reading WAL from 0/1913448
LOG: logical decoding found consistent point at 0/1913448
DETAIL: There are no running transactions.
ERROR: Cannot run UPDATE or DELETE on table sta_cs_test because it does not have primary key.
HINT: Add primary key to the table
STATEMENT: DELETE FROM STA_CS_TEST WHERE TEST_COLUMN = 'test'
ERROR: current transaction is aborted, commands ignored until end of transaction block
STATEMENT: DROP TABLE STA_CS_TEST
ERROR: Cannot run UPDATE or DELETE on table sta_cs_test because it does not have primary key.
HINT: Add primary key to the table
STATEMENT: DELETE FROM STA_CS_TEST WHERE TEST_COLUMN = 'test'
ERROR: current transaction is aborted, commands ignored until end of transaction block
STATEMENT: DROP TABLE STA_CS_TEST
ERROR: Cannot run UPDATE or DELETE on table sta_cs_test because it does not have primary key.
HINT: Add primary key to the table
STATEMENT: DELETE FROM STA_CS_TEST WHERE TEST_COLUMN = 'test'
ERROR: current transaction is aborted, commands ignored until end of transaction block
STATEMENT: DROP TABLE STA_CS_TEST
ERROR: Cannot run UPDATE or DELETE on table sta_cs_test because it does not have primary key.
HINT: Add primary key to the table
STATEMENT: DELETE FROM STA_CS_TEST WHERE TEST_COLUMN = 'test'
ERROR: current transaction is aborted, commands ignored until end of transaction block
STATEMENT: DROP TABLE STA_CS_TEST
ERROR: Cannot run UPDATE or DELETE on table sta_cs_test because it does not have primary key.
HINT: Add primary key to the table
STATEMENT: DELETE FROM STA_CS_TEST WHERE TEST_COLUMN = 'test'
ERROR: current transaction is aborted, commands ignored until end of transaction block
STATEMENT: DROP TABLE STA_CS_TEST
ERROR: Cannot run UPDATE or DELETE on table sta_cs_test because it does not have primary key.
HINT: Add primary key to the table
STATEMENT: DELETE FROM STA_CS_TEST WHERE TEST_COLUMN = 'test'
ERROR: current transaction is aborted, commands ignored until end of transaction block
I searched through the answers, but couldn't find anything matching a similar issue.
After talking about it more it sounds like maybe replication is what is requiring the primary key. Can Stash not accommodate that?