Clustering solution ?

2020-07-09 Thread Laurent FAILLIE
Hello,
I've been asked by one of my customer to know which are the possible clustering 
solution for PostgreSQL ?
Active/passive ?Active/active ?
if possible free or not too expensive.
Thanks
Laurent


Re: Clustering solution ?

2020-07-09 Thread Laurent FAILLIE
Mainly for HA and DR but it can help also for the future if a load balancing is 
possible. But it's not mandatory yet.

Thanks
Le jeudi 9 juillet 2020 à 17:30:35 UTC+2, Ron  a 
écrit :  
 
  For high availability, for load sharing or for disaster recovery?
 
 On 7/9/20 8:53 AM, Laurent FAILLIE wrote:
  
 
  Hello, 
  I've been asked by one of my customer to know which are the possible 
clustering solution for PostgreSQL ? 
  Active/passive ? Active/active ? 
  if possible free or not too expensive. 
  Thanks 
  Laurent

 -- 
 Angular momentum makes the world go 'round.   

Re: Clustering solution ?

2020-07-15 Thread Laurent FAILLIE
Hello all,
thanks all for your replies : I started to learn Patroni.Anyway, any 
alternative with my customer want's also LoadBalancing ?
Thanks
Laurent
 

Le jeudi 9 juillet 2020 à 17:47:23 UTC+2, Laurent FAILLIE 
 a écrit :  
 
 Mainly for HA and DR but it can help also for the future if a load balancing 
is possible. But it's not mandatory yet.

Thanks
Le jeudi 9 juillet 2020 à 17:30:35 UTC+2, Ron  a 
écrit :  
 
  For high availability, for load sharing or for disaster recovery?
 
 On 7/9/20 8:53 AM, Laurent FAILLIE wrote:
  
 
  Hello, 
  I've been asked by one of my customer to know which are the possible 
clustering solution for PostgreSQL ? 
  Active/passive ? Active/active ? 
  if possible free or not too expensive. 
  Thanks 
  Laurent

 -- 
 Angular momentum makes the world go 'round. 

pg_dump: ERROR: array size exceeds the maximum allowed (268435455)

2018-12-10 Thread Laurent FAILLIE
Hello,
I'm trying to save a database from a dying disk on a Gentoo/Linux box.
Unfortunately, when I'm issuing a
$ pg_dumpall --clean
I got 

pg_dump: [programme d'archivage (db)] échec de la requête : ERROR:  array size 
exceeds the maximum allowed (268435455)
pg_dump: [programme d'archivage (db)] la requête était : SELECT p.tableoid, 
p.oid, p.proname AS aggname, p.pronamespace AS aggnamespace, p.pronargs, 
p.proargtypes, (SELECT rolname FROM pg_catalog.pg_roles WHERE oid = p.proowner) 
AS rolname, (SELECT pg_catalog.array_agg(acl ORDER BY row_n) FROM (SELECT acl, 
row_n FROM 
pg_catalog.unnest(coalesce(p.proacl,pg_catalog.acldefault('f',p.proowner))) 
WITH ORDINALITY AS perm(acl,row_n) WHERE NOT EXISTS ( SELECT 1 FROM 
pg_catalog.unnest(coalesce(pip.initprivs,pg_catalog.acldefault('f',p.proowner)))
 AS init(init_acl) WHERE acl = init_acl)) as foo) AS aggacl, (SELECT 
pg_catalog.array_agg(acl ORDER BY row_n) FROM (SELECT acl, row_n FROM 
pg_catalog.unnest(coalesce(pip.initprivs,pg_catalog.acldefault('f',p.proowner)))
 WITH ORDINALITY AS initp(acl,row_n) WHERE NOT EXISTS ( SELECT 1 FROM 
pg_catalog.unnest(coalesce(p.proacl,pg_catalog.acldefault('f',p.proowner))) AS 
permp(orig_acl) WHERE acl = orig_acl)) as foo) AS raggacl, NULL AS initaggacl, 
NULL AS initraggacl FROM pg_proc p LEFT JOIN pg_init_privs pip ON (p.oid = 
pip.objoid AND pip.classoid = 'pg_proc'::regclass AND pip.objsubid = 0) WHERE 
p.proisagg AND (p.pronamespace != (SELECT oid FROM pg_namespace WHERE nspname = 
'pg_catalog') OR p.proacl IS DISTINCT FROM pip.initprivs)
pg_dumpall : échec de pg_dump sur la base de données « postgres », quitte

All references I found about this error is about user made request.Any clue to 
how I can correct this issue ? (as said, my disk is dying due to its controller 
failure so, obviously time is running :) ).This database contains my smart home 
figures so nothing critical and I have a "weeks old" backup.
This box is running 
pg_dump (PostgreSQL) 10.3 
but I was on way to upgrade to 10.6 when I discovered this issue.
Best regards,
Laurent


Looking for some help with HA / Log Log-Shipping

2021-03-31 Thread Laurent FAILLIE
Hello,
We are running Postgresql 12 and I'm trying to put in place streaming wal 
replication.

I followed officiale documentation ( 
https://www.postgresql.org/docs/12/warm-standby.html ) as well as this tutorial 
: 
https://scalegrid.io/blog/managing-high-availability-in-postgresql-part-1/  
  
What I did is :
* created the master db* create replication role* updated postgresql.conf* 
finally replicate everything on the salve node using pg_basebackup (with -R 
option)

But now I'm lost with §26.2.4 Setting up a standby server.
In which file I have to put the primary_conninfo and other options ?
Thanks
Laurent
ps: my goal is to install the PAF


Re: Looking for some help with HA / Log Log-Shipping

2021-03-31 Thread Laurent FAILLIE
Replying to myself :)
It seems pg_basebackup did all the tricks, even restarting the slave. And it is 
in standby mode.Do I have anything to do in addition ?
Thanks
 

Le mercredi 31 mars 2021 à 12:51:29 UTC+2, Laurent FAILLIE 
 a écrit :  
 
 Hello,
We are running Postgresql 12 and I'm trying to put in place streaming wal 
replication.

I followed officiale documentation ( 
https://www.postgresql.org/docs/12/warm-standby.html ) as well as this tutorial 
: 
https://scalegrid.io/blog/managing-high-availability-in-postgresql-part-1/  
  
What I did is :
* created the master db* create replication role* updated postgresql.conf* 
finally replicate everything on the salve node using pg_basebackup (with -R 
option)

But now I'm lost with §26.2.4 Setting up a standby server.
In which file I have to put the primary_conninfo and other options ?
Thanks
Laurent
ps: my goal is to install the PAF
  

Re: As a Linux distro, how to package multiple postgres major versions?

2021-11-25 Thread Laurent FAILLIE
Hello,
Which distribution are you speaking about ?
I'm using Gentoo and postgresql is versioned : you install the versions you're 
looking for and switch form one to another using eselect
laurent@torchwood ~ $ eselect postgresql list
Available PostgreSQL Slots
  11    11.7
  12 *  12.2

(I know my system is outdated : i'm blocked by regressions in PHP so don't 
updated this part for a while :) )
When you're upgrading your system, all supported version are rebuilt every time 
a dependencies change : should be long if you're running a large number of 
version but you keep a stable system.
Bye
Laurent
   Le jeudi 25 novembre 2021, 17:41:35 UTC+1, Chocimier  a 
écrit :  
 
 Hi,

How to provide Postgres for a binary rolling release Linux distribution?
Currently 9.6, 12 and 13 major versions are packaged in Void by me in
way described below.
No one reported practical problems with that, but some concerns arised,
mainly around shared libraries.

Constraints:
- Want to allow to migrate data to new version of server.
- Other software (postfix, qt5...) is linked dynamically to libpq.so,
and providing variants of those per postgres version is not desired.
- There are extensions provided (currently only postgis, more planned).

Current model is:
- Provide different major versions as packages installable at same
time, except from postgresql-libs (libpq, libpgtypes, libecpg.so).
Build every major version _N_ with different prefix: usr/lib/psqlN.
This allows usage of pg_upgrade to migrate data.
- Have one user-installable shared libraries package, always from
newest available version.
- Provide extensions for every version as different package built
against target postgres version (e.g. postgis-postgresql12).
- Do not rebuild packages depending on libpq.so when library is updated.
- Rebuild packages depending on libpq.so against newest version when
they are updated.
- Upgrade of postgresql-libs does not force people to install and use
newer server, this is done independently whenever they decide to.

Now, my questions:
- Is loading new major version library from old postgresql server,
client, extension valid?
- Is loading new major version library from package build against *old*
major version to talk to old server valid?
- Is loading new major version library from package build against *new*
major version to talk to old server valid?
- If any of above is wrong, what could be better model?