Logical Replication ERROR reporting issue

2020-02-18 Thread Ranjan Gajare
Hello Folks,

We are having the issue with Logical Replication in Postgres 10.11
production environment that unable to get around.

Following is the production environment configuration

*PostgreSQL Version: 10.11OS: Ubuntu 16.04.3 LTS (Xenial Xerus)*

The error message frequently occurring in the logs of the subscription
server is :

LOG:  logical replication apply worker for subscription "" has
started
ERROR:  terminating logical replication worker due to timeout
LOG:  background worker "logical replication worker" (PID ) exited
with exit code 1
LOG:  logical replication apply worker for subscription "" has
started
ERROR:  could not start WAL streaming: ERROR:  replication slot
"" is active for PID 
LOG:  worker process: logical replication worker for subscription 
(PID ) exited with exit code 1

This results in filling up disk space on master due to too many WAL pending
to apply. There are two ERROR messages observed here.

Looking at timeout ERROR we tried to simply increase 'wal_receiver_timeout'
to '2min' (1min default). 'wal_sender_timeout' was already '2min'. It
resolved the timeout ERROR and surprisingly the other error saying
'replication slot is active for PID' also vanished after that.

Does anyone have any idea how increasing the wal_receiver_timeout relates
to 'ERROR:  could not start WAL streaming: ERROR:  replication slot
"" is active for PID ' OR is it just a flaw in error
reporting?


Thanks for any help!

-- 
Regards,
Ranjan Gajare


Re: policies and extensions

2020-02-18 Thread Tom Lane
Marc Munro  writes:
> On Mon, 2020-02-17 at 22:48 -0500, Tom Lane wrote:
>> An RLS policy is a table "subsidiary object" so it only depends indirectly
>> on the extension that owns the table.

> Yep, I get that, and I see the dependency chain in the catalog. 

> However an extension can create the table with or without the policy,
> and a table created by an extension without policy can later have a
> policy added, and, unless I'm missing something, the same dependency
> chain exists in either case.

> This means that I cannot tell whether the policy was added by the
> extension or not.

I can't get very excited about that, since the same argument could be
made about triggers, indexes, or rules attached to a table, but no
one has yet complained about those cases.  It's fairly hard to see the
use-case where it matters, anyway.  If you're attaching policies to
tables owned by an extension after-the-fact, you're modifying the
definition of an extension-owned object, which is at best really poor
practice.  We say up-front that you cannot expect the extension
mechanism to track the effects of such changes.

regards, tom lane




Re: DB running out of memory issues after upgrade

2020-02-18 Thread Tomas Vondra

On Tue, Feb 18, 2020 at 05:46:28PM +, Nagaraj Raj wrote:

after upgrade Postgres to v9.6.11 from v9.6.9 DB running out of memory issues 
no world load has changed before and after upgrade. 

spec: RAM 16gb,4vCore
Any bug reported like this or suggestions on how to fix this issue? I 
appreciate the response..!! 



This bug report (in fact, we don't know if it's a bug, but OK) is
woefully incomplete :-(

The server log is mostly useless, unfortunately - it just says a bunch
of processes were killed (by OOM killer, most likely) so the server has
to restart. It tells us nothing about why the backends consumed so much
memory etc.

What would help us is knowing how much memory was the backend (killed by
OOM) consuming, which should be in dmesg.

And then MemoryContextStats output - you need to connect to a backend
consuming a lot of memory using gdb (before it gets killed) and do

 (gdb) p MemoryContextStats(TopMemoryContext)
 (gdb) q

and show us the output printed into server log. If it's a backend
running a query, it'd help knowing the execution plan.

It would also help knowing the non-default configuration, i.e. stuff
tweaked in postgresql.conf.

regards

--
Tomas Vondra  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services 





Re: DB running out of memory issues after upgrade

2020-02-18 Thread Nagaraj Raj
 Below are the same configurations ins .conf file before and after updagrade
show max_connections; = 1743show shared_buffers = "4057840kB"show 
effective_cache_size =  "8115688kB"show maintenance_work_mem = "259MB"show 
checkpoint_completion_target = "0.9"show wal_buffers = "16MB"show 
default_statistics_target = "100"show random_page_cost = "1.1"show 
effective_io_concurrency =" 200"show work_mem = "4MB"show min_wal_size = 
"256MB"show max_wal_size = "2GB"show max_worker_processes = "8"show 
max_parallel_workers_per_gather = "2"

here is some sys logs,
2020-02-16 21:01:17 UTC [-]The database process was killed by the OS 
due to excessive memory consumption. 2020-02-16 13:41:16 UTC [-]The 
database process was killed by the OS due to excessive memory consumption. 

I identified one simple select which consuming more memory and here is the 
query plan,


"Result  (cost=0.00..94891854.11 rows=3160784900 width=288)""  ->  Append  
(cost=0.00..47480080.61 rows=3160784900 width=288)""        ->  Seq Scan on 
msghist  (cost=0.00..15682777.12 rows=312949 width=288)""              
Filter: (((data -> 'info'::text) ->> 'status'::text) = 'CLOSE'::text)""        
->  Seq Scan on msghist msghist_1  (cost=0.00..189454.50 rows=31294900 
width=288)""              Filter: (((data -> 'info'::text) ->> 'status'::text) 
= 'CLOSE'::text)"


Thanks,


On Tuesday, February 18, 2020, 09:59:37 AM PST, Tomas Vondra 
 wrote:  
 
 On Tue, Feb 18, 2020 at 05:46:28PM +, Nagaraj Raj wrote:
>after upgrade Postgres to v9.6.11 from v9.6.9 DB running out of memory issues 
>no world load has changed before and after upgrade. 
>
>spec: RAM 16gb,4vCore
>Any bug reported like this or suggestions on how to fix this issue? I 
>appreciate the response..!! 
>

This bug report (in fact, we don't know if it's a bug, but OK) is
woefully incomplete :-(

The server log is mostly useless, unfortunately - it just says a bunch
of processes were killed (by OOM killer, most likely) so the server has
to restart. It tells us nothing about why the backends consumed so much
memory etc.

What would help us is knowing how much memory was the backend (killed by
OOM) consuming, which should be in dmesg.

And then MemoryContextStats output - you need to connect to a backend
consuming a lot of memory using gdb (before it gets killed) and do

  (gdb) p MemoryContextStats(TopMemoryContext)
  (gdb) q

and show us the output printed into server log. If it's a backend
running a query, it'd help knowing the execution plan.

It would also help knowing the non-default configuration, i.e. stuff
tweaked in postgresql.conf.

regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services 


  

Re: DB running out of memory issues after upgrade

2020-02-18 Thread Merlin Moncure
On Tue, Feb 18, 2020 at 12:10 PM Nagaraj Raj  wrote:
>
> Below are the same configurations ins .conf file before and after updagrade
>
> show max_connections; = 1743
> show shared_buffers = "4057840kB"
> show effective_cache_size =  "8115688kB"
> show maintenance_work_mem = "259MB"
> show checkpoint_completion_target = "0.9"
> show wal_buffers = "16MB"
> show default_statistics_target = "100"
> show random_page_cost = "1.1"
> show effective_io_concurrency =" 200"
> show work_mem = "4MB"
> show min_wal_size = "256MB"
> show max_wal_size = "2GB"
> show max_worker_processes = "8"
> show max_parallel_workers_per_gather = "2"

This smells like oom killer for sure.  how did you resolve some of
these values.  In particular max_connections and effective_cache_size.
  How much memory is in this server?

merlin




How to handle CASE statement with PostgreSQL without need for typecasting

2020-02-18 Thread Anthony Hall
Hello,

Trying to find a way to perform a CASE statement without needing to
typecast.  Research so far suggests that this is not possible, but I wanted
to check with the PSQL community to be sure.


Steps:
1. CREATE TABLE t_update (F1 timestamp(6) NULL )

2. Run statement  UPDATE t_update SET F1 = (CASE WHEN (CURRENT_TIMESTAMP
 IS NULL ) THEN (CURRENT_TIMESTAMP ) ELSE (CURRENT_TIMESTAMP ) END)
Result: No exceptions.

3. Run parametrised statement
UPDATE t_update SET F1 = (CASE WHEN (?  IS NULL ) THEN (? ) ELSE (? ) END)

Result: Error
ERROR: VERROR; column "f1" is of type timestamp without time zone but
expression is of type text(Hint You will need to rewrite or cast the
expression.; Position 27; File
d:\pginstaller.auto\postgres.windows-x64\src\backend\parser\parse_target.c;
Line 591; Routine transformAssignedExpr; ) (6822148)


NOTE:  From my research online, I found that typecasting works and also the
error from the database suggests typecasting.

This statement works:

UPDATE t_update SET F1 = (CASE WHEN (?::timestamp(6) IS NULL ) THEN
(?::timestamp(6) ) ELSE (?::timestamp(6) ) END)


Please let me know your thoughts.

Many thanks!
Anthony


Re: policies and extensions

2020-02-18 Thread Marc Munro
On Mon, 2020-02-17 at 22:48 -0500, Tom Lane wrote:
> Marc Munro  writes:
> > 
> An RLS policy is a table "subsidiary object" so it only depends
> indirectly
> on the extension that owns the table.

Yep, I get that, and I see the dependency chain in the catalog. 

However an extension can create the table with or without the policy,
and a table created by an extension without policy can later have a
policy added, and, unless I'm missing something, the same dependency
chain exists in either case.

This means that I cannot tell whether the policy was added by the
extension or not.

I can see use cases where an extension writer might create an extension
with policies on tables, and others where a user might want to create
policies on tables from an extension provided by someone else.

Unfortunately, there is no way after the fact of determining which case
applies.

My use case is a tool that determines the state of a database for
performing diffs, etc.  It can generate ddl from database diffs to
create or alter tables, etc, and can also deal with policies and
extensions but will not be able to deal with policies created in
extensions, which is disappointing.

I can live with it though.  I'll document it as an oddity that the tool
is unable to deal with and generate commented ddl if the policy applies
to a table defined in an extension.

Thanks for the response.

__
Marc




Re: How to handle CASE statement with PostgreSQL without need for typecasting

2020-02-18 Thread John W Higgins
Good Morning,


>
> NOTE:  From my research online, I found that typecasting works and also
> the error from the database suggests typecasting.
>
> This statement works:
>
> UPDATE t_update SET F1 = (CASE WHEN (?::timestamp(6) IS NULL ) THEN
> (?::timestamp(6) ) ELSE (?::timestamp(6) ) END)
>
>
There is no option to convert the text parameter to a timestamp - you need
to cast it - or use a parsing function or something else - but a text value
cannot drop directly into a timestamp column. But it's not the case
statement that is the issue - but rather the update - so you could shorten
the statement a little with this.

UPDATE t_update SET F1 = (CASE WHEN (? IS NULL ) THEN (?) ) ELSE (?) ) END)
::timestamp(6)

You don't need a timestamp until you place in in the column.

You also probably don't want a case statement here - not the standard
option for this

UPDATE t_update SET F1 = COALESCE(?, ?)::timestamp(6) with the first ?
being the when above and the second being the else above. See here [1]

John

[1] - https://www.postgresql.org/docs/current/functions-conditional.html

>


Re: Is is safe to use SPI in multiple threads?

2020-02-18 Thread Tom Mercha
On 23/12/2016 13:41, Peter J. Holzer wrote:
> On 2016-12-09 16:52:05 +0800, Qiu Xiafei wrote:
>> I'm new to PG and want to implement my domain-specific system based on PG. I
>> wish to arrange my data as several tables in database and translate my DSL 
>> into
>> SQL statements for query. Since one DSL statement may be mapped to several 
>> SQL
>> statements, it's better to push the DSL server as close to the PG server as
>> possible. I found PG's backgroud worker meet my needs. I can setup a 
>> background
>> worker bounded to PG server and listen to a port for network requests.
>>
>> But I encounter a problem that the Server Programing Interfaces are not 
>> THREAD
>> SAFE. There are some global variables defined like: SPI_processed,
>> SPI_tuptable, etc. This limit to my DSL server to work in single thread mode
>> which is quite inefficient.
> 
> I had a similar requirement. I solved it by moving the application logic
> out of the stored procedures. All the stored procedure does is an RPC
> call (I use ØMQ for that) to a server process and send the result back
> to the client. The server process converts the request into multiple SQL
> queries which can be processed in parallel.
> 
> The downside is of course that the communication overhead is much
> higher (A minimum of 4 network messages per request). That's not a
> problem in my case, but you mileage may vary.
> 
> The advantages in my opinion are:
> 
> * A standalone server process is easier to test and debug than a bunch
>of stored procedures.
> * I can easily scale out if necessary: Currently my database and server
>process run on the same machine, but I could distribute them over
>several machines with (almost) no change in logic.
> 
>  hp
> 

Sorry to revive such an old topic. I am facing a similar requirement 
where I am running multiple queries concurrently. Like Qiu Xiafei, I am 
looking at SPI, and dynamic background workers. In particular, I am 
using SPI_execq(...) on each dynamic background workers I spawn. What I 
am experiencing is that I am not seeing a speedup, and I am beginning to 
wonder if I have done something wrong, if the overheads are too big, or 
if there are some limitations I am not aware of.

As I see that none of the comments here make much of a reference to 
performance/speedup, would you be so kind as to tell me how satisfied 
you were with performance? Any insights would be greatly appreciated.

Thanks,
Tom




pglogical install errors openSUSE Leap 42.1

2020-02-18 Thread Bellrose, Brian
In the process of trying to use pglogical to upgrade from 9.4 to 11.7. Current 
OS is openSUSE Leap 42.1. Downloaded pglogical-2.2.0.tar from 2nsQuadrant site. 
I am getting the following error during make clean all command:

o pglogical_worker.c
In file included from pglogical_worker.c:17:0:
/usr/include/pgsql/server/libpq/libpq-be.h:36:27: fatal error: gssapi/gssapi.h: 
No such file or directory
#include 
   ^
compilation terminated.
: recipe for target 'pglogical_worker.o' failed

It appears that gssapi is Kerberos related. Just not exactly sure what package 
I am missing and should install on the OS to get this to compile. Currently I 
have only one gssapi related package installed on this system

S | Name  | Summary  | Type
--+---+--+
i | cyrus-sasl-gssapi | Plugin for the GSSAPI SASL mechanism | package

Thanks,
Brian


This email and any attachments are only for use by the intended recipient(s) 
and may contain legally privileged, confidential, proprietary or otherwise 
private information. Any unauthorized use, reproduction, dissemination, 
distribution or other disclosure of the contents of this e-mail or its 
attachments is strictly prohibited. If you have received this email in error, 
please notify the sender immediately and delete the original. Neither this 
information block, the typed name of the sender, nor anything else in this 
message is intended to constitute an electronic signature unless a specific 
statement to the contrary is included in this message.


Re: policies and extensions

2020-02-18 Thread Stephen Frost
Greetings,

* Tom Lane (t...@sss.pgh.pa.us) wrote:
> Marc Munro  writes:
> > On Mon, 2020-02-17 at 22:48 -0500, Tom Lane wrote:
> >> An RLS policy is a table "subsidiary object" so it only depends indirectly
> >> on the extension that owns the table.
> 
> > Yep, I get that, and I see the dependency chain in the catalog. 
> 
> > However an extension can create the table with or without the policy,
> > and a table created by an extension without policy can later have a
> > policy added, and, unless I'm missing something, the same dependency
> > chain exists in either case.
> 
> > This means that I cannot tell whether the policy was added by the
> > extension or not.
> 
> I can't get very excited about that, since the same argument could be
> made about triggers, indexes, or rules attached to a table, but no
> one has yet complained about those cases.  It's fairly hard to see the
> use-case where it matters, anyway.  If you're attaching policies to
> tables owned by an extension after-the-fact, you're modifying the
> definition of an extension-owned object, which is at best really poor
> practice.  We say up-front that you cannot expect the extension
> mechanism to track the effects of such changes.

This isn't actually entirely correct because there are clear and
specific cases which we support where an extension object is modified,
in a manner of speaking, after the extension has been installed- and
that's through the GRANT system.  The entire point of pg_init_privs is
to provide a way to distinguish between what the installed extension's
original privileges were and what were added later, so that pg_dump can
correctly dump out the delta between the two.

Policies, also being part of the overall privilege system, could
certainly be looked at in a similar light as being different from
triggers and indexes.  In particular, anything to do with the privilege
system is going to have some dependency on roles and it's rather rare
for an extension to define roles- instead you'd expect the extension to
be installed in a 'safe' manner, with the user able to GRANT rights or
enable RLS and set up policies on objects from the extension after
installation to allow certain users to have access to the extension's
objects.

While it's not as nice a solution at the pg_init_privs system, I would
be inclined to state explicitly (and perhaps even enforce) that enabling
RLS or creating policies as part of an extension isn't supported, and
then modify pg_dump to always dump out those attributes of extension
objects if they exist.  When it comes to the GRANT system, we *must*
have a way for extensions to revoke access to certain types of objects
because they start out not-safe (specifically, functions), but as long
as we have that we can always tell extension authors and users that they
can arrange to have no one have access to the extension's tables by
default and they can then enable RLS and add policies after the
extension is installed.

Thanks,

Stephen


signature.asc
Description: PGP signature


Re: How to handle CASE statement with PostgreSQL without need for typecasting

2020-02-18 Thread Adrian Klaver

On 2/18/20 10:51 AM, John W Higgins wrote:

Good Morning,


NOTE:  From my research online, I found that typecasting works and
also the error from the database suggests typecasting.

This statement works:

UPDATE t_update SET F1 = (CASE WHEN (?::timestamp(6) IS NULL ) THEN
(?::timestamp(6) ) ELSE (?::timestamp(6) ) END)


There is no option to convert the text parameter to a timestamp - you 
need to cast it - or use a parsing function or something else - but a 
text value cannot drop directly into a timestamp column. But it's not 
the case statement that is the issue - but rather the update - so you 


Yes and no:

test=> UPDATE t_update SET F1 = '02/23/2020';
UPDATE 1

UPDATE 1
test=> select pg_typeof('02/23/2020');
 pg_typeof
---
 unknown

test=> UPDATE t_update SET F1 = '02/23/2020'::unknown;
UPDATE 1

test=> UPDATE t_update SET F1 = (CASE WHEN ('02/18/2020'  IS NULL ) THEN 
('02/18/2020' ) ELSE ('02/19/2020') END)::unknown;
ERROR:  failed to find conversion function from unknown to timestamp 
without time zone


test=> UPDATE t_update SET F1 = (CASE WHEN ('02/18/2020'  IS NULL ) THEN 
('02/18/2020' ) ELSE ('02/19/2020') END)::timestamp;

UPDATE 1

So there is some sort of different evaluation going on in the CASE 
statement.




could shorten the statement a little with this.

UPDATE t_update SET F1 = (CASE WHEN (? IS NULL ) THEN (?) ) ELSE (?) ) 
END)::timestamp(6)


You don't need a timestamp until you place in in the column.

You also probably don't want a case statement here - not the standard 
option for this


UPDATE t_update SET F1 = COALESCE(?, ?)::timestamp(6) with the first ? 
being the when above and the second being the else above. See here [1]


John

[1] - https://www.postgresql.org/docs/current/functions-conditional.html




--
Adrian Klaver
adrian.kla...@aklaver.com




Re: pglogical install errors openSUSE Leap 42.1

2020-02-18 Thread Adrian Klaver

On 2/18/20 11:39 AM, Bellrose, Brian wrote:
In the process of trying to use pglogical to upgrade from 9.4 to 11.7. 
Current OS is openSUSE Leap 42.1. Downloaded pglogical-2.2.0.tar from 


FYI 42.1 is coming up on 3 years past EOL so you might have general 
issues with out of date libraries.


2nsQuadrant site. I am getting the following error during make clean all 
command:


Did you follow the source install instructions here?:

https://www.2ndquadrant.com/en/resources/pglogical/pglogical-installation-instructions/



o pglogical_worker.c

In file included from pglogical_worker.c:17:0:

/usr/include/pgsql/server/libpq/libpq-be.h:36:27: fatal error: 
gssapi/gssapi.h: No such file or directory


#include 

    ^

compilation terminated.

: recipe for target 'pglogical_worker.o' failed

It appears that gssapi is Kerberos related. Just not exactly sure what 
package I am missing and should install on the OS to get this to 
compile. Currently I have only one gssapi related package installed on 
this system


S | Name  | Summary  | Type

--+---+--+

i | cyrus-sasl-gssapi | Plugin for the GSSAPI SASL mechanism | 
package


Thanks,

Brian

/This email and any attachments are only for use by the intended 
recipient(s) and may contain legally privileged, confidential, 
proprietary or otherwise private information. Any unauthorized use, 
reproduction, dissemination, distribution or other disclosure of the 
contents of this e-mail or its attachments is strictly prohibited. If 
you have received this email in error, please notify the sender 
immediately and delete the original. Neither this information block, the 
typed name of the sender, nor anything else in this message is intended 
to constitute an electronic signature unless a specific statement to the 
contrary is included in this message. /



--
Adrian Klaver
adrian.kla...@aklaver.com




RE: [EXTERNAL]: Re: pglogical install errors openSUSE Leap 42.1

2020-02-18 Thread Bellrose, Brian
Yes, I understand that this OS is very old. I can't help that. I was handed 
this. The reason I am trying to install pglogical is so that I can upgrade and 
get off this OS. Our requirements are for limited downtime so pglocical is best 
bet. At least I thought it was.

Yes, I followed the source install doc. Can't be really called an install doc 
when all it states is run a make. It has about three sentences that encompass 
their complete install instructions from source. No documentation on package 
dependencies or anything else or even what package do download. I tried 2.2.1 
first and it did not work. I have gotten farther with 2.2.0, but I am getting 
what appears to be dependency errors. Might need to install krb5-devel. Not 
100% clear though.

Brian

-Original Message-
From: Adrian Klaver 
Sent: Tuesday, February 18, 2020 3:49 PM
To: Bellrose, Brian ; 
pgsql-general@lists.postgresql.org
Subject: [EXTERNAL]: Re: pglogical install errors openSUSE Leap 42.1

On 2/18/20 11:39 AM, Bellrose, Brian wrote:
> In the process of trying to use pglogical to upgrade from 9.4 to 11.7.
> Current OS is openSUSE Leap 42.1. Downloaded pglogical-2.2.0.tar from

FYI 42.1 is coming up on 3 years past EOL so you might have general issues with 
out of date libraries.

> 2nsQuadrant site. I am getting the following error during make clean
> all
> command:

Did you follow the source install instructions here?:

https://urldefense.proofpoint.com/v2/url?u=https-3A__www.2ndquadrant.com_en_resources_pglogical_pglogical-2Dinstallation-2Dinstructions_&d=DwID-g&c=pG3N8eJDEvizGbIy8hw-0w&r=Avd8jJaAOeUVJ3AmVEriBLvYqiK8qqaP7C8huZnWyCI&m=1vh2nbBIrcqphzYV4i690_hEEZuRS71Da5SClwjBbOw&s=1O6j3zKQdkp8RTuGPAQPB44lQi_IV9goSuWDjl0pnqI&e=

>
> o pglogical_worker.c
>
> In file included from pglogical_worker.c:17:0:
>
> /usr/include/pgsql/server/libpq/libpq-be.h:36:27: fatal error:
> gssapi/gssapi.h: No such file or directory
>
> #include 
>
> ^
>
> compilation terminated.
>
> : recipe for target 'pglogical_worker.o' failed
>
> It appears that gssapi is Kerberos related. Just not exactly sure what
> package I am missing and should install on the OS to get this to
> compile. Currently I have only one gssapi related package installed on
> this system
>
> S | Name  | Summary  |
> Type
>
> --+---+--+
>
> i | cyrus-sasl-gssapi | Plugin for the GSSAPI SASL mechanism |
> package
>
> Thanks,
>
> Brian
>
> /This email and any attachments are only for use by the intended
> recipient(s) and may contain legally privileged, confidential,
> proprietary or otherwise private information. Any unauthorized use,
> reproduction, dissemination, distribution or other disclosure of the
> contents of this e-mail or its attachments is strictly prohibited. If
> you have received this email in error, please notify the sender
> immediately and delete the original. Neither this information block,
> the typed name of the sender, nor anything else in this message is
> intended to constitute an electronic signature unless a specific
> statement to the contrary is included in this message. /


--
Adrian Klaver
adrian.kla...@aklaver.com
This email and any attachments are only for use by the intended recipient(s) 
and may contain legally privileged, confidential, proprietary or otherwise 
private information. Any unauthorized use, reproduction, dissemination, 
distribution or other disclosure of the contents of this e-mail or its 
attachments is strictly prohibited. If you have received this email in error, 
please notify the sender immediately and delete the original. Neither this 
information block, the typed name of the sender, nor anything else in this 
message is intended to constitute an electronic signature unless a specific 
statement to the contrary is included in this message.




Re: [EXTERNAL]: Re: pglogical install errors openSUSE Leap 42.1

2020-02-18 Thread Adrian Klaver

On 2/18/20 12:54 PM, Bellrose, Brian wrote:

Yes, I understand that this OS is very old. I can't help that. I was handed 
this. The reason I am trying to install pglogical is so that I can upgrade and 
get off this OS. Our requirements are for limited downtime so pglocical is best 
bet. At least I thought it was.

Yes, I followed the source install doc. Can't be really called an install doc 
when all it states is run a make. It has about three sentences that encompass 
their complete install instructions from source. No documentation on package 
dependencies or anything else or even what package do download. I tried 2.2.1 
first and it did not work. I have gotten farther with 2.2.0, but I am getting 
what appears to be dependency errors. Might need to install krb5-devel. Not 
100% clear though.


Well on my Leap 15.1 krb5-devel does provide gssapi.h.

How was Postgres installed on the machine?



Brian

-Original Message-
From: Adrian Klaver 
Sent: Tuesday, February 18, 2020 3:49 PM
To: Bellrose, Brian ; 
pgsql-general@lists.postgresql.org
Subject: [EXTERNAL]: Re: pglogical install errors openSUSE Leap 42.1

On 2/18/20 11:39 AM, Bellrose, Brian wrote:

In the process of trying to use pglogical to upgrade from 9.4 to 11.7.
Current OS is openSUSE Leap 42.1. Downloaded pglogical-2.2.0.tar from


FYI 42.1 is coming up on 3 years past EOL so you might have general issues with 
out of date libraries.


2nsQuadrant site. I am getting the following error during make clean
all
command:


Did you follow the source install instructions here?:

https://urldefense.proofpoint.com/v2/url?u=https-3A__www.2ndquadrant.com_en_resources_pglogical_pglogical-2Dinstallation-2Dinstructions_&d=DwID-g&c=pG3N8eJDEvizGbIy8hw-0w&r=Avd8jJaAOeUVJ3AmVEriBLvYqiK8qqaP7C8huZnWyCI&m=1vh2nbBIrcqphzYV4i690_hEEZuRS71Da5SClwjBbOw&s=1O6j3zKQdkp8RTuGPAQPB44lQi_IV9goSuWDjl0pnqI&e=



o pglogical_worker.c

In file included from pglogical_worker.c:17:0:

/usr/include/pgsql/server/libpq/libpq-be.h:36:27: fatal error:
gssapi/gssapi.h: No such file or directory

#include 

 ^

compilation terminated.

: recipe for target 'pglogical_worker.o' failed

It appears that gssapi is Kerberos related. Just not exactly sure what
package I am missing and should install on the OS to get this to
compile. Currently I have only one gssapi related package installed on
this system

S | Name  | Summary  |
Type

--+---+--+

i | cyrus-sasl-gssapi | Plugin for the GSSAPI SASL mechanism |
package

Thanks,

Brian

/This email and any attachments are only for use by the intended
recipient(s) and may contain legally privileged, confidential,
proprietary or otherwise private information. Any unauthorized use,
reproduction, dissemination, distribution or other disclosure of the
contents of this e-mail or its attachments is strictly prohibited. If
you have received this email in error, please notify the sender
immediately and delete the original. Neither this information block,
the typed name of the sender, nor anything else in this message is
intended to constitute an electronic signature unless a specific
statement to the contrary is included in this message. /



--
Adrian Klaver
adrian.kla...@aklaver.com
This email and any attachments are only for use by the intended recipient(s) 
and may contain legally privileged, confidential, proprietary or otherwise 
private information. Any unauthorized use, reproduction, dissemination, 
distribution or other disclosure of the contents of this e-mail or its 
attachments is strictly prohibited. If you have received this email in error, 
please notify the sender immediately and delete the original. Neither this 
information block, the typed name of the sender, nor anything else in this 
message is intended to constitute an electronic signature unless a specific 
statement to the contrary is included in this message.




--
Adrian Klaver
adrian.kla...@aklaver.com




RE: [EXTERNAL]: Re: pglogical install errors openSUSE Leap 42.1

2020-02-18 Thread Bellrose, Brian
I used zypper to install postgres. Postgres is fine... Running 9.4.25 that I 
updated today. So you have krb5-devel... Ok, good to know. Seems like that may 
be the missing link. At least I hope it is the only one.

Brian

-Original Message-
From: Adrian Klaver 
Sent: Tuesday, February 18, 2020 4:19 PM
To: Bellrose, Brian ; 
pgsql-general@lists.postgresql.org
Subject: Re: [EXTERNAL]: Re: pglogical install errors openSUSE Leap 42.1

On 2/18/20 12:54 PM, Bellrose, Brian wrote:
> Yes, I understand that this OS is very old. I can't help that. I was handed 
> this. The reason I am trying to install pglogical is so that I can upgrade 
> and get off this OS. Our requirements are for limited downtime so pglocical 
> is best bet. At least I thought it was.
>
> Yes, I followed the source install doc. Can't be really called an install doc 
> when all it states is run a make. It has about three sentences that encompass 
> their complete install instructions from source. No documentation on package 
> dependencies or anything else or even what package do download. I tried 2.2.1 
> first and it did not work. I have gotten farther with 2.2.0, but I am getting 
> what appears to be dependency errors. Might need to install krb5-devel. Not 
> 100% clear though.

Well on my Leap 15.1 krb5-devel does provide gssapi.h.

How was Postgres installed on the machine?

>
> Brian
>
> -Original Message-
> From: Adrian Klaver 
> Sent: Tuesday, February 18, 2020 3:49 PM
> To: Bellrose, Brian ;
> pgsql-general@lists.postgresql.org
> Subject: [EXTERNAL]: Re: pglogical install errors openSUSE Leap 42.1
>
> On 2/18/20 11:39 AM, Bellrose, Brian wrote:
>> In the process of trying to use pglogical to upgrade from 9.4 to 11.7.
>> Current OS is openSUSE Leap 42.1. Downloaded pglogical-2.2.0.tar from
>
> FYI 42.1 is coming up on 3 years past EOL so you might have general issues 
> with out of date libraries.
>
>> 2nsQuadrant site. I am getting the following error during make clean
>> all
>> command:
>
> Did you follow the source install instructions here?:
>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.2ndquadrant.c
> om_en_resources_pglogical_pglogical-2Dinstallation-2Dinstructions_&d=D
> wID-g&c=pG3N8eJDEvizGbIy8hw-0w&r=Avd8jJaAOeUVJ3AmVEriBLvYqiK8qqaP7C8hu
> ZnWyCI&m=1vh2nbBIrcqphzYV4i690_hEEZuRS71Da5SClwjBbOw&s=1O6j3zKQdkp8RTu
> GPAQPB44lQi_IV9goSuWDjl0pnqI&e=
>
>>
>> o pglogical_worker.c
>>
>> In file included from pglogical_worker.c:17:0:
>>
>> /usr/include/pgsql/server/libpq/libpq-be.h:36:27: fatal error:
>> gssapi/gssapi.h: No such file or directory
>>
>> #include 
>>
>>  ^
>>
>> compilation terminated.
>>
>> : recipe for target 'pglogical_worker.o' failed
>>
>> It appears that gssapi is Kerberos related. Just not exactly sure
>> what package I am missing and should install on the OS to get this to
>> compile. Currently I have only one gssapi related package installed
>> on this system
>>
>> S | Name  | Summary  |
>> Type
>>
>> --+---+--+
>>
>> i | cyrus-sasl-gssapi | Plugin for the GSSAPI SASL mechanism |
>> package
>>
>> Thanks,
>>
>> Brian
>>
>> /This email and any attachments are only for use by the intended
>> recipient(s) and may contain legally privileged, confidential,
>> proprietary or otherwise private information. Any unauthorized use,
>> reproduction, dissemination, distribution or other disclosure of the
>> contents of this e-mail or its attachments is strictly prohibited. If
>> you have received this email in error, please notify the sender
>> immediately and delete the original. Neither this information block,
>> the typed name of the sender, nor anything else in this message is
>> intended to constitute an electronic signature unless a specific
>> statement to the contrary is included in this message. /
>
>
> --
> Adrian Klaver
> adrian.kla...@aklaver.com
> This email and any attachments are only for use by the intended recipient(s) 
> and may contain legally privileged, confidential, proprietary or otherwise 
> private information. Any unauthorized use, reproduction, dissemination, 
> distribution or other disclosure of the contents of this e-mail or its 
> attachments is strictly prohibited. If you have received this email in error, 
> please notify the sender immediately and delete the original. Neither this 
> information block, the typed name of the sender, nor anything else in this 
> message is intended to constitute an electronic signature unless a specific 
> statement to the contrary is included in this message.
>


--
Adrian Klaver
adrian.kla...@aklaver.com
This email and any attachments are only for use by the intended recipient(s) 
and may contain legally privileged, confidential, proprietary or otherwise 
private information. Any unauthorized use, reproduction, dissemination, 
distribution or other disclosure of the contents of th

Re: [EXTERNAL]: Re: pglogical install errors openSUSE Leap 42.1

2020-02-18 Thread Adrian Klaver

On 2/18/20 1:22 PM, Bellrose, Brian wrote:

I used zypper to install postgres. Postgres is fine... Running 9.4.25 that I 
updated today. So you have krb5-devel... Ok, good to know. Seems like that may 
be the missing link. At least I hope it is the only one.


Was postgresql94-devel also installed?



Brian

-Original Message-
From: Adrian Klaver 
Sent: Tuesday, February 18, 2020 4:19 PM
To: Bellrose, Brian ; 
pgsql-general@lists.postgresql.org
Subject: Re: [EXTERNAL]: Re: pglogical install errors openSUSE Leap 42.1

On 2/18/20 12:54 PM, Bellrose, Brian wrote:

Yes, I understand that this OS is very old. I can't help that. I was handed 
this. The reason I am trying to install pglogical is so that I can upgrade and 
get off this OS. Our requirements are for limited downtime so pglocical is best 
bet. At least I thought it was.

Yes, I followed the source install doc. Can't be really called an install doc 
when all it states is run a make. It has about three sentences that encompass 
their complete install instructions from source. No documentation on package 
dependencies or anything else or even what package do download. I tried 2.2.1 
first and it did not work. I have gotten farther with 2.2.0, but I am getting 
what appears to be dependency errors. Might need to install krb5-devel. Not 
100% clear though.


Well on my Leap 15.1 krb5-devel does provide gssapi.h.

How was Postgres installed on the machine?



Brian

-Original Message-
From: Adrian Klaver 
Sent: Tuesday, February 18, 2020 3:49 PM
To: Bellrose, Brian ;
pgsql-general@lists.postgresql.org
Subject: [EXTERNAL]: Re: pglogical install errors openSUSE Leap 42.1

On 2/18/20 11:39 AM, Bellrose, Brian wrote:

In the process of trying to use pglogical to upgrade from 9.4 to 11.7.
Current OS is openSUSE Leap 42.1. Downloaded pglogical-2.2.0.tar from


FYI 42.1 is coming up on 3 years past EOL so you might have general issues with 
out of date libraries.


2nsQuadrant site. I am getting the following error during make clean
all
command:


Did you follow the source install instructions here?:

https://urldefense.proofpoint.com/v2/url?u=https-3A__www.2ndquadrant.c
om_en_resources_pglogical_pglogical-2Dinstallation-2Dinstructions_&d=D
wID-g&c=pG3N8eJDEvizGbIy8hw-0w&r=Avd8jJaAOeUVJ3AmVEriBLvYqiK8qqaP7C8hu
ZnWyCI&m=1vh2nbBIrcqphzYV4i690_hEEZuRS71Da5SClwjBbOw&s=1O6j3zKQdkp8RTu
GPAQPB44lQi_IV9goSuWDjl0pnqI&e=



o pglogical_worker.c

In file included from pglogical_worker.c:17:0:

/usr/include/pgsql/server/libpq/libpq-be.h:36:27: fatal error:
gssapi/gssapi.h: No such file or directory

#include 

  ^

compilation terminated.

: recipe for target 'pglogical_worker.o' failed

It appears that gssapi is Kerberos related. Just not exactly sure
what package I am missing and should install on the OS to get this to
compile. Currently I have only one gssapi related package installed
on this system

S | Name  | Summary  |
Type

--+---+--+

i | cyrus-sasl-gssapi | Plugin for the GSSAPI SASL mechanism |
package

Thanks,

Brian

/This email and any attachments are only for use by the intended
recipient(s) and may contain legally privileged, confidential,
proprietary or otherwise private information. Any unauthorized use,
reproduction, dissemination, distribution or other disclosure of the
contents of this e-mail or its attachments is strictly prohibited. If
you have received this email in error, please notify the sender
immediately and delete the original. Neither this information block,
the typed name of the sender, nor anything else in this message is
intended to constitute an electronic signature unless a specific
statement to the contrary is included in this message. /



--
Adrian Klaver
adrian.kla...@aklaver.com
This email and any attachments are only for use by the intended recipient(s) 
and may contain legally privileged, confidential, proprietary or otherwise 
private information. Any unauthorized use, reproduction, dissemination, 
distribution or other disclosure of the contents of this e-mail or its 
attachments is strictly prohibited. If you have received this email in error, 
please notify the sender immediately and delete the original. Neither this 
information block, the typed name of the sender, nor anything else in this 
message is intended to constitute an electronic signature unless a specific 
statement to the contrary is included in this message.




--
Adrian Klaver
adrian.kla...@aklaver.com
This email and any attachments are only for use by the intended recipient(s) 
and may contain legally privileged, confidential, proprietary or otherwise 
private information. Any unauthorized use, reproduction, dissemination, 
distribution or other disclosure of the contents of this e-mail or its 
attachments is strictly prohibited. If you have received this email in error, 
please notify the sender

RE: [EXTERNAL]: Re: pglogical install errors openSUSE Leap 42.1

2020-02-18 Thread Bellrose, Brian
Yes,

S | Name  | Summary 
| Type
--+---+-+
i | postgresql94  | Basic Clients and Utilities for PostgreSQL  
| package
i | postgresql94-contrib  | Contributed Extensions and Additions to PostgreSQL  
| package
i | postgresql94-devel| PostgreSQL development header files and libraries   
| package
i | postgresql94-plperl   | The PL/Tcl, PL/Perl, and  PL/Python procedural 
languages for PostgreSQL | package
i | postgresql94-plpython | The PL/Python Procedural Languages for PostgreSQL   
| package
i | postgresql94-pltcl| PL/Tcl Procedural Language for PostgreSQL   
| package
i | postgresql94-server   | The Programs Needed to Create and Run a PostgreSQL 
Server   | package
i | postgresql94-test | The test suite for PostgreSQL   
| package

Brian

-Original Message-
From: Adrian Klaver 
Sent: Tuesday, February 18, 2020 4:41 PM
To: Bellrose, Brian ; 
pgsql-general@lists.postgresql.org
Subject: Re: [EXTERNAL]: Re: pglogical install errors openSUSE Leap 42.1

On 2/18/20 1:22 PM, Bellrose, Brian wrote:
> I used zypper to install postgres. Postgres is fine... Running 9.4.25 that I 
> updated today. So you have krb5-devel... Ok, good to know. Seems like that 
> may be the missing link. At least I hope it is the only one.

Was postgresql94-devel also installed?

>
> Brian
>
> -Original Message-
> From: Adrian Klaver 
> Sent: Tuesday, February 18, 2020 4:19 PM
> To: Bellrose, Brian ;
> pgsql-general@lists.postgresql.org
> Subject: Re: [EXTERNAL]: Re: pglogical install errors openSUSE Leap
> 42.1
>
> On 2/18/20 12:54 PM, Bellrose, Brian wrote:
>> Yes, I understand that this OS is very old. I can't help that. I was handed 
>> this. The reason I am trying to install pglogical is so that I can upgrade 
>> and get off this OS. Our requirements are for limited downtime so pglocical 
>> is best bet. At least I thought it was.
>>
>> Yes, I followed the source install doc. Can't be really called an install 
>> doc when all it states is run a make. It has about three sentences that 
>> encompass their complete install instructions from source. No documentation 
>> on package dependencies or anything else or even what package do download. I 
>> tried 2.2.1 first and it did not work. I have gotten farther with 2.2.0, but 
>> I am getting what appears to be dependency errors. Might need to install 
>> krb5-devel. Not 100% clear though.
>
> Well on my Leap 15.1 krb5-devel does provide gssapi.h.
>
> How was Postgres installed on the machine?
>
>>
>> Brian
>>
>> -Original Message-
>> From: Adrian Klaver 
>> Sent: Tuesday, February 18, 2020 3:49 PM
>> To: Bellrose, Brian ;
>> pgsql-general@lists.postgresql.org
>> Subject: [EXTERNAL]: Re: pglogical install errors openSUSE Leap 42.1
>>
>> On 2/18/20 11:39 AM, Bellrose, Brian wrote:
>>> In the process of trying to use pglogical to upgrade from 9.4 to 11.7.
>>> Current OS is openSUSE Leap 42.1. Downloaded pglogical-2.2.0.tar
>>> from
>>
>> FYI 42.1 is coming up on 3 years past EOL so you might have general issues 
>> with out of date libraries.
>>
>>> 2nsQuadrant site. I am getting the following error during make clean
>>> all
>>> command:
>>
>> Did you follow the source install instructions here?:
>>
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.2ndquadrant.
>> c
>> om_en_resources_pglogical_pglogical-2Dinstallation-2Dinstructions_&d=
>> D
>> wID-g&c=pG3N8eJDEvizGbIy8hw-0w&r=Avd8jJaAOeUVJ3AmVEriBLvYqiK8qqaP7C8h
>> u
>> ZnWyCI&m=1vh2nbBIrcqphzYV4i690_hEEZuRS71Da5SClwjBbOw&s=1O6j3zKQdkp8RT
>> u
>> GPAQPB44lQi_IV9goSuWDjl0pnqI&e=
>>
>>>
>>> o pglogical_worker.c
>>>
>>> In file included from pglogical_worker.c:17:0:
>>>
>>> /usr/include/pgsql/server/libpq/libpq-be.h:36:27: fatal error:
>>> gssapi/gssapi.h: No such file or directory
>>>
>>> #include 
>>>
>>>   ^
>>>
>>> compilation terminated.
>>>
>>> : recipe for target 'pglogical_worker.o' failed
>>>
>>> It appears that gssapi is Kerberos related. Just not exactly sure
>>> what package I am missing and should install on the OS to get this
>>> to compile. Currently I have only one gssapi related package
>>> installed on this system
>>>
>>> S | Name  | Summary  |
>>> Type
>>>
>>> --+---+--+
>>>
>>> i | cyrus-sasl-gssapi | Plugin for the GSSAPI SASL mechanism |
>>> package
>>>
>>> Thanks,
>>>
>>> Brian
>>>
>>> /This email and any attachments are only for use by the intended
>>> recipient(s) and may contain legally privileged, confidential,
>>> proprietary or otherwise private information. Any unaut

Re: [EXTERNAL]: Re: pglogical install errors openSUSE Leap 42.1

2020-02-18 Thread Adrian Klaver

On 2/18/20 1:56 PM, Bellrose, Brian wrote:

Yes,

S | Name  | Summary 
| Type
--+---+-+
i | postgresql94  | Basic Clients and Utilities for PostgreSQL  
| package
i | postgresql94-contrib  | Contributed Extensions and Additions to PostgreSQL  
| package
i | postgresql94-devel| PostgreSQL development header files and libraries   
| package
i | postgresql94-plperl   | The PL/Tcl, PL/Perl, and  PL/Python procedural 
languages for PostgreSQL | package
i | postgresql94-plpython | The PL/Python Procedural Languages for PostgreSQL   
| package
i | postgresql94-pltcl| PL/Tcl Procedural Language for PostgreSQL   
| package
i | postgresql94-server   | The Programs Needed to Create and Run a PostgreSQL 
Server   | package
i | postgresql94-test | The test suite for PostgreSQL   
| packagep


Alright that looks good. You may still need to play Whack-a-Mole with 
devel libraries.


I am curious how you got to 9.4.25 via an update, given that this 
Postgres version was released well past the OS EOL?




Brian

-Original Message-
From: Adrian Klaver 
Sent: Tuesday, February 18, 2020 4:41 PM
To: Bellrose, Brian ; 
pgsql-general@lists.postgresql.org
Subject: Re: [EXTERNAL]: Re: pglogical install errors openSUSE Leap 42.1

On 2/18/20 1:22 PM, Bellrose, Brian wrote:

I used zypper to install postgres. Postgres is fine... Running 9.4.25 that I 
updated today. So you have krb5-devel... Ok, good to know. Seems like that may 
be the missing link. At least I hope it is the only one.


Was postgresql94-devel also installed?



Brian

-Original Message-
From: Adrian Klaver 
Sent: Tuesday, February 18, 2020 4:19 PM
To: Bellrose, Brian ;
pgsql-general@lists.postgresql.org
Subject: Re: [EXTERNAL]: Re: pglogical install errors openSUSE Leap
42.1

On 2/18/20 12:54 PM, Bellrose, Brian wrote:

Yes, I understand that this OS is very old. I can't help that. I was handed 
this. The reason I am trying to install pglogical is so that I can upgrade and 
get off this OS. Our requirements are for limited downtime so pglocical is best 
bet. At least I thought it was.

Yes, I followed the source install doc. Can't be really called an install doc 
when all it states is run a make. It has about three sentences that encompass 
their complete install instructions from source. No documentation on package 
dependencies or anything else or even what package do download. I tried 2.2.1 
first and it did not work. I have gotten farther with 2.2.0, but I am getting 
what appears to be dependency errors. Might need to install krb5-devel. Not 
100% clear though.


Well on my Leap 15.1 krb5-devel does provide gssapi.h.

How was Postgres installed on the machine?



Brian

-Original Message-
From: Adrian Klaver 
Sent: Tuesday, February 18, 2020 3:49 PM
To: Bellrose, Brian ;
pgsql-general@lists.postgresql.org
Subject: [EXTERNAL]: Re: pglogical install errors openSUSE Leap 42.1

On 2/18/20 11:39 AM, Bellrose, Brian wrote:

In the process of trying to use pglogical to upgrade from 9.4 to 11.7.
Current OS is openSUSE Leap 42.1. Downloaded pglogical-2.2.0.tar
from


FYI 42.1 is coming up on 3 years past EOL so you might have general issues with 
out of date libraries.


2nsQuadrant site. I am getting the following error during make clean
all
command:


Did you follow the source install instructions here?:

https://urldefense.proofpoint.com/v2/url?u=https-3A__www.2ndquadrant.
c
om_en_resources_pglogical_pglogical-2Dinstallation-2Dinstructions_&d=
D
wID-g&c=pG3N8eJDEvizGbIy8hw-0w&r=Avd8jJaAOeUVJ3AmVEriBLvYqiK8qqaP7C8h
u
ZnWyCI&m=1vh2nbBIrcqphzYV4i690_hEEZuRS71Da5SClwjBbOw&s=1O6j3zKQdkp8RT
u
GPAQPB44lQi_IV9goSuWDjl0pnqI&e=



o pglogical_worker.c

In file included from pglogical_worker.c:17:0:

/usr/include/pgsql/server/libpq/libpq-be.h:36:27: fatal error:
gssapi/gssapi.h: No such file or directory

#include 

   ^

compilation terminated.

: recipe for target 'pglogical_worker.o' failed

It appears that gssapi is Kerberos related. Just not exactly sure
what package I am missing and should install on the OS to get this
to compile. Currently I have only one gssapi related package
installed on this system

S | Name  | Summary  |
Type

--+---+--+

i | cyrus-sasl-gssapi | Plugin for the GSSAPI SASL mechanism |
package

Thanks,

Brian

/This email and any attachments are only for use by the intended
recipient(s) and may contain legally privileged, confidential,
proprietary or otherwise private information. Any unauthorized use,
reproduction, 

RE: [EXTERNAL]: Re: pglogical install errors openSUSE Leap 42.1

2020-02-18 Thread Bellrose, Brian
I found a repository that offered it and added the repo.
https://download.opensuse.org/repositories/home:vjt:ifad/openSUSE_Leap_42.1/home:vjt:ifad.repo

Only time will tell if that was a wise decision. I only need to it to get me 
through my upgrade. Moving all these to RHEL 8.1 and Postgres 11.7. Going to 
use pglogical to try and reduce downtime.

Brian

-Original Message-
From: Adrian Klaver 
Sent: Tuesday, February 18, 2020 5:00 PM
To: Bellrose, Brian ; 
pgsql-general@lists.postgresql.org
Subject: Re: [EXTERNAL]: Re: pglogical install errors openSUSE Leap 42.1

On 2/18/20 1:56 PM, Bellrose, Brian wrote:
> Yes,
>
> S | Name  | Summary   
>   | Type
> --+---+-+
> i | postgresql94  | Basic Clients and Utilities for PostgreSQL
>   | package
> i | postgresql94-contrib  | Contributed Extensions and Additions to 
> PostgreSQL  | package
> i | postgresql94-devel| PostgreSQL development header files and libraries 
>   | package
> i | postgresql94-plperl   | The PL/Tcl, PL/Perl, and  PL/Python procedural 
> languages for PostgreSQL | package
> i | postgresql94-plpython | The PL/Python Procedural Languages for PostgreSQL 
>   | package
> i | postgresql94-pltcl| PL/Tcl Procedural Language for PostgreSQL 
>   | package
> i | postgresql94-server   | The Programs Needed to Create and Run a 
> PostgreSQL Server   | package
> i | postgresql94-test | The test suite for PostgreSQL 
>   | packagep

Alright that looks good. You may still need to play Whack-a-Mole with devel 
libraries.

I am curious how you got to 9.4.25 via an update, given that this Postgres 
version was released well past the OS EOL?

>
> Brian
>
> -Original Message-
> From: Adrian Klaver 
> Sent: Tuesday, February 18, 2020 4:41 PM
> To: Bellrose, Brian ;
> pgsql-general@lists.postgresql.org
> Subject: Re: [EXTERNAL]: Re: pglogical install errors openSUSE Leap
> 42.1
>
> On 2/18/20 1:22 PM, Bellrose, Brian wrote:
>> I used zypper to install postgres. Postgres is fine... Running 9.4.25 that I 
>> updated today. So you have krb5-devel... Ok, good to know. Seems like that 
>> may be the missing link. At least I hope it is the only one.
>
> Was postgresql94-devel also installed?
>
>>
>> Brian
>>
>> -Original Message-
>> From: Adrian Klaver 
>> Sent: Tuesday, February 18, 2020 4:19 PM
>> To: Bellrose, Brian ;
>> pgsql-general@lists.postgresql.org
>> Subject: Re: [EXTERNAL]: Re: pglogical install errors openSUSE Leap
>> 42.1
>>
>> On 2/18/20 12:54 PM, Bellrose, Brian wrote:
>>> Yes, I understand that this OS is very old. I can't help that. I was handed 
>>> this. The reason I am trying to install pglogical is so that I can upgrade 
>>> and get off this OS. Our requirements are for limited downtime so pglocical 
>>> is best bet. At least I thought it was.
>>>
>>> Yes, I followed the source install doc. Can't be really called an install 
>>> doc when all it states is run a make. It has about three sentences that 
>>> encompass their complete install instructions from source. No documentation 
>>> on package dependencies or anything else or even what package do download. 
>>> I tried 2.2.1 first and it did not work. I have gotten farther with 2.2.0, 
>>> but I am getting what appears to be dependency errors. Might need to 
>>> install krb5-devel. Not 100% clear though.
>>
>> Well on my Leap 15.1 krb5-devel does provide gssapi.h.
>>
>> How was Postgres installed on the machine?
>>
>>>
>>> Brian
>>>
>>> -Original Message-
>>> From: Adrian Klaver 
>>> Sent: Tuesday, February 18, 2020 3:49 PM
>>> To: Bellrose, Brian ;
>>> pgsql-general@lists.postgresql.org
>>> Subject: [EXTERNAL]: Re: pglogical install errors openSUSE Leap 42.1
>>>
>>> On 2/18/20 11:39 AM, Bellrose, Brian wrote:
 In the process of trying to use pglogical to upgrade from 9.4 to 11.7.
 Current OS is openSUSE Leap 42.1. Downloaded pglogical-2.2.0.tar
 from
>>>
>>> FYI 42.1 is coming up on 3 years past EOL so you might have general issues 
>>> with out of date libraries.
>>>
 2nsQuadrant site. I am getting the following error during make
 clean all
 command:
>>>
>>> Did you follow the source install instructions here?:
>>>
>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.2ndquadrant.
>>> c
>>> om_en_resources_pglogical_pglogical-2Dinstallation-2Dinstructions_&d
>>> =
>>> D
>>> wID-g&c=pG3N8eJDEvizGbIy8hw-0w&r=Avd8jJaAOeUVJ3AmVEriBLvYqiK8qqaP7C8
>>> h
>>> u
>>> ZnWyCI&m=1vh2nbBIrcqphzYV4i690_hEEZuRS71Da5SClwjBbOw&s=1O6j3zKQdkp8R
>>> T
>>> u
>>> GPAQPB44lQi_IV9goSuWDjl0pnqI&e=
>>>

 o pglogical_worker.c

 In file included from pglogical_worker.c:17:0:

 /usr

Re: [EXTERNAL]: Re: pglogical install errors openSUSE Leap 42.1

2020-02-18 Thread Adrian Klaver

On 2/18/20 2:07 PM, Bellrose, Brian wrote:

I found a repository that offered it and added the repo.
https://download.opensuse.org/repositories/home:vjt:ifad/openSUSE_Leap_42.1/home:vjt:ifad.repo

Only time will tell if that was a wise decision. I only need to it to get me 
through my upgrade. Moving all these to RHEL 8.1 and Postgres 11.7. Going to 
use pglogical to try and reduce downtime.


Well that is interesting:

https://build.opensuse.org/project/show/home:vjt:ifad

a UN agency:

https://www.ifad.org/en/about




Brian






--
Adrian Klaver
adrian.kla...@aklaver.com




Re: policies and extensions

2020-02-18 Thread Marc Munro
On Tue, 2020-02-18 at 15:06 -0500, Stephen Frost wrote:
> 
> Policies, also being part of the overall privilege system, could
> certainly be looked at in a similar light as being different from
> triggers and indexes...

While I think I agree with Stephen here, I don't have a vested interest
 in any particular solution and am not advocating for change.  

I am kinda surprised that policies are not explicitly tracked as part
of an extension but I can live with the status quo now that it has been
explained.  

I think it *may* be worth stating something explicitly in the
documentation but again I am not advocating.

Thanks again.

__
Marc





Re: How to handle CASE statement with PostgreSQL without need for typecasting

2020-02-18 Thread Kyotaro Horiguchi
Hello.

At Tue, 18 Feb 2020 12:43:21 -0800, Adrian Klaver  
wrote in 
> test=> UPDATE t_update SET F1 = '02/23/2020'::unknown;
> UPDATE 1
> 
> test=> UPDATE t_update SET F1 = (CASE WHEN ('02/18/2020' IS NULL )
> THEN ('02/18/2020' ) ELSE ('02/19/2020') END)::unknown;
> ERROR: failed to find conversion function from unknown to timestamp
> without time zone
> 
> test=> UPDATE t_update SET F1 = (CASE WHEN ('02/18/2020' IS NULL )
> THEN ('02/18/2020' ) ELSE ('02/19/2020') END)::timestamp;
> UPDATE 1
> 
> So there is some sort of different evaluation going on in the CASE
> statement.

The documentation says:

https://www.postgresql.org/docs/10/sql-expressions.html#SQL-SYNTAX-TYPE-CASTS

> A cast applied to an unadorned string literal represents the initial
> assignment of a type to a literal constant value, and so it will
> succeed for any type (if the contents of the string literal are
> acceptable input syntax for the data type).
..
> However, automatic casting is only done for casts that are marked “OK
> to apply implicitly” in the system catalogs. Other casts must be
> invoked with explicit casting syntax. This restriction is intended to
> prevent surprising conversions from being applied silently.

Conversions from the type unkown is not registered in pg_cast.  Also
CREATE CAST on pseudo types like unknown is not allowed.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center