Unify spelling of "canceled", "canceling", "cancellation"
We had previously (af26857a2775e7ceb0916155e931008c2116632f) established the U.S. spellings as standard.
This commit is contained in:
parent
465883b0a2
commit
21f1e15aaf
@ -1585,7 +1585,7 @@ if (!triggered)
|
|||||||
<para>
|
<para>
|
||||||
There are also additional types of conflict that can occur with Hot Standby.
|
There are also additional types of conflict that can occur with Hot Standby.
|
||||||
These conflicts are <emphasis>hard conflicts</> in the sense that queries
|
These conflicts are <emphasis>hard conflicts</> in the sense that queries
|
||||||
might need to be cancelled and, in some cases, sessions disconnected to resolve them.
|
might need to be canceled and, in some cases, sessions disconnected to resolve them.
|
||||||
The user is provided with several ways to handle these
|
The user is provided with several ways to handle these
|
||||||
conflicts. Conflict cases include:
|
conflicts. Conflict cases include:
|
||||||
|
|
||||||
@ -1682,7 +1682,7 @@ if (!triggered)
|
|||||||
<para>
|
<para>
|
||||||
Once the delay specified by <varname>max_standby_archive_delay</> or
|
Once the delay specified by <varname>max_standby_archive_delay</> or
|
||||||
<varname>max_standby_streaming_delay</> has been exceeded, conflicting
|
<varname>max_standby_streaming_delay</> has been exceeded, conflicting
|
||||||
queries will be cancelled. This usually results just in a cancellation
|
queries will be canceled. This usually results just in a cancellation
|
||||||
error, although in the case of replaying a <command>DROP DATABASE</>
|
error, although in the case of replaying a <command>DROP DATABASE</>
|
||||||
the entire conflicting session will be terminated. Also, if the conflict
|
the entire conflicting session will be terminated. Also, if the conflict
|
||||||
is over a lock held by an idle transaction, the conflicting session is
|
is over a lock held by an idle transaction, the conflicting session is
|
||||||
@ -1690,10 +1690,10 @@ if (!triggered)
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Cancelled queries may be retried immediately (after beginning a new
|
Canceled queries may be retried immediately (after beginning a new
|
||||||
transaction, of course). Since query cancellation depends on
|
transaction, of course). Since query cancellation depends on
|
||||||
the nature of the WAL records being replayed, a query that was
|
the nature of the WAL records being replayed, a query that was
|
||||||
cancelled may well succeed if it is executed again.
|
canceled may well succeed if it is executed again.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -1751,7 +1751,7 @@ if (!triggered)
|
|||||||
Another option is to increase <xref linkend="guc-vacuum-defer-cleanup-age">
|
Another option is to increase <xref linkend="guc-vacuum-defer-cleanup-age">
|
||||||
on the primary server, so that dead rows will not be cleaned up as quickly
|
on the primary server, so that dead rows will not be cleaned up as quickly
|
||||||
as they normally would be. This will allow more time for queries to
|
as they normally would be. This will allow more time for queries to
|
||||||
execute before they are cancelled on the standby, without having to set
|
execute before they are canceled on the standby, without having to set
|
||||||
a high <varname>max_standby_streaming_delay</>. However it is
|
a high <varname>max_standby_streaming_delay</>. However it is
|
||||||
difficult to guarantee any specific execution-time window with this
|
difficult to guarantee any specific execution-time window with this
|
||||||
approach, since <varname>vacuum_defer_cleanup_age</> is measured in
|
approach, since <varname>vacuum_defer_cleanup_age</> is measured in
|
||||||
@ -1981,7 +1981,7 @@ LOG: database system is ready to accept read only connections
|
|||||||
<command>DROP TABLESPACE</> can only succeed if the tablespace is empty.
|
<command>DROP TABLESPACE</> can only succeed if the tablespace is empty.
|
||||||
Some standby users may be actively using the tablespace via their
|
Some standby users may be actively using the tablespace via their
|
||||||
<varname>temp_tablespaces</> parameter. If there are temporary files in the
|
<varname>temp_tablespaces</> parameter. If there are temporary files in the
|
||||||
tablespace, all active queries are cancelled to ensure that temporary
|
tablespace, all active queries are canceled to ensure that temporary
|
||||||
files are removed, so the tablespace can be removed and WAL replay
|
files are removed, so the tablespace can be removed and WAL replay
|
||||||
can continue.
|
can continue.
|
||||||
</para>
|
</para>
|
||||||
|
@ -712,7 +712,7 @@ amrestrpos (IndexScanDesc scan);
|
|||||||
read-write conflict with the insert of any tuple into that index by a
|
read-write conflict with the insert of any tuple into that index by a
|
||||||
concurrent serializable transaction. If certain patterns of read-write
|
concurrent serializable transaction. If certain patterns of read-write
|
||||||
conflicts are detected among a set of concurrent serializable
|
conflicts are detected among a set of concurrent serializable
|
||||||
transactions, one of those transactions may be cancelled to protect data
|
transactions, one of those transactions may be canceled to protect data
|
||||||
integrity. When the flag is set, it indicates that the index access
|
integrity. When the flag is set, it indicates that the index access
|
||||||
method implements finer-grained predicate locking, which will tend to
|
method implements finer-grained predicate locking, which will tend to
|
||||||
reduce the frequency of such transaction cancellations.
|
reduce the frequency of such transaction cancellations.
|
||||||
|
@ -4088,7 +4088,7 @@ int PQflush(PGconn *conn);
|
|||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<sect1 id="libpq-cancel">
|
<sect1 id="libpq-cancel">
|
||||||
<title>Cancelling Queries in Progress</title>
|
<title>Canceling Queries in Progress</title>
|
||||||
|
|
||||||
<indexterm zone="libpq-cancel">
|
<indexterm zone="libpq-cancel">
|
||||||
<primary>canceling</primary>
|
<primary>canceling</primary>
|
||||||
|
@ -282,7 +282,7 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
|
|||||||
total disk blocks read, total buffer hits (i.e., block
|
total disk blocks read, total buffer hits (i.e., block
|
||||||
read requests avoided by finding the block already in buffer cache),
|
read requests avoided by finding the block already in buffer cache),
|
||||||
number of rows returned, fetched, inserted, updated and deleted, the
|
number of rows returned, fetched, inserted, updated and deleted, the
|
||||||
total number of queries cancelled due to conflict with recovery (on
|
total number of queries canceled due to conflict with recovery (on
|
||||||
standby servers), and time of last statistics reset.
|
standby servers), and time of last statistics reset.
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
@ -290,7 +290,7 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
|
|||||||
<row>
|
<row>
|
||||||
<entry><structname>pg_stat_database_conflicts</><indexterm><primary>pg_stat_database_conflicts</primary></indexterm></entry>
|
<entry><structname>pg_stat_database_conflicts</><indexterm><primary>pg_stat_database_conflicts</primary></indexterm></entry>
|
||||||
<entry>One row per database, showing database OID, database name and
|
<entry>One row per database, showing database OID, database name and
|
||||||
the number of queries that have been cancelled in this database due to
|
the number of queries that have been canceled in this database due to
|
||||||
dropped tablespaces, lock timeouts, old snapshots, pinned buffers and
|
dropped tablespaces, lock timeouts, old snapshots, pinned buffers and
|
||||||
deadlocks. Will only contain information on standby servers, since
|
deadlocks. Will only contain information on standby servers, since
|
||||||
conflicts do not occur on master servers.
|
conflicts do not occur on master servers.
|
||||||
@ -639,7 +639,7 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
|
|||||||
<entry><literal><function>pg_stat_get_db_conflict_tablespace</function>(<type>oid</type>)</literal></entry>
|
<entry><literal><function>pg_stat_get_db_conflict_tablespace</function>(<type>oid</type>)</literal></entry>
|
||||||
<entry><type>bigint</type></entry>
|
<entry><type>bigint</type></entry>
|
||||||
<entry>
|
<entry>
|
||||||
Number of queries cancelled because of recovery conflict with dropped tablespaces in database
|
Number of queries canceled because of recovery conflict with dropped tablespaces in database
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
@ -647,7 +647,7 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
|
|||||||
<entry><literal><function>pg_stat_get_db_conflict_lock</function>(<type>oid</type>)</literal></entry>
|
<entry><literal><function>pg_stat_get_db_conflict_lock</function>(<type>oid</type>)</literal></entry>
|
||||||
<entry><type>bigint</type></entry>
|
<entry><type>bigint</type></entry>
|
||||||
<entry>
|
<entry>
|
||||||
Number of queries cancelled because of recovery conflict with locks in database
|
Number of queries canceled because of recovery conflict with locks in database
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
@ -655,7 +655,7 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
|
|||||||
<entry><literal><function>pg_stat_get_db_conflict_snapshot</function>(<type>oid</type>)</literal></entry>
|
<entry><literal><function>pg_stat_get_db_conflict_snapshot</function>(<type>oid</type>)</literal></entry>
|
||||||
<entry><type>bigint</type></entry>
|
<entry><type>bigint</type></entry>
|
||||||
<entry>
|
<entry>
|
||||||
Number of queries cancelled because of recovery conflict with old snapshots in database
|
Number of queries canceled because of recovery conflict with old snapshots in database
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
@ -663,7 +663,7 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
|
|||||||
<entry><literal><function>pg_stat_get_db_conflict_bufferpin</function>(<type>oid</type>)</literal></entry>
|
<entry><literal><function>pg_stat_get_db_conflict_bufferpin</function>(<type>oid</type>)</literal></entry>
|
||||||
<entry><type>bigint</type></entry>
|
<entry><type>bigint</type></entry>
|
||||||
<entry>
|
<entry>
|
||||||
Number of queries cancelled because of recovery conflict with pinned buffers in database
|
Number of queries canceled because of recovery conflict with pinned buffers in database
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
@ -671,7 +671,7 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
|
|||||||
<entry><literal><function>pg_stat_get_db_conflict_startup_deadlock</function>(<type>oid</type>)</literal></entry>
|
<entry><literal><function>pg_stat_get_db_conflict_startup_deadlock</function>(<type>oid</type>)</literal></entry>
|
||||||
<entry><type>bigint</type></entry>
|
<entry><type>bigint</type></entry>
|
||||||
<entry>
|
<entry>
|
||||||
Number of queries cancelled because of recovery conflict with deadlocks in database
|
Number of queries canceled because of recovery conflict with deadlocks in database
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
|
@ -1142,7 +1142,7 @@
|
|||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2>
|
<sect2>
|
||||||
<title>Cancelling Requests in Progress</title>
|
<title>Canceling Requests in Progress</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
During the processing of a query, the frontend might request
|
During the processing of a query, the frontend might request
|
||||||
|
@ -143,7 +143,7 @@ SET SESSION CHARACTERISTICS AS TRANSACTION <replaceable class="parameter">transa
|
|||||||
transaction, the transaction may block when first acquiring its snapshot,
|
transaction, the transaction may block when first acquiring its snapshot,
|
||||||
after which it is able to run without the normal overhead of a
|
after which it is able to run without the normal overhead of a
|
||||||
<literal>SERIALIZABLE</literal> transaction and without any risk of
|
<literal>SERIALIZABLE</literal> transaction and without any risk of
|
||||||
contributing to or being cancelled by a serialization failure. This mode
|
contributing to or being canceled by a serialization failure. This mode
|
||||||
is well suited for long-running reports or backups.
|
is well suited for long-running reports or backups.
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
@ -465,7 +465,7 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This fix prevents a PANIC if a <literal>VACUUM FULL</> is cancelled
|
This fix prevents a PANIC if a <literal>VACUUM FULL</> is canceled
|
||||||
after it's already committed its tuple movements, as well as transient
|
after it's already committed its tuple movements, as well as transient
|
||||||
errors if a plain <literal>VACUUM</> is interrupted after having
|
errors if a plain <literal>VACUUM</> is interrupted after having
|
||||||
truncated the table.
|
truncated the table.
|
||||||
|
@ -609,7 +609,7 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This fix prevents a PANIC if a <literal>VACUUM FULL</> is cancelled
|
This fix prevents a PANIC if a <literal>VACUUM FULL</> is canceled
|
||||||
after it's already committed its tuple movements, as well as transient
|
after it's already committed its tuple movements, as well as transient
|
||||||
errors if a plain <literal>VACUUM</> is interrupted after having
|
errors if a plain <literal>VACUUM</> is interrupted after having
|
||||||
truncated the table.
|
truncated the table.
|
||||||
|
@ -849,7 +849,7 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This fix prevents a PANIC if a <literal>VACUUM FULL</> is cancelled
|
This fix prevents a PANIC if a <literal>VACUUM FULL</> is canceled
|
||||||
after it's already committed its tuple movements, as well as transient
|
after it's already committed its tuple movements, as well as transient
|
||||||
errors if a plain <literal>VACUUM</> is interrupted after having
|
errors if a plain <literal>VACUUM</> is interrupted after having
|
||||||
truncated the table.
|
truncated the table.
|
||||||
@ -4203,7 +4203,7 @@ psql -t -f fixseq.sql db1 | psql -e db1
|
|||||||
<para>
|
<para>
|
||||||
While the <varname>statement_timeout</> configuration
|
While the <varname>statement_timeout</> configuration
|
||||||
parameter allows a query taking more than a certain amount of
|
parameter allows a query taking more than a certain amount of
|
||||||
time to be cancelled, the <command>NOWAIT</> option allows a
|
time to be canceled, the <command>NOWAIT</> option allows a
|
||||||
query to be canceled as soon as a <command>SELECT ... FOR
|
query to be canceled as soon as a <command>SELECT ... FOR
|
||||||
UPDATE/SHARE</> command cannot immediately acquire a row lock.
|
UPDATE/SHARE</> command cannot immediately acquire a row lock.
|
||||||
</para>
|
</para>
|
||||||
|
@ -1334,7 +1334,7 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This fix prevents a PANIC if a <literal>VACUUM FULL</> is cancelled
|
This fix prevents a PANIC if a <literal>VACUUM FULL</> is canceled
|
||||||
after it's already committed its tuple movements, as well as transient
|
after it's already committed its tuple movements, as well as transient
|
||||||
errors if a plain <literal>VACUUM</> is interrupted after having
|
errors if a plain <literal>VACUUM</> is interrupted after having
|
||||||
truncated the table.
|
truncated the table.
|
||||||
|
@ -1566,7 +1566,7 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This fix prevents a PANIC if a <literal>VACUUM FULL</> is cancelled
|
This fix prevents a PANIC if a <literal>VACUUM FULL</> is canceled
|
||||||
after it's already committed its tuple movements, as well as transient
|
after it's already committed its tuple movements, as well as transient
|
||||||
errors if a plain <literal>VACUUM</> is interrupted after having
|
errors if a plain <literal>VACUUM</> is interrupted after having
|
||||||
truncated the table.
|
truncated the table.
|
||||||
|
@ -2062,7 +2062,7 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This fix prevents a PANIC if a <literal>VACUUM FULL</> is cancelled
|
This fix prevents a PANIC if a <literal>VACUUM FULL</> is canceled
|
||||||
after it's already committed its tuple movements, as well as transient
|
after it's already committed its tuple movements, as well as transient
|
||||||
errors if a plain <literal>VACUUM</> is interrupted after having
|
errors if a plain <literal>VACUUM</> is interrupted after having
|
||||||
truncated the table.
|
truncated the table.
|
||||||
|
@ -779,7 +779,7 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This helps avoid cancelling long-running queries on the standby.
|
This helps avoid canceling long-running queries on the standby.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
|
@ -8379,13 +8379,13 @@ xlog_redo(XLogRecPtr lsn, XLogRecord *record)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* If we see a shutdown checkpoint while waiting for an end-of-backup
|
* If we see a shutdown checkpoint while waiting for an end-of-backup
|
||||||
* record, the backup was cancelled and the end-of-backup record will
|
* record, the backup was canceled and the end-of-backup record will
|
||||||
* never arrive.
|
* never arrive.
|
||||||
*/
|
*/
|
||||||
if (InArchiveRecovery &&
|
if (InArchiveRecovery &&
|
||||||
!XLogRecPtrIsInvalid(ControlFile->backupStartPoint))
|
!XLogRecPtrIsInvalid(ControlFile->backupStartPoint))
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errmsg("online backup was cancelled, recovery cannot continue")));
|
(errmsg("online backup was canceled, recovery cannot continue")));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we see a shutdown checkpoint, we know that nothing was running
|
* If we see a shutdown checkpoint, we know that nothing was running
|
||||||
@ -9341,7 +9341,7 @@ do_pg_stop_backup(char *labelfile, bool waitforarchive)
|
|||||||
(errmsg("pg_stop_backup still waiting for all required WAL segments to be archived (%d seconds elapsed)",
|
(errmsg("pg_stop_backup still waiting for all required WAL segments to be archived (%d seconds elapsed)",
|
||||||
waits),
|
waits),
|
||||||
errhint("Check that your archive_command is executing properly. "
|
errhint("Check that your archive_command is executing properly. "
|
||||||
"pg_stop_backup can be cancelled safely, "
|
"pg_stop_backup can be canceled safely, "
|
||||||
"but the database backup will not be usable without all the WAL segments.")));
|
"but the database backup will not be usable without all the WAL segments.")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -9823,13 +9823,13 @@ CancelBackup(void)
|
|||||||
if (stat(BACKUP_LABEL_FILE, &stat_buf) < 0)
|
if (stat(BACKUP_LABEL_FILE, &stat_buf) < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* remove leftover file from previously cancelled backup if it exists */
|
/* remove leftover file from previously canceled backup if it exists */
|
||||||
unlink(BACKUP_LABEL_OLD);
|
unlink(BACKUP_LABEL_OLD);
|
||||||
|
|
||||||
if (rename(BACKUP_LABEL_FILE, BACKUP_LABEL_OLD) == 0)
|
if (rename(BACKUP_LABEL_FILE, BACKUP_LABEL_OLD) == 0)
|
||||||
{
|
{
|
||||||
ereport(LOG,
|
ereport(LOG,
|
||||||
(errmsg("online backup mode cancelled"),
|
(errmsg("online backup mode canceled"),
|
||||||
errdetail("\"%s\" was renamed to \"%s\".",
|
errdetail("\"%s\" was renamed to \"%s\".",
|
||||||
BACKUP_LABEL_FILE, BACKUP_LABEL_OLD)));
|
BACKUP_LABEL_FILE, BACKUP_LABEL_OLD)));
|
||||||
}
|
}
|
||||||
@ -9837,7 +9837,7 @@ CancelBackup(void)
|
|||||||
{
|
{
|
||||||
ereport(WARNING,
|
ereport(WARNING,
|
||||||
(errcode_for_file_access(),
|
(errcode_for_file_access(),
|
||||||
errmsg("online backup mode was not cancelled"),
|
errmsg("online backup mode was not canceled"),
|
||||||
errdetail("Could not rename \"%s\" to \"%s\": %m.",
|
errdetail("Could not rename \"%s\" to \"%s\": %m.",
|
||||||
BACKUP_LABEL_FILE, BACKUP_LABEL_OLD)));
|
BACKUP_LABEL_FILE, BACKUP_LABEL_OLD)));
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,7 @@ static bool vacuum_rel(Oid relid, VacuumStmt *vacstmt, bool do_toast,
|
|||||||
* tables separately.
|
* tables separately.
|
||||||
*
|
*
|
||||||
* for_wraparound is used by autovacuum to let us know when it's forcing
|
* for_wraparound is used by autovacuum to let us know when it's forcing
|
||||||
* a vacuum for wraparound, which should not be auto-cancelled.
|
* a vacuum for wraparound, which should not be auto-canceled.
|
||||||
*
|
*
|
||||||
* bstrategy is normally given as NULL, but in autovacuum it can be passed
|
* bstrategy is normally given as NULL, but in autovacuum it can be passed
|
||||||
* in to use the same buffer strategy object across multiple vacuum() calls.
|
* in to use the same buffer strategy object across multiple vacuum() calls.
|
||||||
@ -867,7 +867,7 @@ vacuum_rel(Oid relid, VacuumStmt *vacstmt, bool do_toast, bool for_wraparound)
|
|||||||
* here by violating transaction semantics.)
|
* here by violating transaction semantics.)
|
||||||
*
|
*
|
||||||
* We also set the VACUUM_FOR_WRAPAROUND flag, which is passed down by
|
* We also set the VACUUM_FOR_WRAPAROUND flag, which is passed down by
|
||||||
* autovacuum; it's used to avoid cancelling a vacuum that was invoked
|
* autovacuum; it's used to avoid canceling a vacuum that was invoked
|
||||||
* in an emergency.
|
* in an emergency.
|
||||||
*
|
*
|
||||||
* Note: these flags remain set until CommitTransaction or
|
* Note: these flags remain set until CommitTransaction or
|
||||||
|
@ -714,7 +714,7 @@ AutoVacLauncherMain(int argc, char *argv[])
|
|||||||
worker->wi_links.next = (SHM_QUEUE *) AutoVacuumShmem->av_freeWorkers;
|
worker->wi_links.next = (SHM_QUEUE *) AutoVacuumShmem->av_freeWorkers;
|
||||||
AutoVacuumShmem->av_freeWorkers = worker;
|
AutoVacuumShmem->av_freeWorkers = worker;
|
||||||
AutoVacuumShmem->av_startingWorker = NULL;
|
AutoVacuumShmem->av_startingWorker = NULL;
|
||||||
elog(WARNING, "worker took too long to start; cancelled");
|
elog(WARNING, "worker took too long to start; canceled");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1461,7 +1461,7 @@ AutoVacWorkerMain(int argc, char *argv[])
|
|||||||
pqsignal(SIGHUP, SIG_IGN);
|
pqsignal(SIGHUP, SIG_IGN);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* SIGINT is used to signal cancelling the current table's vacuum; SIGTERM
|
* SIGINT is used to signal canceling the current table's vacuum; SIGTERM
|
||||||
* means abort and exit cleanly, and SIGQUIT means abandon ship.
|
* means abort and exit cleanly, and SIGQUIT means abandon ship.
|
||||||
*/
|
*/
|
||||||
pqsignal(SIGINT, StatementCancelHandler);
|
pqsignal(SIGINT, StatementCancelHandler);
|
||||||
|
@ -1182,7 +1182,7 @@ CompactBgwriterRequestQueue()
|
|||||||
* intervening FORGET_RELATION_FSYNC or FORGET_DATABASE_FSYNC request, so
|
* intervening FORGET_RELATION_FSYNC or FORGET_DATABASE_FSYNC request, so
|
||||||
* we do it this way. It would be possible to be even smarter if we made
|
* we do it this way. It would be possible to be even smarter if we made
|
||||||
* the code below understand the specific semantics of such requests (it
|
* the code below understand the specific semantics of such requests (it
|
||||||
* could blow away preceding entries that would end up being cancelled
|
* could blow away preceding entries that would end up being canceled
|
||||||
* anyhow), but it's not clear that the extra complexity would buy us
|
* anyhow), but it's not clear that the extra complexity would buy us
|
||||||
* anything.
|
* anything.
|
||||||
*/
|
*/
|
||||||
|
@ -2465,7 +2465,7 @@ LockBufferForCleanup(Buffer buffer)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Check called from RecoveryConflictInterrupt handler when Startup
|
* Check called from RecoveryConflictInterrupt handler when Startup
|
||||||
* process requests cancelation of all pin holders that are blocking it.
|
* process requests cancellation of all pin holders that are blocking it.
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
HoldingBufferPinThatDelaysRecovery(void)
|
HoldingBufferPinThatDelaysRecovery(void)
|
||||||
|
@ -239,9 +239,9 @@ serialization anomalies will fail with SQLSTATE 40001, which has a
|
|||||||
standard meaning of "serialization failure".
|
standard meaning of "serialization failure".
|
||||||
|
|
||||||
* This SSI implementation makes an effort to choose the
|
* This SSI implementation makes an effort to choose the
|
||||||
transaction to be cancelled such that an immediate retry of the
|
transaction to be canceled such that an immediate retry of the
|
||||||
transaction will not fail due to conflicts with exactly the same
|
transaction will not fail due to conflicts with exactly the same
|
||||||
transactions. Pursuant to this goal, no transaction is cancelled
|
transactions. Pursuant to this goal, no transaction is canceled
|
||||||
until one of the other transactions in the set of conflicts which
|
until one of the other transactions in the set of conflicts which
|
||||||
could generate an anomaly has successfully committed. This is
|
could generate an anomaly has successfully committed. This is
|
||||||
conceptually similar to how write conflicts are handled. To fully
|
conceptually similar to how write conflicts are handled. To fully
|
||||||
@ -567,7 +567,7 @@ on conflicts with the same transactions.
|
|||||||
information about older committed transactions to put an upper bound
|
information about older committed transactions to put an upper bound
|
||||||
on RAM used. Beyond that limit, information spills to disk.
|
on RAM used. Beyond that limit, information spills to disk.
|
||||||
Performance can degrade in a pessimal situation, but it should be
|
Performance can degrade in a pessimal situation, but it should be
|
||||||
tolerable, and transactions won't need to be cancelled or blocked
|
tolerable, and transactions won't need to be canceled or blocked
|
||||||
from starting.
|
from starting.
|
||||||
|
|
||||||
|
|
||||||
|
@ -535,7 +535,7 @@ FindLockCycleRecurse(PGPROC *checkProc,
|
|||||||
* Note we read vacuumFlags without any locking. This is
|
* Note we read vacuumFlags without any locking. This is
|
||||||
* OK only for checking the PROC_IS_AUTOVACUUM flag,
|
* OK only for checking the PROC_IS_AUTOVACUUM flag,
|
||||||
* because that flag is set at process start and never
|
* because that flag is set at process start and never
|
||||||
* reset; there is logic elsewhere to avoid cancelling an
|
* reset; there is logic elsewhere to avoid canceling an
|
||||||
* autovacuum that is working for preventing Xid
|
* autovacuum that is working for preventing Xid
|
||||||
* wraparound problems (which needs to read a different
|
* wraparound problems (which needs to read a different
|
||||||
* vacuumFlag bit), but we don't do that here to avoid
|
* vacuumFlag bit), but we don't do that here to avoid
|
||||||
|
@ -3752,7 +3752,7 @@ CheckForSerializableConflictOut(bool visible, Relation relation,
|
|||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_T_R_SERIALIZATION_FAILURE),
|
(errcode(ERRCODE_T_R_SERIALIZATION_FAILURE),
|
||||||
errmsg("could not serialize access due to read/write dependencies among transactions"),
|
errmsg("could not serialize access due to read/write dependencies among transactions"),
|
||||||
errdetail("Cancelled on identification as a pivot, during conflict out checking."),
|
errdetail("Canceled on identification as a pivot, during conflict out checking."),
|
||||||
errhint("The transaction might succeed if retried.")));
|
errhint("The transaction might succeed if retried.")));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3841,7 +3841,7 @@ CheckForSerializableConflictOut(bool visible, Relation relation,
|
|||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_T_R_SERIALIZATION_FAILURE),
|
(errcode(ERRCODE_T_R_SERIALIZATION_FAILURE),
|
||||||
errmsg("could not serialize access due to read/write dependencies among transactions"),
|
errmsg("could not serialize access due to read/write dependencies among transactions"),
|
||||||
errdetail("Cancelled on conflict out to old pivot %u.", xid),
|
errdetail("Canceled on conflict out to old pivot %u.", xid),
|
||||||
errhint("The transaction might succeed if retried.")));
|
errhint("The transaction might succeed if retried.")));
|
||||||
|
|
||||||
if (SxactHasSummaryConflictIn(MySerializableXact)
|
if (SxactHasSummaryConflictIn(MySerializableXact)
|
||||||
@ -3849,7 +3849,7 @@ CheckForSerializableConflictOut(bool visible, Relation relation,
|
|||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_T_R_SERIALIZATION_FAILURE),
|
(errcode(ERRCODE_T_R_SERIALIZATION_FAILURE),
|
||||||
errmsg("could not serialize access due to read/write dependencies among transactions"),
|
errmsg("could not serialize access due to read/write dependencies among transactions"),
|
||||||
errdetail("Cancelled on identification as a pivot, with conflict out to old committed transaction %u.", xid),
|
errdetail("Canceled on identification as a pivot, with conflict out to old committed transaction %u.", xid),
|
||||||
errhint("The transaction might succeed if retried.")));
|
errhint("The transaction might succeed if retried.")));
|
||||||
|
|
||||||
MySerializableXact->flags |= SXACT_FLAG_SUMMARY_CONFLICT_OUT;
|
MySerializableXact->flags |= SXACT_FLAG_SUMMARY_CONFLICT_OUT;
|
||||||
@ -3872,7 +3872,7 @@ CheckForSerializableConflictOut(bool visible, Relation relation,
|
|||||||
* We have a conflict out to a transaction which has a conflict out to a
|
* We have a conflict out to a transaction which has a conflict out to a
|
||||||
* summarized transaction. That summarized transaction must have
|
* summarized transaction. That summarized transaction must have
|
||||||
* committed first, and we can't tell when it committed in relation to our
|
* committed first, and we can't tell when it committed in relation to our
|
||||||
* snapshot acquisition, so something needs to be cancelled.
|
* snapshot acquisition, so something needs to be canceled.
|
||||||
*/
|
*/
|
||||||
if (SxactHasSummaryConflictOut(sxact))
|
if (SxactHasSummaryConflictOut(sxact))
|
||||||
{
|
{
|
||||||
@ -3888,7 +3888,7 @@ CheckForSerializableConflictOut(bool visible, Relation relation,
|
|||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_T_R_SERIALIZATION_FAILURE),
|
(errcode(ERRCODE_T_R_SERIALIZATION_FAILURE),
|
||||||
errmsg("could not serialize access due to read/write dependencies among transactions"),
|
errmsg("could not serialize access due to read/write dependencies among transactions"),
|
||||||
errdetail("Cancelled on conflict out to old pivot."),
|
errdetail("Canceled on conflict out to old pivot."),
|
||||||
errhint("The transaction might succeed if retried.")));
|
errhint("The transaction might succeed if retried.")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4127,7 +4127,7 @@ CheckForSerializableConflictIn(Relation relation, HeapTuple tuple,
|
|||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_T_R_SERIALIZATION_FAILURE),
|
(errcode(ERRCODE_T_R_SERIALIZATION_FAILURE),
|
||||||
errmsg("could not serialize access due to read/write dependencies among transactions"),
|
errmsg("could not serialize access due to read/write dependencies among transactions"),
|
||||||
errdetail("Cancelled on identification as a pivot, during conflict in checking."),
|
errdetail("Canceled on identification as a pivot, during conflict in checking."),
|
||||||
errhint("The transaction might succeed if retried.")));
|
errhint("The transaction might succeed if retried.")));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -4459,7 +4459,7 @@ OnConflict_CheckForSerializationFailure(const SERIALIZABLEXACT *reader,
|
|||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_T_R_SERIALIZATION_FAILURE),
|
(errcode(ERRCODE_T_R_SERIALIZATION_FAILURE),
|
||||||
errmsg("could not serialize access due to read/write dependencies among transactions"),
|
errmsg("could not serialize access due to read/write dependencies among transactions"),
|
||||||
errdetail("Cancelled on identification as a pivot, during write."),
|
errdetail("Canceled on identification as a pivot, during write."),
|
||||||
errhint("The transaction might succeed if retried.")));
|
errhint("The transaction might succeed if retried.")));
|
||||||
}
|
}
|
||||||
else if (SxactIsPrepared(writer))
|
else if (SxactIsPrepared(writer))
|
||||||
@ -4471,7 +4471,7 @@ OnConflict_CheckForSerializationFailure(const SERIALIZABLEXACT *reader,
|
|||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_T_R_SERIALIZATION_FAILURE),
|
(errcode(ERRCODE_T_R_SERIALIZATION_FAILURE),
|
||||||
errmsg("could not serialize access due to read/write dependencies among transactions"),
|
errmsg("could not serialize access due to read/write dependencies among transactions"),
|
||||||
errdetail("Cancelled on conflict out to pivot %u, during read.", writer->topXid),
|
errdetail("Canceled on conflict out to pivot %u, during read.", writer->topXid),
|
||||||
errhint("The transaction might succeed if retried.")));
|
errhint("The transaction might succeed if retried.")));
|
||||||
}
|
}
|
||||||
writer->flags |= SXACT_FLAG_DOOMED;
|
writer->flags |= SXACT_FLAG_DOOMED;
|
||||||
@ -4492,7 +4492,7 @@ OnConflict_CheckForSerializationFailure(const SERIALIZABLEXACT *reader,
|
|||||||
* marked for death, because rolling back another transaction might mean
|
* marked for death, because rolling back another transaction might mean
|
||||||
* that we flail without ever making progress. This transaction is
|
* that we flail without ever making progress. This transaction is
|
||||||
* committing writes, so letting it commit ensures progress. If we
|
* committing writes, so letting it commit ensures progress. If we
|
||||||
* cancelled the far conflict, it might immediately fail again on retry.
|
* canceled the far conflict, it might immediately fail again on retry.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
PreCommit_CheckForSerializationFailure(void)
|
PreCommit_CheckForSerializationFailure(void)
|
||||||
@ -4513,7 +4513,7 @@ PreCommit_CheckForSerializationFailure(void)
|
|||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_T_R_SERIALIZATION_FAILURE),
|
(errcode(ERRCODE_T_R_SERIALIZATION_FAILURE),
|
||||||
errmsg("could not serialize access due to read/write dependencies among transactions"),
|
errmsg("could not serialize access due to read/write dependencies among transactions"),
|
||||||
errdetail("Cancelled on identification as a pivot, during commit attempt."),
|
errdetail("Canceled on identification as a pivot, during commit attempt."),
|
||||||
errhint("The transaction might succeed if retried.")));
|
errhint("The transaction might succeed if retried.")));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4551,7 +4551,7 @@ PreCommit_CheckForSerializationFailure(void)
|
|||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_T_R_SERIALIZATION_FAILURE),
|
(errcode(ERRCODE_T_R_SERIALIZATION_FAILURE),
|
||||||
errmsg("could not serialize access due to read/write dependencies among transactions"),
|
errmsg("could not serialize access due to read/write dependencies among transactions"),
|
||||||
errdetail("Cancelled on commit attempt with conflict in from prepared pivot."),
|
errdetail("Canceled on commit attempt with conflict in from prepared pivot."),
|
||||||
errhint("The transaction might succeed if retried.")));
|
errhint("The transaction might succeed if retried.")));
|
||||||
}
|
}
|
||||||
nearConflict->sxactOut->flags |= SXACT_FLAG_DOOMED;
|
nearConflict->sxactOut->flags |= SXACT_FLAG_DOOMED;
|
||||||
|
@ -1324,7 +1324,7 @@ CheckDeadLock(void)
|
|||||||
* the lock.
|
* the lock.
|
||||||
*
|
*
|
||||||
* If blocked by autovacuum, this wakeup will enable ProcSleep to send
|
* If blocked by autovacuum, this wakeup will enable ProcSleep to send
|
||||||
* the cancelling signal to the autovacuum worker.
|
* the canceling signal to the autovacuum worker.
|
||||||
*/
|
*/
|
||||||
PGSemaphoreUnlock(&MyProc->sem);
|
PGSemaphoreUnlock(&MyProc->sem);
|
||||||
}
|
}
|
||||||
|
@ -179,7 +179,7 @@ static int UseNewLine = 1; /* Use newlines query delimiters (the default) */
|
|||||||
static int UseNewLine = 0; /* Use EOF as query delimiters */
|
static int UseNewLine = 0; /* Use EOF as query delimiters */
|
||||||
#endif /* TCOP_DONTUSENEWLINE */
|
#endif /* TCOP_DONTUSENEWLINE */
|
||||||
|
|
||||||
/* whether or not, and why, we were cancelled by conflict with recovery */
|
/* whether or not, and why, we were canceled by conflict with recovery */
|
||||||
static bool RecoveryConflictPending = false;
|
static bool RecoveryConflictPending = false;
|
||||||
static bool RecoveryConflictRetryable = true;
|
static bool RecoveryConflictRetryable = true;
|
||||||
static ProcSignalReason RecoveryConflictReason;
|
static ProcSignalReason RecoveryConflictReason;
|
||||||
|
2
src/backend/utils/cache/relcache.c
vendored
2
src/backend/utils/cache/relcache.c
vendored
@ -1897,7 +1897,7 @@ RelationClearRelation(Relation relation, bool rebuild)
|
|||||||
* on next access. Meanwhile it's not any less valid than it was
|
* on next access. Meanwhile it's not any less valid than it was
|
||||||
* before, so any code that might expect to continue accessing it
|
* before, so any code that might expect to continue accessing it
|
||||||
* isn't hurt by the rebuild failure. (Consider for example a
|
* isn't hurt by the rebuild failure. (Consider for example a
|
||||||
* subtransaction that ALTERs a table and then gets cancelled partway
|
* subtransaction that ALTERs a table and then gets canceled partway
|
||||||
* through the cache entry rebuild. The outer transaction should
|
* through the cache entry rebuild. The outer transaction should
|
||||||
* still see the not-modified cache entry as valid.) The worst
|
* still see the not-modified cache entry as valid.) The worst
|
||||||
* consequence of an error is leaking the necessarily-unreferenced new
|
* consequence of an error is leaking the necessarily-unreferenced new
|
||||||
|
@ -194,7 +194,7 @@ NoticeProcessor(void *arg, const char *message)
|
|||||||
* so. We use write() to report to stderr because it's better to use simple
|
* so. We use write() to report to stderr because it's better to use simple
|
||||||
* facilities in a signal handler.
|
* facilities in a signal handler.
|
||||||
*
|
*
|
||||||
* On win32, the signal cancelling happens on a separate thread, because
|
* On win32, the signal canceling happens on a separate thread, because
|
||||||
* that's how SetConsoleCtrlHandler works. The PQcancel function is safe
|
* that's how SetConsoleCtrlHandler works. The PQcancel function is safe
|
||||||
* for this (unlike PQrequestCancel). However, a CRITICAL_SECTION is required
|
* for this (unlike PQrequestCancel). However, a CRITICAL_SECTION is required
|
||||||
* to protect the PGcancel structure against being changed while the signal
|
* to protect the PGcancel structure against being changed while the signal
|
||||||
|
@ -378,7 +378,7 @@ ResetCancelConn(void)
|
|||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
/*
|
/*
|
||||||
* Handle interrupt signals by cancelling the current command,
|
* Handle interrupt signals by canceling the current command,
|
||||||
* if it's being executed through executeMaintenanceCommand(),
|
* if it's being executed through executeMaintenanceCommand(),
|
||||||
* and thus has a cancelConn set.
|
* and thus has a cancelConn set.
|
||||||
*/
|
*/
|
||||||
|
@ -304,7 +304,7 @@ canonicalize_path(char *path)
|
|||||||
}
|
}
|
||||||
else if (pending_strips > 0 && *spath != '\0')
|
else if (pending_strips > 0 && *spath != '\0')
|
||||||
{
|
{
|
||||||
/* trim a regular directory name cancelled by ".." */
|
/* trim a regular directory name canceled by ".." */
|
||||||
trim_directory(path);
|
trim_directory(path);
|
||||||
pending_strips--;
|
pending_strips--;
|
||||||
/* foo/.. should become ".", not empty */
|
/* foo/.. should become ".", not empty */
|
||||||
|
@ -135,7 +135,7 @@ INSERT INTO pxtest1 VALUES ('fff');
|
|||||||
-- This should fail, because the two transactions have a write-skew anomaly
|
-- This should fail, because the two transactions have a write-skew anomaly
|
||||||
PREPARE TRANSACTION 'foo5';
|
PREPARE TRANSACTION 'foo5';
|
||||||
ERROR: could not serialize access due to read/write dependencies among transactions
|
ERROR: could not serialize access due to read/write dependencies among transactions
|
||||||
DETAIL: Cancelled on commit attempt with conflict in from prepared pivot.
|
DETAIL: Canceled on commit attempt with conflict in from prepared pivot.
|
||||||
HINT: The transaction might succeed if retried.
|
HINT: The transaction might succeed if retried.
|
||||||
SELECT gid FROM pg_prepared_xacts;
|
SELECT gid FROM pg_prepared_xacts;
|
||||||
gid
|
gid
|
||||||
|
@ -266,7 +266,7 @@ SELECT * FROM foo WHERE id IN
|
|||||||
CREATE TABLE orderstest (
|
CREATE TABLE orderstest (
|
||||||
approver_ref integer,
|
approver_ref integer,
|
||||||
po_ref integer,
|
po_ref integer,
|
||||||
ordercancelled boolean
|
ordercanceled boolean
|
||||||
);
|
);
|
||||||
INSERT INTO orderstest VALUES (1, 1, false);
|
INSERT INTO orderstest VALUES (1, 1, false);
|
||||||
INSERT INTO orderstest VALUES (66, 5, false);
|
INSERT INTO orderstest VALUES (66, 5, false);
|
||||||
@ -285,8 +285,8 @@ SELECT *,
|
|||||||
WHEN ord.approver_ref=1 THEN '---' ELSE 'Approved'
|
WHEN ord.approver_ref=1 THEN '---' ELSE 'Approved'
|
||||||
END) AS "Approved",
|
END) AS "Approved",
|
||||||
(SELECT CASE
|
(SELECT CASE
|
||||||
WHEN ord.ordercancelled
|
WHEN ord.ordercanceled
|
||||||
THEN 'Cancelled'
|
THEN 'Canceled'
|
||||||
ELSE
|
ELSE
|
||||||
(SELECT CASE
|
(SELECT CASE
|
||||||
WHEN ord.po_ref=1
|
WHEN ord.po_ref=1
|
||||||
@ -300,8 +300,8 @@ SELECT *,
|
|||||||
END)
|
END)
|
||||||
END) AS "Status",
|
END) AS "Status",
|
||||||
(CASE
|
(CASE
|
||||||
WHEN ord.ordercancelled
|
WHEN ord.ordercanceled
|
||||||
THEN 'Cancelled'
|
THEN 'Canceled'
|
||||||
ELSE
|
ELSE
|
||||||
(CASE
|
(CASE
|
||||||
WHEN ord.po_ref=1
|
WHEN ord.po_ref=1
|
||||||
@ -316,19 +316,19 @@ END) AS "Status",
|
|||||||
END) AS "Status_OK"
|
END) AS "Status_OK"
|
||||||
FROM orderstest ord;
|
FROM orderstest ord;
|
||||||
SELECT * FROM orders_view;
|
SELECT * FROM orders_view;
|
||||||
approver_ref | po_ref | ordercancelled | Approved | Status | Status_OK
|
approver_ref | po_ref | ordercanceled | Approved | Status | Status_OK
|
||||||
--------------+--------+----------------+----------+-----------+-----------
|
--------------+--------+---------------+----------+----------+-----------
|
||||||
1 | 1 | f | --- | --- | ---
|
1 | 1 | f | --- | --- | ---
|
||||||
66 | 5 | f | Approved | PO | PO
|
66 | 5 | f | Approved | PO | PO
|
||||||
66 | 6 | f | Approved | PO | PO
|
66 | 6 | f | Approved | PO | PO
|
||||||
66 | 7 | f | Approved | PO | PO
|
66 | 7 | f | Approved | PO | PO
|
||||||
66 | 1 | t | Approved | Cancelled | Cancelled
|
66 | 1 | t | Approved | Canceled | Canceled
|
||||||
66 | 8 | f | Approved | PO | PO
|
66 | 8 | f | Approved | PO | PO
|
||||||
66 | 1 | f | Approved | Approved | Approved
|
66 | 1 | f | Approved | Approved | Approved
|
||||||
77 | 1 | f | Approved | Approved | Approved
|
77 | 1 | f | Approved | Approved | Approved
|
||||||
1 | 1 | f | --- | --- | ---
|
1 | 1 | f | --- | --- | ---
|
||||||
66 | 1 | f | Approved | Approved | Approved
|
66 | 1 | f | Approved | Approved | Approved
|
||||||
1 | 1 | f | --- | --- | ---
|
1 | 1 | f | --- | --- | ---
|
||||||
(11 rows)
|
(11 rows)
|
||||||
|
|
||||||
DROP TABLE orderstest cascade;
|
DROP TABLE orderstest cascade;
|
||||||
|
@ -136,7 +136,7 @@ SELECT * FROM foo WHERE id IN
|
|||||||
CREATE TABLE orderstest (
|
CREATE TABLE orderstest (
|
||||||
approver_ref integer,
|
approver_ref integer,
|
||||||
po_ref integer,
|
po_ref integer,
|
||||||
ordercancelled boolean
|
ordercanceled boolean
|
||||||
);
|
);
|
||||||
|
|
||||||
INSERT INTO orderstest VALUES (1, 1, false);
|
INSERT INTO orderstest VALUES (1, 1, false);
|
||||||
@ -157,8 +157,8 @@ SELECT *,
|
|||||||
WHEN ord.approver_ref=1 THEN '---' ELSE 'Approved'
|
WHEN ord.approver_ref=1 THEN '---' ELSE 'Approved'
|
||||||
END) AS "Approved",
|
END) AS "Approved",
|
||||||
(SELECT CASE
|
(SELECT CASE
|
||||||
WHEN ord.ordercancelled
|
WHEN ord.ordercanceled
|
||||||
THEN 'Cancelled'
|
THEN 'Canceled'
|
||||||
ELSE
|
ELSE
|
||||||
(SELECT CASE
|
(SELECT CASE
|
||||||
WHEN ord.po_ref=1
|
WHEN ord.po_ref=1
|
||||||
@ -172,8 +172,8 @@ SELECT *,
|
|||||||
END)
|
END)
|
||||||
END) AS "Status",
|
END) AS "Status",
|
||||||
(CASE
|
(CASE
|
||||||
WHEN ord.ordercancelled
|
WHEN ord.ordercanceled
|
||||||
THEN 'Cancelled'
|
THEN 'Canceled'
|
||||||
ELSE
|
ELSE
|
||||||
(CASE
|
(CASE
|
||||||
WHEN ord.po_ref=1
|
WHEN ord.po_ref=1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user