Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion include/spock_conflict.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,16 @@ extern bool spock_save_resolutions;
*/
typedef enum
{
/* The row to be inserted violates unique constraint */
/*
* The row to be inserted violates a unique constraint.
* This behaviour is controlled by GUC check_all_uc_indexes (default OFF).
* When ON, this conflict exactly matches PostgreSQL's INSERT_EXISTS
* conflict and Spock attempts to resolve it when any UNIQUE index rejects
* the insertion. It is counted as a conflict in subscription statistics
* and the exception log. When OFF, only a replica identity index
* violation is counted as a conflict; other index violations cause an
* ERROR and are not counted as conflicts.
*/
SPOCK_CT_INSERT_EXISTS,

/* The row to be updated was modified by a different origin */
Expand Down
4 changes: 0 additions & 4 deletions include/spock_sync.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,4 @@ extern bool wait_for_sync_status_change(Oid subid, const char *nspname,
extern void truncate_table(char *nspname, char *relname);
extern List *get_subscription_tables(Oid subid);

#ifdef WIN32
extern void QuoteWindowsArgv(StringInfo cmdline, const char *argv[]);
#endif

#endif /* SPOCK_SYNC_H */
16 changes: 0 additions & 16 deletions src/spock.c
Original file line number Diff line number Diff line change
Expand Up @@ -757,28 +757,12 @@ spock_temp_directory_assing_hook(const char *newval, void *extra)
}
else
{
#ifndef WIN32
const char *tmpdir = getenv("TMPDIR");

if (!tmpdir)
tmpdir = "/tmp";
#else
char tmpdir[MAXPGPATH];
int ret;

ret = GetTempPath(MAXPGPATH, tmpdir);
if (ret == 0 || ret > MAXPGPATH)
{
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("could not locate temporary directory: %s\n",
!ret ? strerror(errno) : "")));
return false;
}
#endif

spock_temp_directory = strdup(tmpdir);

}

if (spock_temp_directory == NULL)
Expand Down
Loading