i have one simply question: citus 11 support the HA?
This is the structure that i have implemented with 7 node ( replication with pg_autofailover):
The problem occurs when i disable a worker1_primary and i try to make an sql insert in the coordinator_primary: the response of citus is: connection with remote worker1_primary refused.
The citus nodes table is this one ( from select * from pg_dist_node ):
thanks in advance for any reply
Related
I was able to implement a connection from R through RMariaDB and DBI to a remote MariaDB-database. However, I am currently encountering a strange change of numbers when querying the database through R. I'll explain the differences:
I inserted one simple entry in my database with the following command:
INSERT INTO respondent ( id, name ) VALUES ( 2388793051, 'testuser' )
When I connect to this database directly on the remote server and execute a statement like this:
SELECT * FROM respondent;
it delivers these value
id: 2388793051, name: testuser
So I should also be able to connect to the database via R and receive the same results. So when I execute the following code in R, I expect to receive this inserted and saved information displayed above:
library(DBI)
library(RMariaDB)
conn <- DBI::dbConnect(drv=RMariaDB::MariaDB(), user="myusername", password="mypassword", host="127.0.0.1", port="1111", dbname="mydbname")
res <- dbGetQuery(conn, "SELECT * FROM respondent")
print(res)
However, the result of this query is the following
id name
-1906174245 testuser
As you can see, the id is now -1906174245 instead of the saved 2388793051 in the database. I don't understand this weird conversion of integers in the id-field. Can someone explain how this problem emerges and how I might solve it?
EDIT: I don't expect this to be a problem, but just to inform you: I am using an SSH tunnel to enable a connection via these specified ports from my local to my remote machine.
SOLUTION: What made the difference was to specify the id of a respondent in the database specification already as BIGINT instead of INT. Thanks to #JonnyCrunch
I'm defined the following view:
CREATE VIEW db_a1.qry_result AS
SELECT * FROM
(SELECT * FROM db_a1.tbl_result
UNION ALL
SELECT * FROM db_a1.tbl_result_archive) a;
If I run
SELECT * FROM db_a1.qry_result
WHERE customer = 2;
then the view run through without any error and the results are correct.
However, If a select the view object (via TOAD for MySQL) or try to connect via ODBC (ODBC Connector 5.3.8 for 32 and 64bit) I retrive the error "No Database selected". Selection via ODBC are not possible.
Any idea?
Thank you very much for your help in advance
Best regards
Andreas
I kept all logs from visitors with mySQL. Where it from URL and which URL visit. I found this one.
myweb.com/read.php?id=2349 and(SeLeCt 1 FrOm(SeLeCt count(*),CoNcAt((SeLeCt(SeLeCt UnHeX(HeX(CoNcAt(char(33,126,33),0x4142433134355a5136324457514146504f4959434644,char(33,126,33))))) FrOm information_schema.TaBlEs LiMiT 0,1),floor(rand(0)*2))x FrOm information_schema.TaBlEs GrOuP By x)a) and 1=1&aid=3&bid=18
What does it means ? and What is it doing with my website ?
A simple SQL-Injection attempt. Do the following things:
check your webserver and application configuration if you are vulnarable to this kind of attempt. (e.g. your application parses the SQL and it is executed using your database, that would be bad)
Fix your configuration
Check if this attempt caused any harm.
At least the attacker now knows, that you own this system, because you published this very specific value here.
SeLeCt
UnHeX(
HeX(
CoNcAt(
char(33,126,33)
,0x414...4644
,char(33,126,33)
)
)
);
Will return something like
!~!ABC145...!~!
Is this in the combination with the rest of the statement an issue on your database?
I have two similar database with the same schema.But one is for printing purpose.
My window form application needs to read data from dby on server1 to dby on server2.The servers are on different network but can communicate. Am trying to use subquery this is
query:
Using main_db
Insert into socio_bio
select * from socio_bio where receiptno in (
)
You can use this stored procedure: sp_addlinkedserver()
exec sp_addlinkedserver #server = 'yourServerName'
select * from [server].[database].[schema].[table]
and in your example
select * from [yourServerName].[testdb].[dbo].[table]
The following is generated query from Hibernate (except I replaced the list of fields with *):
select *
from
resource resource0_,
resourceOrganization resourceor1_
where
resource0_.active=1
and resource0_.published=1
and (
resource0_.resourcePublic=1
or resourceor1_.resource_id=resource0_.id
and resourceor1_.organization_id=2
and (
resourceor1_.resource_id=resource0_.id
and resourceor1_.forever=1
or resourceor1_.resource_id=resource0_.id
and (
current_date between resourceor1_.startDate and resourceor1_.endDate
)
)
)
Currently I have 200+ records in both the Windows and Linux databases and currently for each record, the following happens to be true:
active = 1
published = 1
resourcePublic = 1
When I run this directly in a SQL client, this SQL query gets me all the matching records on Windows but none on Linux. I've MySQL 5.1 on both Windows and Linux.
If I apply the Boolean logic, (true and true and (true or whatever)), I expect the outcome to be true. It indeed is true on Windows but false on Linux!!!
If I modify the query as the following, it works on both Windows and Linux:
select *
from
resource resource0_
where
resource0_.active=1
and resource0_.published=1
and (
resource0_.resourcePublic=1
)
So, just the presence of conditions related to resourceOrganization is making the query bring 0 results on Linux and I expected that since it is the second part of an 'or' condition whose first part is true, the outcome should be true.
Any idea why this difference in behavior between the 2 OSs and why what should obviously work on Linux doesn't!
Thanks in advance!
Check the case sensitivity and collation sets (Collation issues)
Check the table case sensitivity. In particular note that on windows the table names are case-insensitive and on Linux they are case-sensitive.
Have you tried a simple test case on both system?
Check that current_date() returns the same format in both plataforms
I notice that the second test query only consults the resource table not the resourceOrganisation table.
I suspect that the table resourceOrganisation is populated differently on the two machines, and the corresponding rows may not exist in your Linux MySQL.
What does this query return?
select *
from
resource resource0_,
resourceOrganization resourceor1_
where
resource0_.active=1
and resource0_.published=1
and (
resource0_.resourcePublic=1
or resourceor1_.resource_id=resource0_.id
and resourceor1_.organization_id=2
)
Also don't forget to check the collation and case sensitivity, if one server uses a different collation to the other then you will have this same issue.