#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
- # Generated by GNU Autoconf 2.69 for PostgreSQL 10beta1 (Postgres-XL 10alpha1).
-# Generated by GNU Autoconf 2.69 for PostgreSQL 10beta2.
++# Generated by GNU Autoconf 2.69 for PostgreSQL 10beta2 (Postgres-XL 10alpha1).
#
-# Report bugs to <pgsql-bugs@postgresql.org>.
+# Report bugs to <bugs@postgres-xl.org>.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
# Identity of this package.
PACKAGE_NAME='PostgreSQL'
PACKAGE_TARNAME='postgresql'
- PACKAGE_VERSION='10beta1 (Postgres-XL 10alpha1)'
-PACKAGE_VERSION='10beta2'
-PACKAGE_STRING='PostgreSQL 10beta2'
-PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org'
++PACKAGE_VERSION='10beta2 (Postgres-XL 10alpha1)'
+PACKAGE_XC_VERSION='10alpha1'
- PACKAGE_STRING='PostgreSQL 10beta1 (Postgres-XL 10alpha1)'
++PACKAGE_STRING='PostgreSQL 10beta2 (Postgres-XL 10alpha1)'
+PACKAGE_BUGREPORT='bugs@postgres-xl.org'
PACKAGE_URL=''
ac_unique_file="src/backend/access/common/heaptuple.c"
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
- \`configure' configures PostgreSQL 10beta1 (Postgres-XL 10alpha1) to adapt to many kinds of systems.
-\`configure' configures PostgreSQL 10beta2 to adapt to many kinds of systems.
++\`configure' configures PostgreSQL 10beta2 (Postgres-XL 10alpha1) to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of PostgreSQL 10beta1 (Postgres-XL 10alpha1):";;
- short | recursive ) echo "Configuration of PostgreSQL 10beta2:";;
++ short | recursive ) echo "Configuration of PostgreSQL 10beta2 (Postgres-XL 10alpha1):";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
- PostgreSQL configure 10beta1 (Postgres-XL 10alpha1)
-PostgreSQL configure 10beta2
++PostgreSQL configure 10beta2 (Postgres-XL 10alpha1)
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
- It was created by PostgreSQL $as_me 10beta1 (Postgres-XL 10alpha1), which was
-It was created by PostgreSQL $as_me 10beta2, which was
++It was created by PostgreSQL $as_me 10beta2 (Postgres-XL 10alpha1), which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
- This file was extended by PostgreSQL $as_me 10beta1 (Postgres-XL 10alpha1), which was
-This file was extended by PostgreSQL $as_me 10beta2, which was
++This file was extended by PostgreSQL $as_me 10beta2 (Postgres-XL 10alpha1), which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
- PostgreSQL config.status 10beta1 (Postgres-XL 10alpha1)
-PostgreSQL config.status 10beta2
++PostgreSQL config.status 10beta2 (Postgres-XL 10alpha1)
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
dnl
m4_pattern_forbid(^PGAC_)dnl to catch undefined macros
- AC_INIT([PostgreSQL], [10beta1 (Postgres-XL 10alpha1)], [bugs@postgres-xl.org])
-AC_INIT([PostgreSQL], [10beta2], [pgsql-bugs@postgresql.org])
++AC_INIT([PostgreSQL], [10beta2 (Postgres-XL 10alpha1)], [bugs@postgres-xl.org])
m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.69], [], [m4_fatal([Autoconf version 2.69 is required.
Untested combinations of 'autoconf' and PostgreSQL versions are not
Operating System (example: Linux 2.4.18) :
- PostgreSQL version (example: PostgreSQL 10beta1): Postgres-XL 10alpha1
- PostgreSQL version (example: PostgreSQL 10beta2): PostgreSQL 10beta2
++ PostgreSQL version (example: PostgreSQL 10beta2): Postgres-XL 10alpha1
Compiler used (example: gcc 3.3.5) :
cstate->num_partitions = num_partitions;
cstate->partition_tupconv_maps = partition_tupconv_maps;
cstate->partition_tuple_slot = partition_tuple_slot;
+
+ /*
+ * If we are capturing transition tuples, they may need to be
+ * converted from partition format back to partitioned table
+ * format (this is only ever necessary if a BEFORE trigger
+ * modifies the tuple).
+ */
+ if (cstate->transition_capture != NULL)
+ {
+ int i;
+
+ cstate->transition_tupconv_maps = (TupleConversionMap **)
+ palloc0(sizeof(TupleConversionMap *) *
+ cstate->num_partitions);
+ for (i = 0; i < cstate->num_partitions; ++i)
+ {
+ cstate->transition_tupconv_maps[i] =
+ convert_tuples_by_name(RelationGetDescr(cstate->partitions[i].ri_RelationDesc),
+ RelationGetDescr(rel),
+ gettext_noop("could not convert row type"));
+ }
+ }
}
+#ifdef PGXC
+ /* Get copy statement and execution node information */
+ if (IS_PGXC_COORDINATOR)
+ {
+ RemoteCopyData *remoteCopyState = (RemoteCopyData *) palloc0(sizeof(RemoteCopyData));
+ List *attnums = CopyGetAttnums(tupDesc, cstate->rel, attnamelist);
+
+ /* Setup correct COPY FROM/TO flag */
+ remoteCopyState->is_from = is_from;
+
+ /* Get execution node list */
+ RemoteCopy_GetRelationLoc(remoteCopyState,
+ cstate->rel,
+ attnums);
+ /* Build remote query */
+ RemoteCopy_BuildStatement(remoteCopyState,
+ cstate->rel,
+ GetRemoteCopyOptions(cstate),
+ attnamelist,
+ attnums);
+
+ /* Then assign built structure */
+ cstate->remoteCopyState = remoteCopyState;
+ }
+#endif
}
else
{
static void AfterTriggerSaveEvent(EState *estate, ResultRelInfo *relinfo,
int event, bool row_trigger,
HeapTuple oldtup, HeapTuple newtup,
- List *recheckIndexes, Bitmapset *modifiedCols);
+ List *recheckIndexes, Bitmapset *modifiedCols,
+ TransitionCaptureState *transition_capture);
static void AfterTriggerEnlargeQueryState(void);
+#ifdef XCP
+bool enable_datanode_row_triggers;
+#endif
/*
* Create a trigger. Returns the address of the created trigger.
#include "nodes/extensible.h"
#include "nodes/plannodes.h"
#include "nodes/relation.h"
+#ifdef XCP
+#include "fmgr.h"
+#include "miscadmin.h"
+#include "catalog/namespace.h"
+#include "pgxc/execRemote.h"
+#include "utils/lsyscache.h"
+#endif
#include "utils/datum.h"
+#ifdef PGXC
+#include "pgxc/planner.h"
+#endif
+
+#ifdef XCP
+/*
+ * When we sending query plans between nodes we need to send OIDs of various
+ * objects - relations, data types, functions, etc.
+ * On different nodes OIDs of these objects may differ, so we need to send an
+ * identifier, depending on object type, allowing to lookup OID on target node.
+ * On the other hand we want to save space when storing rules, or in other cases
+ * when we need to encode and decode nodes on the same node.
+ * For now default format is not portable, as it is in original Postgres code.
+ * Later we may want to add extra parameter in nodeToString() function
+ */
+static bool portable_output = false;
+void
+set_portable_output(bool value)
+{
+ portable_output = value;
+}
+#endif
#include "utils/rel.h"
+ static void outChar(StringInfo str, char c);
+
/*
* Macros to simplify output of different kinds of fields. Use these
#include "utils/datetime.h"
#include "utils/dynamic_loader.h"
#include "utils/memutils.h"
+ #include "utils/pidfile.h"
#include "utils/ps_status.h"
+#ifdef PGXC
+#include "utils/resowner.h"
+#endif
#include "utils/timeout.h"
#include "utils/varlena.h"
* WalSender has checked our LSN and has removed us from queue. Clean up
* state and leave. It's OK to reset these shared memory fields without
* holding SyncRepLock, because any walsenders will ignore us anyway when
- * we're not on the queue.
+ * we're not on the queue. We need a read barrier to make sure we see
+ * the changes to the queue link (this might be unnecessary without
+ * assertions, but better safe than sorry).
*/
+ pg_read_barrier();
+#ifdef NOT_USED
+ /*
+ * We are hitting this Assert too often in our tests. This is a PG bug and
+ * has been reported to the list. But turn this off until it gets fixed in
+ * the upstream branch
+ */
Assert(SHMQueueIsDetached(&(MyProc->syncRepLinks)));
+#endif
MyProc->syncRepState = SYNC_REP_NOT_WAITING;
MyProc->waitLSN = 0;
#include "utils/builtins.h"
#include "utils/guc.h"
#include "utils/memutils.h"
+#ifdef XCP
+#include "utils/snapmgr.h"
+#endif
+ #include "utils/pidfile.h"
#include "utils/syscache.h"
+#include "utils/lsyscache.h"
#include "utils/varlena.h"
else
COMPLETE_WITH_FUNCTION_ARG(prev2_wd);
}
+
+ /* ALTER NODE */
+ else if (Matches2("ALTER", "NODE"))
+ COMPLETE_WITH_QUERY(Query_for_list_of_available_nodenames);
+ else if (Matches2("ALTER", "NODE"))
+ COMPLETE_WITH_CONST("WITH");
+ else if (Matches3("ALTER", "NODE", "WITH"))
+ COMPLETE_WITH_CONST("(");
+ else if (Matches3("ALTER", "NODE", "WITH"))
+
+ COMPLETE_WITH_LIST5("TYPE", "HOST", "PORT", "PRIMARY", "PREFERRED");
+
/* ALTER PUBLICATION <name> */
else if (Matches3("ALTER", "PUBLICATION", MatchAny))
- {
COMPLETE_WITH_LIST5("ADD TABLE", "DROP TABLE", "OWNER TO", "RENAME TO", "SET");
- }
/* ALTER PUBLICATION <name> SET */
else if (Matches4("ALTER", "PUBLICATION", MatchAny, "SET"))
- {
COMPLETE_WITH_LIST2("(", "TABLE");
- }
/* ALTER PUBLICATION <name> SET ( */
else if (HeadMatches3("ALTER", "PUBLICATION", MatchAny) && TailMatches2("SET", "("))
- {
COMPLETE_WITH_CONST("publish");
- }
/* ALTER SUBSCRIPTION <name> */
else if (Matches3("ALTER", "SUBSCRIPTION", MatchAny))
- {
COMPLETE_WITH_LIST7("CONNECTION", "ENABLE", "DISABLE", "OWNER TO",
"RENAME TO", "REFRESH PUBLICATION", "SET");
- }
/* ALTER SUBSCRIPTION <name> REFRESH PUBLICATION */
else if (HeadMatches3("ALTER", "SUBSCRIPTION", MatchAny) &&
TailMatches2("REFRESH", "PUBLICATION"))
extern char *shared_preload_libraries_string;
extern char *local_preload_libraries_string;
- /*
- * As of 9.1, the contents of the data-directory lock file are:
- *
- * line #
- * 1 postmaster PID (or negative of a standalone backend's PID)
- * 2 data directory path
- * 3 postmaster start timestamp (time_t representation)
- * 4 port number
- * 5 first Unix socket directory path (empty if none)
- * 6 first listen_address (IP address or "*"; empty if no TCP port)
- * 7 shared memory key (not present on Windows)
- *
- * Lines 6 and up are added via AddToDataDirLockFile() after initial file
- * creation.
- *
- * The socket lock file, if used, has the same contents as lines 1-5.
- */
- #define LOCK_FILE_LINE_PID 1
- #define LOCK_FILE_LINE_DATA_DIR 2
- #define LOCK_FILE_LINE_START_TIME 3
- #define LOCK_FILE_LINE_PORT 4
- #define LOCK_FILE_LINE_SOCKET_DIR 5
- #define LOCK_FILE_LINE_LISTEN_ADDR 6
- #define LOCK_FILE_LINE_SHMEM_KEY 7
-
extern void CreateDataDirLockFile(bool amPostmaster);
+extern void ForgetLockFiles(void);
extern void CreateSocketLockFile(const char *socketfile, bool amPostmaster,
const char *socketDir);
extern void TouchSocketLockFiles(void);
#define MEMSET_LOOP_LIMIT 1024
/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT "pgsql-bugs@postgresql.org"
+#define PACKAGE_BUGREPORT "postgres-xl-bugs@lists.sourceforge.net"
/* Define to the full name of this package. */
-#define PACKAGE_NAME "PostgreSQL"
+#define PACKAGE_NAME "Postgres-XL"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "PostgreSQL 10beta2"
+#define PACKAGE_STRING "Postgres-XL 10alpha1"
/* Define to the version of this package. */
- #define PACKAGE_VERSION "10beta1"
+ #define PACKAGE_VERSION "10beta2"
/* Define to the name of a signed 128-bit integer type. */
#undef PG_INT128_TYPE
INSERT INTO domarrtest values (NULL, '{{"a","b","c"},{"d","e","f"}}');
INSERT INTO domarrtest values (NULL, '{{"toolong","b","c"},{"d","e","f"}}');
ERROR: value too long for type character varying(4)
-select * from domarrtest;
+ INSERT INTO domarrtest (testint4arr[1], testint4arr[3]) values (11,22);
+select * from domarrtest order by 1, 2;
testint4arr | testchar4arr
---------------+---------------------
{2,2} | {{a,b},{c,d}}
- {{2,2},{2,2}} | {{a,b}}
{2,2} | {{a,b},{c,d},{e,f}}
{2,2} | {{a},{c}}
+ {{2,2},{2,2}} | {{a,b}}
| {{a,b,c},{d,e,f}}
- (5 rows)
+ {11,NULL,22} |
+ (6 rows)
-select testint4arr[1], testchar4arr[2:2] from domarrtest;
+select testint4arr[1], testchar4arr[2:2] from domarrtest order by 1, 2;
testint4arr | testchar4arr
-------------+--------------
+ 2 | {{c}}
2 | {{c,d}}
- | {}
2 | {{c,d}}
- 2 | {{c}}
+ | {}
| {{d,e,f}}
- (5 rows)
+ 11 |
+ (6 rows)
-select array_dims(testint4arr), array_dims(testchar4arr) from domarrtest;
+select array_dims(testint4arr), array_dims(testchar4arr) from domarrtest order by 1, 2;
array_dims | array_dims
------------+------------
+ [1:2] | [1:2][1:1]
[1:2] | [1:2][1:2]
- [1:2][1:2] | [1:1][1:2]
[1:2] | [1:3][1:2]
- [1:2] | [1:2][1:1]
+ [1:2][1:2] | [1:1][1:2]
| [1:2][1:3]
- (5 rows)
+ [1:3] |
+ (6 rows)
COPY domarrtest FROM stdin;
COPY domarrtest FROM stdin; -- fail
testint4arr | testchar4arr
---------------+---------------------
{2,2} | {{a,b},{c,d}}
- {{2,2},{2,2}} | {{a,b}}
{2,2} | {{a,b},{c,d},{e,f}}
{2,2} | {{a},{c}}
- | {{a,b,c},{d,e,f}}
- {11,NULL,22} |
+ {{2,2},{2,2}} | {{a,b}}
{3,4} | {q,w,e}
++ {11,NULL,22} |
+ | {{a,b,c},{d,e,f}}
|
- (7 rows)
+ (8 rows)
+
+ update domarrtest set
+ testint4arr[1] = testint4arr[1] + 1,
+ testint4arr[3] = testint4arr[3] - 1
+ where testchar4arr is null;
+ select * from domarrtest where testchar4arr is null;
+ testint4arr | testchar4arr
+ ------------------+--------------
+ {12,NULL,21} |
+ {NULL,NULL,NULL} |
+ (2 rows)
drop table domarrtest;
drop domain domainint4arr restrict;
INSERT INTO domarrtest values ('{2,2}', '{{"a"},{"c"}}');
INSERT INTO domarrtest values (NULL, '{{"a","b","c"},{"d","e","f"}}');
INSERT INTO domarrtest values (NULL, '{{"toolong","b","c"},{"d","e","f"}}');
-select * from domarrtest;
-select testint4arr[1], testchar4arr[2:2] from domarrtest;
-select array_dims(testint4arr), array_dims(testchar4arr) from domarrtest;
+ INSERT INTO domarrtest (testint4arr[1], testint4arr[3]) values (11,22);
+select * from domarrtest order by 1, 2;
+select testint4arr[1], testchar4arr[2:2] from domarrtest order by 1, 2;
+select array_dims(testint4arr), array_dims(testchar4arr) from domarrtest order by 1, 2;
COPY domarrtest FROM stdin;
{3,4} {q,w,e}
{3,4} {qwerty,w,e}
\.
-select * from domarrtest;
+select * from domarrtest order by 1, 2;
+ update domarrtest set
+ testint4arr[1] = testint4arr[1] + 1,
+ testint4arr[3] = testint4arr[3] - 1
+ where testchar4arr is null;
+
+ select * from domarrtest where testchar4arr is null;
+
drop table domarrtest;
drop domain domainint4arr restrict;
drop domain domainchar4arr restrict;