Re: Simple question from a beginner: Can I use PostgreSQL as a file database?

2021-05-25 Thread Poul Kristensen
https://Dataverse.org is used by The Royal Danish Library (I have made a
setup while employed there) - glassfish server with PostgreSQL as
databasebackend. A very detailed documentation of how to setup is available
too.
Works fine and is free. Be sure to follow recommendations from
dataverser.org.

/Poul

Den tir. 25. maj 2021 kl. 14.01 skrev Baum Kataster :

> Basically, you can store binary data by using blobs but that is not the
> best practice.
> A better approach would be to store your information in the database and
> to add a varchar column in which you store the folder and file name where
> the file is stored on your computer. Then you can retrieve it from there
> without bloating your database through excessive use of blobs.
> You can find many good tutorials on PostgreSQL here:
> https://www.postgresqltutorial.com/
>
> Am Di., 25. Mai 2021 um 13:49 Uhr schrieb Wen Yi :
>
>> Hi everyone!
>> I'm a middle student and new to join this mail list.
>> I just want to ask a simple question:
>> Can I use PostgreSQL as a file database?
>> (I plan to make a web system to store my class note with some personal
>> file)
>> Please give me some suggestions,thank you in advance!
>>
>

-- 
Med venlig hilsen / Best regards
Poul Kristensen
Linux-OS/Virtualizationexpert and Oracle DBA


Postgresql DB on virtual machine in Ceph cluster

2021-12-14 Thread Poul Kristensen
Hi

Does anyone have experience with PG in virtual machine running in Ceph
cluster?
I would very much like the opion from Magnus Hagander as the PG specialist
he is.

Thanks
Poul
-- 
Med venlig hilsen / Best regards
Poul Kristensen


Re: PostgreSQL Kerberos Authentication

2018-01-30 Thread Poul Kristensen
you need til tell Postgresql/pg_hba.conf  the AD kerberos server name ldap
= kerberos.domain.com   and suffix@domain.com

Then create the users(is in fact a role) as the owner of a database.
Hereafter the user could just write psql after login and after password
auhtentication the user/role is logged into the database.

It has been testet and works!

Hope it is usefull.

regards
Poul

2018-01-30 17:13 GMT+01:00 HIRTZ Jorge Alberto TENARIS :

> Hello All,
>
>
>
> I am trying to configure PostgreSQL9.6 (On Centos 7.4) with Kerberos
> (Active Directory) via GSSAPI authentication and I’m getting the following
> error:
>
>
>
> [postgres@hostname data]$ psql  -h hostname -U usern...@domain.com
> postgres
>
> psql: GSSAPI continuation error: Unspecified GSS failure.  Minor code may
> provide more information
>
> GSSAPI continuation error: Server not found in Kerberos database
>
>
>
> I did the following configuration:
>
>
>
> 1.- Create KeyTab in Active Directory:
>
> ktpass -out postgres_instance.keytab -princ postgres/hostnamename.domain.
> c...@domain.com -mapUser svcPostgres -pass  -crypto all -ptype
> KRB5_NT_PRINCIPAL
>
>
>
> 2.- Copy the keytab to Linux Server on $PGDATA and change the privileges
> to postgres:postgres
>
> 3.- Configure postgresql.conf
>
> krb_server_keyfile = '//data/postgres_instance.keytab
>
>
>
> 4.- Configure /etc/krb5.conf
>
>
>
> 5.- Request a ticket to the KDC server using kinit (this work OK!)
>
>
>
> [postgres@hostname ~]$ klist
>
> Ticket cache: KEYRING:persistent:26:krb_ccache_AO0Y1kx
>
> Default principal: usern...@domain.com
>
>
>
> Valid starting   Expires  Service principal
>
> 01/30/2018 11:01:59  01/30/2018 21:01:59  krbtgt/domain@domain.com
>
> renew until 02/06/2018 11:01:55
>
>
>
>
>
> 6.- Configure pg_hba.conf
>
> hostallall
> 0.0.0.0/0  gss include_realm=1
>
> 7.- Create user in PG to test:
>
> create user “usern...@domain.com” WITH SUPERUSER;
>
>
>
> 8.- Testing
>
> [postgres@hostname data]$ psql  -h hostname -U usern...@domain.com
> postgres
>
> psql: GSSAPI continuation error: Unspecified GSS failure.  Minor code may
> provide more information
>
> GSSAPI continuation error: Server not found in Kerberos database
>
>
>
> I tried generate the Keytab with “postgres” and “POSTGRES” user as a SPN
> but I get the same error.
>
>
>
> Any suggestion is welcome!
>
>
>
> Thanks in advance for your help!
>
>
>
> Jorge
>
>
>



-- 
Med venlig hilsen / Best regards
Poul Kristensen
Linux-OS/Virtualizationexpert and Oracle DBA