How can I run OrientDB without Snappy? - orientdb

We are using OrientDB in its embedded Java mode (not as a separate server process), and would like to avoid having Snappy executed from /tmp (for security reasons).
My understanding is that Snappy is for compression. I have found a couple references to disabling compression in the XML config file for an OrientDB server, but that doesn't apply to us. Glancing through the source code, it looked like there might be an ALTER command that might change the compression setting, but a) I couldn't see what that command would be, and b) running it at that point might be too late, as snappy might already have been loaded.
The other option would be if we could just install the snappy.so library permanently on the server, and have OrientDB use that copy. I suspect that's not possible, but figured I would mention it in case it is.
We are using OrientDB 1.7.4.

Start the JVM with this option:
-Dstorage.compressionMethod=nothing
The important is to create the database with such mode. Before 2.0 (still in snapshot status now) you have to create and use the database with such setting.

Related

An early versioned migration is no longer valid SQL in an upgraded version of Postgres

In testing an upgrade to our Postgres database, we've discovered that one of our oldest versioned migration files is no longer valid SQL. This isn't an issue for the production database which (of course) has those migrations already in the schema_history_table, but standing up any new sandboxes is now made impossible by this broken V file.
What's the best way to bring an old V file into the modern world without forever orphaning our production database?
Of the top of my head I can think of a few possible options.
Configure postgres to enable previous version compatibility. I'm no expert at this, but I think there are some options here.
Just modify the historic migration scripts to they now work with the new version. This will mean that you can't stand up old versions any longer, but does this matter to you? I think that you'll need to run flyway repair after you do this, as Flyway will detect that the files have been tampered with.
Create a parallel set of scripts, one for each version, putting them in different folders. Then use the flyway.locations option to specify different folders depending on the version of the target.

Firebird minimum server installation

I have installed Firebird server from the zip kit using instsvc.exe. The work's done well with the inno setup Exec function.
instsvc install -auto -name 'FireBird2_5'
My question is what are the minimum files necessary to install Firebird server.
The installer is too slow due to unnecessary files, I found this link and I'm looking for something similar.
The total size of Firebird 2.5.8 is 230 files and +/- 30MB unzipped, I doubt this would really be a problem, but if you really want to minimize things, you can remove the following.
Using Firebird-2.5.8.27089-0_x64.zip as the basis, you can get rid of the following files or folders because they are just examples and documentation, or files for specific purposes (if you know you need them, don't delete them):
doc
examples
help
include
lib
misc
system32
udf (most have been replaced by built-in functions anyway)
Readme.txt
In theory you can remove the intl folder, but that will severely limit character set support in Firebird which can cause a lot of problems, so I'd advise against that.
If I'm not mistaken it should also be possible to remove plugin\fbtrace.dll and fbtrace.conf, but you may want to double check that.
From the bin folder, you can get rid of the following files:
fbguard.exe (make sure you don't enable use of Firebird Guardian using instsvc)
gdef.exe (tool for deprecated GDL DDL language)
gpre.exe (preprocessor for compiling embedded SQL, unlikely you need this)
gsplit.exe (tool for splitting backup files)
install_classic.bat
install_super.bat
install_superclassic.bat
qli.exe (tool for a deprecated query language)
uninstall.bat
If you don't need the administrative tools (but this might not be a good idea because management, and fixing or diagnosing database problems gets harder), you can also remove from bin:
fb_lock_print.exe
fbsvmgr.exe
fbtracemgr.exe
gbak.exe
gfix.exe
gsec.exe
gstat.exe
isql.exe
nbackup.exe
In theory you could also get rid of fb_inet_server.exe or fbserver.exe, depending on whether you use Classic, SuperServer or SuperClassic. Classic and SuperClassic use fb_inet_server.exe and SuperServer fbserver.exe; you can delete the other.
The other files are either technically necessary or legally necessary (the license notices).

postgres attaching a process

How do we attach a sql query such as join query to an existing gdb process in eclipse? Whenever I try to fork the given process using debug configurations in eclipse, which is a shared library , I am getting the following error:
No source available for "__kernel_vsyscall() at 0xb729c424"
Also, whenever I set break points in a specific program in eclipse, control goes to main.c and finally the process never comes back to the actual program.
Is there any way that the process be constrained only to my specific program?
how do we attach a sql query such as join query to an existing gdb process in eclipse
Um, what?
Are you attempting to debug a PostgreSQL server backend? If so, see the PostgreSQL wiki page that provides lots of details on the topic.
Whenever I try to fork the given process using debug configurations in eclipse, which is a shared library
What is a shared library? Eclipse isn't. PostgreSQL isn't. So what's the shared library here?
Are you trying to debug a PostgreSQL extension? If so, see the above link for details on attaching to a PostgreSQL server backend.
No source available for "__kernel_vsyscall() at 0xb729c424"
That's normal. It's just telling you that there's no source code on record for the __kernel_vsyscall call that's the entrypoint into syscalls in linux-gate.so via glibc when using sysenter.
The stack below it should be more informative. Get a backtrace, then look at the lower stack frames.
See:
What is __kernel_vsyscall?
Having trouble finding the method __kernel_vsyscall within the Linux kernel
http://www.trilithium.com/johan/2005/08/linux-gate/
Your "also" is really a separate question, and it's pretty hard to answer it usefully with the total lack of information provided. Try posting a new, more detailed question on just that topic. Specify how you compiled the program, set it up for debugging, how you're running it, where you're trying to set breakpoints, etc.

Eclipse plugin for psql/PostgreSQL code?

Do you have recommendations for a good PostgreSQL editor plugin for Eclipse?
The PostgreSQL code I have isn't very complex. However I'd like to edit it with syntax-coloring, decent auto-identation, code completion, etc., and it would be sweet to be able to send blocks or entire files to a jdbc connection and get the results. Up until now, I have edited my .sql files with Emacs, and try things by copying/pasting segments into a psql terminal I have next to Emacs. Some of my code uses the psql primitives such as \set var value etc. For example:
\set t mytable
drop table if exists :t;
create table :t (...);
However I would be happy to eliminate this and refactor the code to be proper PL/pgSQL functions. Or perhaps better, implement the dependency and procedural logic in Java and issue the sql queries via JDBC. I still need to edit the sql files and try bits and pieces of them during development.
I tried the "official" Data Tools Platform (http://eclipse.org/datatools/) and configured it to use my localhost:5432 (which in fact is a port-forward via SSH to the actual PostgreSQL server that I'm using). However, connecting to the DB hangs for several minutes (Eclipse doesn't even refresh the screen). In general it feels quite heavy/slow
and I'm always afraid of if hanging without ability to interrupt it (it happened a few times and the only solution is to kill Eclipse; as you probably know, killing Eclipse isn't good as it's very hard/impossible to recover unsaved files).
The other plugin I tried is Toby's PL/SQL editor (https://sourceforge.net/projects/plsqleditor/), which seems very nice and promising, except the last signs of life on the sourceforge forums appear to be around 2007. Also I couldn't configure it to use the postgresql-9.0-801.jdbc4.jar that I have, and so I am unable to connect to my DB.
Any suggestions gladly appreciated.
A free Eclipse plugin for Oracle and PostgreSQL can be found at http://www.toadworld.com/products/toad-extension-for-eclipse/default.aspx
The plugin is in development.

How do I change the NAMEDATALEN configuration after installing PostgreSQL 9.0?

I'm supporting some legacy PostgreSQL 8.3/4 databases, and migrating them onto some newer Windows Server 2008 hardware.
I've been informed that the NAMEDATALEN figure needs to be higher than the default.
As far as I understand, the NAMEDATALEN configuration does not exist in a config file, but rather needs to be set on compiling the application.
Having already installed PostgreSQL 9.0 on the new box, I'm wondering if it's possible to alter this configuration after the fact?
It's not possible to alter this option - it needs to be changed in source file src/include/pg_config_manual.h. Then Postgres needs to be recompiled, data directory initialized with initdb and data restored. Every security and bugfix minor release will then have to be patched and recompiled. This is bad thing to do.
This is much easier and sensible to patch an application source to use shorter table/function/etc names. The maximum is 63 characters, which is enough for insanely_stupid_and_totally_impractical_table_or_function_name0
Maybe your schema really does not need longer names, and this requirement it is just an artifact from long gone version of your client application. Check this - try to import a schema and functions to new database.
And this question should probably be migrated to serverfault.com.