[Postgres-xl-general] Not able to run pgxc_ctl

Ramanuj Hari hari.ramanuj at gmail.com
Tue Sep 16 16:55:29 PDT 2014


Hi,

Just wondering if Postgresql-XL is supported on FreeBSD system. Have anyone
tried that.

I am trying to test  1 GTM, 1 coordinator, 1 datanode on the same vm.

Appreciate any pointer. Read though all the mails on general/bugs mailing
list, didn't find any reference to FreeBSD.

Manual deployment also fails with following error message:
---
postgres=# create table test1(id integer,name varchar(20));
ERROR:  Could not begin transaction on Datanodes
postgres=#
---

I have followed below steps:
pw user add -m -n pgxl
chown -R pgxl /var/tmp/research/pgxl
su - pgxl
cd /var/tmp/research/pgxl
alias lib='export LD_LIBRARY_PATH=lib/'
lib
mkdir gtm
mkdir coord
mkdir datanode
./bin/initdb -D /var/tmp/research/pgxl/coord -E UTF8 --locale=C -U postgres
-W --nodename coord1
./bin/initdb -D /var/tmp/research/pgxl/datanode -E UTF8 --locale=C -U
postgres -W --nodename dn1

./bin/initgtm -D /var/tmp/research/pgxl/gtm -Z gtm

---start gtm ---
cd gtm
vi gtm.conf
---
nodename = 'gtm1' # Specifies the node name.
  port = 14921 # Port number of this GTM.
  startup = ACT # Start mode. ACT / STANDBY.
  log_file = 'gtm.log' # Log file name
  log_min_messages = DEBUG
---

Below command for starting GTM doesn't work
./bin/gtm_ctl -Z gtm -D /var/tmp/research/pgxl/gtm -l
/var/tmp/research/pgxl/gtm/gtm.log start
So tried alternate way to start GTM, seems worked:
nohup ./bin/gtm -D /var/tmp/research/pgxl/gtm &
------
---configure and start datanode ----
cd datanode
vi pg_hba.conf
host    all             all             10.102.103.0/24            trust

vi postgresql.conf
---
listen_addresses = '*'          # what IP address(es) to listen on;
port = 12921
log_directory = 'pg_log'
log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'
log_line_prefix = '<%r%u%p%t%d%%'
log_statement = 'all'
pooler_port = 16921
gtm_host = 'localhost'
gtm_port = 14921
---
./bin/pg_ctl -Z datanode -D /var/tmp/research/pgxl/datanode -l
/var/tmp/research/pgxl/datanode/pg_log start

---- configure and start coordinator -----
cd coord
vi pg_hba.conf
host    all             all             10.102.103.0/24            trust

vi postgresql.conf
---
listen_addresses = '*'
port = 11921
log_directory = 'pg_log'
log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'
log_line_prefix = '<%r%u%p%t%d%%'
log_statement = 'all'
pooler_port = 15921
gtm_host = 'localhost'
gtm_port = 14921
---

./bin/pg_ctl -Z coordinator -D /var/tmp/research/pgxl/coord -l
/var/tmp/research/pgxl/coord/pg_log start

---Configuring Cluster---
$ netstat -a
Active Internet connections (including servers)
Proto Recv-Q Send-Q Local Address          Foreign Address        (state)
tcp4       0      0 10.102.103.83.38796    10.102.103.83.14921    TIME_WAIT
tcp4       0      0 10.102.103.83.46325    10.102.103.83.14921    TIME_WAIT
tcp4       0      0 *.11921                *.*                    LISTEN
tcp6       0      0 *.11921                *.*                    LISTEN
tcp4       0      0 *.12921                *.*                    LISTEN
tcp6       0      0 *.12921                *.*                    LISTEN
tcp4       0      0 *.14921                *.*                    LISTEN
tcp6       0      0 *.14921                *.*                    LISTEN
tcp4       0      0 10.102.103.83.ssh      10.150.16.22.26491
ESTABLISHED
tcp4       0      0 10.102.103.83.ssh      10.150.16.22.31450
ESTABLISHED
tcp4       0      0 localhost.smtp         *.*                    LISTEN
tcp4       0      0 *.ssh                  *.*                    LISTEN
tcp6       0      0 *.ssh                  *.*                    LISTEN
udp4       0      0 localhost.37966        localhost.37966
udp4       0      0 localhost.50339        localhost.50339
udp4       0      0 *.syslog               *.*
udp6       0      0 *.syslog               *.*
Active UNIX domain sockets
Address  Type   Recv-Q Send-Q    Inode     Conn     Refs  Nextref Addr
ffffff0002ba9a50 stream      0      0 ffffff002a57f3b0        0        0
     0 /tmp/.s.PGPOOL.15921
ffffff0002ba9d20 stream      0      0 ffffff002a710938        0        0
     0 /tmp/.s.PGSQL.11921
ffffff0002ba90f0 stream      0      0 ffffff002a70f588        0        0
     0 /tmp/.s.PGPOOL.16921
ffffff0002ba9870 stream      0      0 ffffff001fe38760        0        0
     0 /tmp/.s.PGSQL.12921
ffffff0002ba9780 stream      0      0 ffffff0002ce8000        0        0
     0 /var/run/devd.pipe
ffffff0002baac30 dgram       0      0        0 ffffff0002baae10        0
     0
ffffff0002baad20 dgram       0      0        0 ffffff0002ba93c0        0
     0
ffffff0002ba93c0 dgram       0      0 ffffff0002d19938        0
ffffff0002baad20        0 /var/run/logpriv
ffffff0002baae10 dgram       0      0 ffffff0002b69ce8        0
ffffff0002baac30        0 /var/run/log
$ ./bin/psql -h 127.0.0.1 -p 11921 -U postgres postgres
psql (PGXL 9.2.0, based on PG 9.2.4 (Postgres-XL 9.2.0))
Type "help" for help.

postgres=# \dtS pgxc*
             List of relations
   Schema   |    Name    | Type  |  Owner
------------+------------+-------+----------
 pg_catalog | pgxc_class | table | postgres
 pg_catalog | pgxc_group | table | postgres
 pg_catalog | pgxc_node  | table | postgres
(3 rows)

postgres=#
postgres=# alter node coord1 with (type=coordinator, host='10.102.103.83',
port=11921);
ALTER NODE
postgres=#
postgres=# create node dn1 with (type=datanode, host='10.102.103.83',
port=12921, primary=true);
CREATE NODE
postgres=# select * from pgxc_node;
 node_name | node_type | node_port |   node_host   | nodeis_primary |
nodeis_preferred |  node_id
-----------+-----------+-----------+---------------+----------------+------------------+------------
 coord1    | C         |     11921 | 10.102.103.83 | f              | f
           | 1885696643
 dn1       | D         |     12921 | 10.102.103.83 | t              | f
           | -560021589
(2 rows)

postgres=# SELECT pgxc_pool_reload();
 pgxc_pool_reload
------------------
 t
(1 row)

postgres=#

-- configuring datanode ---
$ ./bin/psql -h 127.0.0.1 -p 12921 -U postgres postgres
psql (PGXL 9.2.0, based on PG 9.2.4 (Postgres-XL 9.2.0))
Type "help" for help.

postgres=# select * from pgxc_node;
 node_name | node_type | node_port | node_host | nodeis_primary |
nodeis_preferred |  node_id
-----------+-----------+-----------+-----------+----------------+------------------+------------
 dn1       | C         |      5432 | localhost | f              | f
       | -560021589
(1 row)

postgres=# alter node dn1 with (type=datanode, host='10.102.103.83',
port=12921, primary=true);
ALTER NODE
postgres=#
postgres=# create node coord1 with (type=coordinator, host='10.102.103.83',
port=11921);
CREATE NODE
postgres=# select * from pgxc_node;
 node_name | node_type | node_port |   node_host   | nodeis_primary |
nodeis_preferred |  node_id
-----------+-----------+-----------+---------------+----------------+------------------+------------
 dn1       | D         |     12921 | 10.102.103.83 | t              | f
           | -560021589
 coord1    | C         |     11921 | 10.102.103.83 | f              | f
           | 1885696643
(2 rows)

postgres=# SELECT pgxc_pool_reload();
 pgxc_pool_reload
------------------
 t
(1 row)

postgres=# select * from pgxc_node;
 node_name | node_type | node_port |   node_host   | nodeis_primary |
nodeis_preferred |  node_id
-----------+-----------+-----------+---------------+----------------+------------------+------------
 dn1       | D         |     12921 | 10.102.103.83 | t              | f
           | -560021589
 coord1    | C         |     11921 | 10.102.103.83 | f              | f
           | 1885696643
(2 rows)

postgres=#

-- Now creating test table fails ---
$ ./bin/psql -h 127.0.0.1 -p 11921 -U postgres postgres
psql (PGXL 9.2.0, based on PG 9.2.4 (Postgres-XL 9.2.0))
Type "help" for help.

postgres=# create table test1(id integer,name varchar(20));
ERROR:  Could not begin transaction on Datanodes
postgres=# SELECT pgxc_pool_reload();
 pgxc_pool_reload
------------------
 t
(1 row)

postgres=# create table test1(id integer,name varchar(20));
ERROR:  Could not begin transaction on Datanodes
postgres=# \q
$

Thanks,
Ramanuj

On Tue, Sep 16, 2014 at 9:50 PM, Ramanuj Hari <hari.ramanuj at gmail.com>
wrote:

> Hi,
>
> I am evaluating Postgresql-XL for cluster solution in our product.
>
> I have installed pgxl at '/var/tmp/research/tmp_pgxl/pgxl/‘ location via
> “—prefix” option to configure command. (8.4-RELEASE FreeBSD)
> Had problem with compilation, after including "sys/wait.h” in
> ./src/gtm/gtm_ctl/gtm_ctl.c, and "sys/types.h” in contrib/pgxc_ctl/utils.h
> file compilation went fine.
>
> I am not able to run pgxc_ctl command, it gives core dump. Appreciate any
> help.
>
>
> ——Log—
> $ ./bin/pgxc_ctl prepare
> bash_handler.c:install_pgxc_ctl_bash(33) Installing pgxc_ctl_bash script
> as /home/pgxl/pgxc_ctl/pgxc_ctl_bash.
> bash_handler.c:install_pgxc_ctl_bash(33) Installing pgxc_ctl_bash script
> as /home/pgxl/pgxc_ctl/pgxc_ctl_bash.
> pgxc_ctl.c:read_configuration(250) Reading configuration using
> /home/pgxl/pgxc_ctl/pgxc_ctl_bash --home /home/pgxl/pgxc_ctl
> --configuration /home/pgxl/pgxc_ctl/pgxc_ctl.conf
> /home/pgxl/pgxc_ctl/pgxc_ctl_bash: not found
> pgxc_ctl.c:read_configuration(260) Finished to read configuration.
> config.c:check_configuration(1069) ERROR: GTM master configuration is
> missing. gtmName, gtmMasterServer, gtmMasterPort or gtmMasterDir
> config.c:check_configuration(1073) ERROR: Coordinator master configuration
> is missing. coordNames, coodPorts, poolerPorts, coordMasterPorts or
> coordMasterDirs
> config.c:check_configuration(1083) ERROR: Datanode master configuration is
> missing. datanodeNames, datanodePorts, datanodePoolerPorts,
> datanodeMasterPorts or datanodeMasterDirs
> config.c:reportMissingVar(517) ERROR: gtmName is not configured.
> config.c:reportMissingVar(517) ERROR: gtmMasterServer is not configured.
> config.c:reportMissingVar(517) ERROR: gtmMasterPort is not configured.
> config.c:reportMissingVar(517) ERROR: gtmMasterDir is not configured.
> config.c:reportMissingVar(517) ERROR: coordNames is not configured.
> config.c:reportMissingVar(517) ERROR: coordPorts is not configured.
> config.c:reportMissingVar(517) ERROR: poolerPorts is not configured.
> config.c:reportMissingVar(517) ERROR: coordMasterServers is not configured.
> config.c:reportMissingVar(517) ERROR: coordMasterDirs is not configured.
> config.c:reportMissingVar(517) ERROR: coordMaxWALSenders is not configured.
> config.c:reportMissingVar(517) ERROR: coordNames is not configured.
> config.c:reportMissingVar(517) ERROR: coordPorts is not configured.
> config.c:reportMissingVar(517) ERROR: poolerPorts is not configured.
> config.c:reportMissingVar(517) ERROR: coordMasterServers is not configured.
> config.c:reportMissingVar(517) ERROR: coordMasterDirs is not configured.
> config.c:reportMissingVar(517) ERROR: coordMaxWALSenders is not configured.
> config.c:reportMissingVar(517) ERROR: datanodeNames is not configured.
> config.c:reportMissingVar(517) ERROR: datanodePorts is not configured.
> config.c:reportMissingVar(517) ERROR: datanodePoolerPorts is not
> configured.
> config.c:reportMissingVar(517) ERROR: datanodeMasterServers is not
> configured.
> config.c:reportMissingVar(517) ERROR: datanodeMasterDirs is not configured.
> config.c:reportMissingVar(517) ERROR: datanodeMaxWALSenders is not
> configured.
> config.c:verifyResource(917) ERROR: Found fundamental configuration error.
> Segmentation fault
> $
> ——————
>
> —pgxc_ctl.conf file is ——
> $ cat /home/pgxl/pgxc_ctl/pgxc_ctl.conf
> pgxcOwner=pgxl
> pgxcUser=$pgxcOwner
> pgxcInstallDir=/var/tmp/research/pgxl
>
>
> gtmMasterDir=/var/tmp/research/pgxl/data/gtm_master
> gtmMasterServer=localhost
> gtmSlave=n
> gtmProxy=n
>
> coordMasterDir=/var/tmp/research/pgxl/data/coord_master
> coordNames=(coord1)
> coordPorts=(5432)
> poolerPorts=(20010)
> coordMasterServers=(localhost)
> coordMasterDirs=($coordMasterDir/coord1)
>
> coordMaxWALSenders=($coordMaxWALsernder)
> coordSlave=n
> coordSpecificExtraConfig=(none)
> coordSpecificExtraPgHba=(none)
>
> datanodeNames=(dn1 dn2)
> datanodeMasterDir=/var/tmp/research/pgxl/data/dn_master
> datanodePorts=(5433 5434)
> datanodePoolerPorts=(20011 20012)
> datanodeMasterServers=(localhost localhost)
> datanodeMasterDirs=($datanodeMasterDir/dn1 $datanodeMasterDir/dn2)
>
> datanodeMaxWALSenders=($datanodeMaxWalSender $datanodeMaxWalSender)
> datanodeSlave=n
> primaryDatanode=dn1
>
>
> $
> —————
>
>
>
> Thanks,
> Ramanuj
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.postgres-xl.org/private.cgi/postgres-xl-general-postgres-xl.org/attachments/20140917/88699891/attachment.htm>


More information about the postgres-xl-general mailing list