PostgreSQL C++ Interface version 14.9 using static library instead of shared library

2023-10-20 Thread M Tarkeshwar Rao
Hi

While compiling PostgreSQL C++ Interface version 14.9 . Found that libpq.so is 
getting created with libssl.a and libcrypto.a instead of shared library 
libssl.so and libcrypto.so.
It is created like below:
user@seli[postgres/14.9/lib]$ ldd libpq.so
linux-vdso.so.1 (0x7ffe67fed000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x7efcf11b3000)
libc.so.6 => /lib64/libc.so.6 (0x7efcf0df8000)
/lib64/ld-linux-x86-64.so.2 (0x7efcf1b26000)

However it should use ssl and crypto as shared library like following:

Same when we compiled for 14.8, Its ldd out shows following:
user@seli[postgres/14.8/lib]$ ldd libpq.so
linux-vdso.so.1 (0x7ffcf715d000)
libssl.so.3 => 
/scm/FE/SW_3pp_cm/em21_9/sles/15/openssl/3.1.2/lib64/libssl.so.3 
(0x7f23066f8000)
libcrypto.so.3 => 
/scm/FE/SW_3pp_cm/em21_9/sles/15/openssl/3.1.2/lib64/libcrypto.so.3 
(0x7f2305fb3000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x7f2305d94000)
libc.so.6 => /lib64/libc.so.6 (0x7f23059d9000)
libdl.so.2 => /lib64/libdl.so.2 (0x7f23057d5000)
/lib64/ld-linux-x86-64.so.2 (0x7f2306bee000)

Any suggestion and feedback , why it is taking static library instead of shared 
object ?
Also there is the size difference of libpq.so. in 14.8 it is around 320 kb and 
in 14.9 it is around 6 mb.

Thanks
Tarkeshwar









pgagent download link missing

2023-10-20 Thread B Liu
Hi there,

I tried to download latest pgagent for windows, but there is no link on
this page, https://www.pgadmin.org/download/pgagent-windows/
Did I miss anything?

Thanks

Bin


Re: pgagent download link missing

2023-10-20 Thread Daniel Gustafsson
> On 20 Oct 2023, at 13:04, B Liu  wrote:

> I tried to download latest pgagent for windows, but there is no link on this 
> page, https://www.pgadmin.org/download/pgagent-windows/

This list is for general questions around postgres and the PostgreSQL project,
and might not be monitored by pgadmin developers.  Reaching out to the relevant
pgadmin list is likely a better way to get answers:

https://www.pgadmin.org/support/list/

--
Daniel Gustafsson





Re: pgagent download link missing

2023-10-20 Thread Adrian Klaver

On 10/20/23 04:04, B Liu wrote:

Hi there,

I tried to download latest pgagent for windows, but there is no link on 
this page, https://www.pgadmin.org/download/pgagent-windows/ 


Did I miss anything?


Yes the below from the link you posted:

"pgAgent is available as a StackBuilder add-on package if you use EDB's 
Installers for Windows. "




Thanks

Bin


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





Re: A few questions about foreign tables

2023-10-20 Thread Marcin Borkowski


On 2023-10-18, at 17:56, Laurenz Albe  wrote:

> On Wed, 2023-10-18 at 10:24 +0200, Marcin Borkowski wrote:
>> How to revert the effect of "import foreign schema"? Is just dropping
>> the imported tables enough?
>
> Running DROP FOREIGN TABLE ... for all imported tables is enough.
>
>> Also, how can I check the definitions (i.e., what tables on the server
>> they correspond to) of existing foreign tables?
>
> \d+ 

Thanks.

>> (May I ask to be cc'd since I'm not subscribed to the list?)
>
> But please reply to the list.

Of course.

-- 
Marcin Borkowski
http://mbork.pl




Re: A few questions about foreign tables

2023-10-20 Thread Marcin Borkowski


On 2023-10-18, at 18:14, Ron  wrote:

> And SELECT relnamespace::regnamespace::text, relname FROM pg_class
> WHERE relkind='f'; tells you all of the foreign tables.
>
> Thus, this (untested) query generate all of the DROP FOREIGN TABLE statements:
> SELECT format('DROP FOREIGN TABLE IF EXISTS %I.%I RESTRICT;'
>  , relnamespace::regnamespace::text, relname)
> FROM pg_class WHERE relkind='f'
> ORDER BY relkind;

Thanks, though happily I only have about a dozen of them, so I could
create these by hand (well, actually by some automation features of my
text editor).

Best,

-- 
Marcin Borkowski
http://mbork.pl




Re: PostgreSQL C++ Interface version 14.9 using static library instead of shared library

2023-10-20 Thread Tom Lane
M Tarkeshwar Rao  writes:
> While compiling PostgreSQL C++ Interface version 14.9 . Found that libpq.so 
> is getting created with libssl.a and libcrypto.a instead of shared library 
> libssl.so and libcrypto.so.

I don't see that happening here ...

$ ldd libpq.so.5.14 
linux-vdso.so.1 (0x7ffea6b41000)
libssl.so.1.1 => /lib64/libssl.so.1.1 (0x7fc3be4b1000)
libcrypto.so.1.1 => /lib64/libcrypto.so.1.1 (0x7fc3bdfc7000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x7fc3bdda7000)
libc.so.6 => /lib64/libc.so.6 (0x7fc3bd9e2000)
libz.so.1 => /lib64/libz.so.1 (0x7fc3bd7ca000)
libdl.so.2 => /lib64/libdl.so.2 (0x7fc3bd5c6000)
/lib64/ld-linux-x86-64.so.2 (0x7fc3be991000)

$ size libpq.so.5.14 
   textdata bss dec hex filename
 295038   12388 480  307906   4b2c2 libpq.so.5.14

It seems likely that there's some oddity in your build environment.
Maybe the libssl.so and libcrypto.so symlinks aren't present?  Or take
a close look at the command that links libpq.so, and see if any odd
switches have crept in.

regards, tom lane




Re: Is postgres_fdw "safe"?

2023-10-20 Thread Adrian Klaver

On 10/20/23 01:29, Marcin Borkowski wrote:

Hello,

I noticed that the docs for postgres_fdw lack the clause about it being
"trusted".  Does that mean that `create extension postgres_fdw` poses
any known security risks?  If so, what should I do to minimize them?


It allows connections to a database, so the same risks as any other 
client that does the same thing.




TIA,



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





Is postgres_fdw "safe"?

2023-10-20 Thread Marcin Borkowski
Hello,

I noticed that the docs for postgres_fdw lack the clause about it being
"trusted".  Does that mean that `create extension postgres_fdw` poses
any known security risks?  If so, what should I do to minimize them?

TIA,

-- 
Marcin Borkowski
http://mbork.pl




Re: Is postgres_fdw "safe"?

2023-10-20 Thread Ron

On 10/20/23 03:29, Marcin Borkowski wrote:

Hello,

I noticed that the docs for postgres_fdw lack the clause about it being
"trusted".  Does that mean that `create extension postgres_fdw` poses
any known security risks?  If so, what should I do to minimize them?


I think a better question to ask is if extensions are implicitly trusted 
unless explicitly marked untrusted.


--
Born in Arizona, moved to Babylonia.




Re: Is postgres_fdw "safe"?

2023-10-20 Thread Tom Lane
Marcin Borkowski  writes:
> I noticed that the docs for postgres_fdw lack the clause about it being
> "trusted".  Does that mean that `create extension postgres_fdw` poses
> any known security risks?  If so, what should I do to minimize them?

It's a definitional question I guess.  We don't mark anything trusted
if it can be used to cause outside-the-database effects; and in this
case the ability to connect to other databases qualifies as that.

regards, tom lane