Re: postgres-10 with FIPS

2020-12-08 Thread Aravindhan Krishnan
Hi Community,

Can someone help me on the above request ?

* Would it be possible to share the configure command used in building the
standard postgres package ?
* We would like to build a debian package post the make -- would
checkinstall be the right tool for this purpose ?

Regards,
Aravindhan Krishnan...


On Fri, 4 Dec 2020 at 16:42, Aravindhan Krishnan 
wrote:

> Hi Michael,
>
> Thanks for the quick response. I will try this out.
>
> Would it be possible to share the configure command used in building the
> standard postgres package. There are quite a lot of knobs and we wanted to
> retain the same behaviour from postgres. I am assuming apart from this, I
> might need to set the LDFLAGS, CFLAGS knob to point to include and lib
> directories of FIPS compliant openssl library and includes. Also we would
> like to build a debian package post the make -- would checkinstall be the
> right tool for this purpose ?
>
> Thanks
>
> Regards,
> Aravindhan Krishnan...
>
>
> On Fri, 4 Dec 2020 at 11:13, Michael Paquier  wrote:
>
>> On Thu, Dec 03, 2020 at 05:57:04PM +0530, Aravindhan Krishnan wrote:
>> > Since postgres is linked against openssl we wanted to make sure we build
>> > postgres against the FIPS compliant openssl libraries. Does postgres
>> > provide a FIPS debian package that can be used. If not it would be of
>> great
>> > help to help with the instructions to build the debian of postgres
>> linked
>> > against the FIPS compliant openssl libraries.
>>
>> There is no need for Postgres to do anything specific with FIPS at
>> runtime, as long as the OS takes care of enabling FIPS and that
>> OpenSSL is able to recognize that.  So normally, you could just use a
>> version of Postgres compiled with OpenSSL 1.0.2, and replace the
>> libraries of OpenSSL with a version that is compiled with FIPS enabled
>> as the APIs of OpenSSL used by Postgres are exactly the same for the
>> non-FIPS and FIPS cases.
>> --
>> Michael
>>
>


Re: PL/java

2020-12-08 Thread David Goodenough
As of Java-16 there is a replacement for JNI which allows direct calling of 
native interfaces 
without the need for hand coded stub code.

On Monday, 7 December 2020 22:10:01 GMT Martin Gainty wrote:
> Nota Bene:
> Almost all official interfaces to/from Oracle are coded in Java
> FWIK google's implementations are 95% python
> (although you would need to understand JSON formatting for import/export
> requirements) for those reasons i tread lightly before disparaging either
> language
> 
> Going Forward:
> try to implement PL/SQL that rob/joshua mentioned
> if you're calling no-joy after implementing PL/SQL
> then we can take a look at interfacing to Postgres ETL binaries with a JNI
> interface provided the JNI is spot on with signatures for each referenced
> function
> 
> Un Saludo
> m
> 
> 
> From: Rob Sargent 
> Sent: Monday, December 7, 2020 11:16 AM
> To: pgsql-general@lists.postgresql.org 
> Subject: Re: PL/java
> 
> On 12/7/20 8:25 AM, Adrian Klaver wrote:
> > On 12/7/20 7:18 AM, Hemil Ruparel wrote:
> >> I want to say this. I never liked any extension language. It's like
> >> Java is not meant to interact with databases.
> > 
> > The JDBC folks might disagree.
> 
> That interaction is strictly sql to db, data to app.  As it should be.




Re: PL/java

2020-12-08 Thread Thomas Kellerer
Rob Sargent schrieb am 07.12.2020 um 23:22:
> If I'm tracking correctly I can say the java implementation of
> CopyManager is, to me, blindingly fast.  So if the E and the T are in
> java then certainly the L can be also.

I can confirm that using CopyManager in JDBC has pretty much the same 
performance
as using COPY ... FROM STDIN in e.g. psql

Thomas




Re: simple reporting tools for postgres in aws

2020-12-08 Thread Alexandre Arruda
Em seg., 7 de dez. de 2020 às 12:53, Chris Stephens 
escreveu:

> Hello,
>
> We have a need to display some very simple reports generated from views in
> an rds postgres database. We need little more functionality beyond simple
> filtering, column hiding, sorting, grouping. Anything much beyond that
> would be a strike against the tool.
>
> i'm looking for something similar to oracle application
> express's interactive reports (i come from an oracle background).
>
> i took a look at what's available from amazon's aws marketplace but
> quickly got overwhelmed. every application i saw was overkill.
>
> users will not be tech savvy. we have a tentative fallback plan to use
> excel with pages linked to views in the database but i'm looking for
> something a little more targeted.
>
> does anyone have any suggestions that fit the description above?
>
> thanks for any input,
> chris
>

Hi,

If you need dashboards, with a lot of widgets (chat, tabular, etc), take a
look at this awesome tool called Redash:

https://redash.io

Or if you need reports like Crystal Reports, you can use PRD - Pentaho
Reports Designer:

https://community.hitachivantara.com/s/article/pentaho-reporting

And publish them in a Pentaho B.I. Server.

Best regards,

Alexandre


Re: postgres-10 with FIPS

2020-12-08 Thread Tom Lane
Aravindhan Krishnan  writes:
> * Would it be possible to share the configure command used in building the
> standard postgres package ?

There is no "the standard" postgres package.  There's a different one
for every major platform or distro, and in some cases more than one
available from different people.  So really you'd have to go look at
the particular package you're using.  If this is on any open-source
platform (you did mention debian) the package source files should be
readily available to look at, and that would tell you what configure
options were used.

An even more direct way is to run "pg_config" from the package and
see what it prints.

regards, tom lane




Re: Potential BRIN Index Corruption

2020-12-08 Thread Huan Ruan
HI Alvaro

Unfortunately those records were written a while ago and we no longer keep
their WAL logs. Thanks for your help anyway.

Huan

On Fri, 27 Nov 2020 at 08:40, Huan Ruan  wrote:

> Thanks Alvaro for pointing me to pageinspect. I will give it a try and
>> report back. It might take a few days. I knew this module but have never
>> tried it before.
>>
>


Re: JDBC driver - is "getGeneratedKeys()" guaranteed to return the ids in the same order a batch insert was made?

2020-12-08 Thread Dave Cramer
On Sun, 6 Dec 2020 at 15:52, electrotype  wrote:

> Hi,
>
> Using JDBC, I batch insert multiple rows (*"executeBatch()*"). I then use
> *'**getGeneratedKeys("id")*' to get the generated ids ("id" is a "*SERIAL
> PRIMARY KEY*" column).
>
> My question: does the PostgreSQL JDBC driver *guarantees *that the order
> of the returned generated ids will be the same as the rows to insert have
> been specified, using "*addBatch()*"?
>
>
> The best "answer" to that question I have found is
> https://stackoverflow.com/a/16119489/843699 , but it is not 100% clear.
>
> Would it be possible to have an official answer on this?
>

I can't see how they could possibly be out of order.


Dave Cramer
www.postgres.rocks

>
> Thanks in advance!
>
>
>


Re: postgres-10 with FIPS

2020-12-08 Thread Aravindhan Krishnan
Hi Folks,

Thanks for the responses. Since the underlying knob flip is a paid version
and we are a SaaS based service provider, this might not align well with
our requirement and so wanted to build postgres-10 against FIPS compliant
ssl/crypto. The "pg_config" is of of great help in order to understand the
build time configure options.

Thank you.

Regards,
Aravindhan Krishnan...


On Wed, 9 Dec 2020 at 00:23, Tom Lane  wrote:

> Aravindhan Krishnan  writes:
> > * Would it be possible to share the configure command used in building
> the
> > standard postgres package ?
>
> There is no "the standard" postgres package.  There's a different one
> for every major platform or distro, and in some cases more than one
> available from different people.  So really you'd have to go look at
> the particular package you're using.  If this is on any open-source
> platform (you did mention debian) the package source files should be
> readily available to look at, and that would tell you what configure
> options were used.
>
> An even more direct way is to run "pg_config" from the package and
> see what it prints.
>
> regards, tom lane
>


Re: PL/java

2020-12-08 Thread Zé Rui Marques
Hi,

My concern is a purely commercial, in this case.

We work only for “large” companies. Only telecommunications operators (more 
than 5 million subscribers)

In this environment the “IBM / SAP / Accenture” effect is very strong - “I 
chose the leader, it is not my fault that it failed”

So, having something like PL/java when it is not “supported” by anyone with a 
markeatable name is always a barrier.

Furthermore, if it is not in the Postgres.org supported 
things, it will not be available in AWS RDS service, AWS Aurora, Azure xyz, 
Citus…, which limits our deployment options.

Thanks,

—
Zé Rui Marques

ze.rui.marq...@carrotincentives.com
+351 919507949

carrotincentives.com

On 07-12-2020, at 14:45, Adrian Klaver 
mailto:adrian.kla...@aklaver.com>> wrote:

On 12/7/20 3:25 AM, Zé Rui Marques wrote:
Hi,
I am the lead architect in a small firm that develops a very specialised ETL 
platform.
Traditionally, we have used Oracle and PL-SQL, and we are now porting 
everything to Postgres.
All of our code outside of the database is java and I wiash that all of our 
code within the database to be also in java.
The PL/java “add-on” is not supported directly by Postgres.
I would like to ask if there is a plan to include it as an official procedural 
language. If so, when?

None that I have heard of. Even if the decision where to made today it would 
likely a couple of years before it would be included, so that is not going to 
help you. What is your concern?

Thanks,
*—*
*Zé Rui Marques*


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