Slow or Cannot Connect to PostgreSQL Instance Service on Windows 10
Hi, I have PostgreSQL v12.3 (x64) installed on my Laptop running Windows 10 Home Single Language (64-bit). In two or three times since I fresh install the PostgreSQL and windows on 17-05-2020, 06:04:56 (GMT). By two or three times I mean, if this slow connection problem happen, than it wil occur in a view days in a row. Then it will return to normal with fast login/connection process. I've try to restart the laptop, restart the service but nothing give the sign to improve the slow login/connection process. I've also try to turn off the *log_hostname* config in *postgresql.conf* and try to turn off the *Windows Firewall, Windows Defender Real-Time Scanner* but nothing works to improve the slow login connection. I've also try to check the Postgres Log file but not much error shows in the log except for this error that appears a few time: 2020-07-22 14:43:22.312 +00 [13740] LOG: could not receive data from client: An existing connection was forcibly closed by the remote host. This problem happens with all of the application such as *psql*, *pgAdmin*, *Navicat*, all with the same symptoms of slow login/connection to my PostgreSQL v12.3 (x64) service and if connected, then it will be easy to disconnected. If needed my laptop specs are: * Intel Core i7-9750H * 16GB of RAM * Samsung SSD 970 EVO Plus 2TB Is database size can affect this connection time required to start a database session? FYI one of my database has size of 209GB, but currently I'm not using or connect to that database. Thanks in advance. Regards, Surya
Re: Slow or Cannot Connect to PostgreSQL Instance Service on Windows 10
On 23-07-2020 02:07, Adrian Klaver wrote: On 7/22/20 10:24 AM, Surya Widyanto wrote: Hi, I have PostgreSQL v12.3 (x64) installed on my Laptop running Windows 10 Home Single Language (64-bit). In two or three times since I fresh install the PostgreSQL and windows on 17-05-2020, 06:04:56 (GMT). By two or three times I mean, if this slow connection problem happen, than it wil occur in a view days in a row. Then it will return to normal with fast login/connection process. I've try to restart the laptop, restart the service but nothing give the sign to improve the slow login/connection process. I've also try to turn off the *log_hostname* config in *postgresql.conf* and try to turn off the *Windows Firewall, Windows Defender Real-Time Scanner* but nothing works to improve the slow login connection. I've also try to check the Postgres Log file but not much error shows in the log except for this error that appears a few time: 2020-07-22 14:43:22.312 +00 [13740] LOG: could not receive data from client: An existing connection was forcibly closed by the remote host. Is the database server you are connecting to on the laptop or some other machine? The Database is on the same machine/laptop, I try to connect using *localhost* and *127.0.0.1*, both have the same slow connection problem. Where is this Postgres log? The path of the log is on *\log\postgresql-%Y-%m-%d_%H%M%S.log* Is there any config that I can change to get more verbose log information to trace and debug the connection problem? This problem happens with all of the application such as *psql*, *pgAdmin*, *Navicat*, all with the same symptoms of slow login/connection to my PostgreSQL v12.3 (x64) service and if connected, then it will be easy to disconnected. If needed my laptop specs are: * Intel Core i7-9750H * 16GB of RAM * Samsung SSD 970 EVO Plus 2TB Is database size can affect this connection time required to start a database session? No, a connection does not read the entire database. FYI one of my database has size of 209GB, but currently I'm not using or connect to that database. Thanks in advance. Regards, Surya
Re: Slow or Cannot Connect to PostgreSQL Instance Service on Windows 10
On 23-07-2020 05:26, Adrian Klaver wrote: On 7/22/20 10:24 AM, Surya Widyanto wrote: Hi, I have PostgreSQL v12.3 (x64) installed on my Laptop running Windows 10 Home Single Language (64-bit). In two or three times since I fresh install the PostgreSQL and windows on 17-05-2020, 06:04:56 (GMT). Meant to ask earlier, where did you install Postgres from? I've download the installer executable from https://www.enterprisedb.com/downloads/postgres-postgresql-downloads, the Windows x86-64 version. Then I've install it on my Windows with binaries path to *"C:\Program Files\PostgreSQL\12\" *and for data path to *"H:\PostgreSQL\Data\12.x\"*. Both *C:* and *H:* drive are partition on my NVMe PCIe Gen. 3 x 4 SSD Drive mentioned earlier. For additional information, I've also install the *PostGIS v3.0 r15475 (x64)* for *PostgreSQL v12.* ** By two or three times I mean, if this slow connection problem happen, than it wil occur in a view days in a row. Then it will return to normal with fast login/connection process. Regards, Surya
Re: Slow or Cannot Connect to PostgreSQL Instance Service on Windows 10
On 23-07-2020 06:12, Rob Sargent wrote: On Jul 22, 2020, at 4:58 PM, Surya Widyanto <mailto:ayru...@gmail.com>> wrote: On 23-07-2020 05:26, Adrian Klaver wrote: On 7/22/20 10:24 AM, Surya Widyanto wrote: Hi, I have PostgreSQL v12.3 (x64) installed on my Laptop running Windows 10 Home Single Language (64-bit). In two or three times since I fresh install the PostgreSQL and windows on 17-05-2020, 06:04:56 (GMT). Meant to ask earlier, where did you install Postgres from? I've download the installer executable from https://www.enterprisedb.com/downloads/postgres-postgresql-downloads, the Windows x86-64 version. Then I've install it on my Windows with binaries path to *"C:\Program Files\PostgreSQL\12\" *and for data path to *"H:\PostgreSQL\Data\12.x\"*. Both *C:* and *H:* drive are partition on my NVMe PCIe Gen. 3 x 4 SSD Drive mentioned earlier. For additional information, I've also install the *PostGIS v3.0 r15475 (x64)* for *PostgreSQL v12.* By two or three times I mean, if this slow connection problem happen, than it wil occur in a view days in a row. Then it will return to normal with fast login/connection process. Regards, Surya Is there by any chance a correlation between your physical location and the slowness episodes? Any AV software in play? Since this COVID-19 outbreak, I'm working from home. I've try to use different internet connection to test, one with wired connection internet provider on my house, and the other are 4G cellular connection internet from my smartphone and both internet connection I use give the same effect of slow and easy to drop/disconnect connection to PostgreSQL. For additional information, I've also had this problem when connectiong from PHP Application, so that total 4 apps I try to connect with PostgreSQL (psql, pgAdmin, Navicat, PHP Application Connection) I'm not installing any AntiVirus software, the only installed AntiVirus software are WIndows Defender that came with Microsoft Windows. (Currently I'm Disabling the real time scan on windows defender) After I activate the DEBUG5 for *log_min_messages* and *log_min_error_statement*, another line of log came up with the other log line I mentioned earlier: 2020-07-22 23:31:29.065 +00 [postgres@postgres] - 127.0.0.1(10191) - [1724] (psql) LOG: could not receive data from client: An existing connection was forcibly closed by the remote host. 2020-07-22 23:31:29.065 +00 [postgres@postgres] - 127.0.0.1(10191) - [1724] (psql) DEBUG: unexpected EOF on client connection
Re: [SOLUTION] Slow or Cannot Connect to PostgreSQL Instance Service on Windows 10
On 24-07-2020 06:16, Adrian Klaver wrote: On 7/22/20 4:49 PM, Surya Widyanto wrote: On 23-07-2020 06:12, Rob Sargent wrote: On Jul 22, 2020, at 4:58 PM, Surya Widyanto <mailto:ayru...@gmail.com>> wrote: On 23-07-2020 05:26, Adrian Klaver wrote: On 7/22/20 10:24 AM, Surya Widyanto wrote: Hi, I have PostgreSQL v12.3 (x64) installed on my Laptop running Windows 10 Home Single Language (64-bit). In two or three times since I fresh install the PostgreSQL and windows on 17-05-2020, 06:04:56 (GMT). Meant to ask earlier, where did you install Postgres from? I've download the installer executable from https://www.enterprisedb.com/downloads/postgres-postgresql-downloads, the Windows x86-64 version. Then I've install it on my Windows with binaries path to *"C:\Program Files\PostgreSQL\12\" *and for data path to *"H:\PostgreSQL\Data\12.x\"*. Both *C:* and *H:* drive are partition on my NVMe PCIe Gen. 3 x 4 SSD Drive mentioned earlier. For additional information, I've also install the *PostGIS v3.0 r15475 (x64)* for *PostgreSQL v12.* By two or three times I mean, if this slow connection problem happen, than it wil occur in a view days in a row. Then it will return to normal with fast login/connection process. Regards, Surya Is there by any chance a correlation between your physical location and the slowness episodes? Any AV software in play? Since this COVID-19 outbreak, I'm working from home. I've try to use different internet connection to test, one with wired connection internet provider on my house, and the other are 4G cellular connection internet from my smartphone and both internet connection I use give the same effect of slow and easy to drop/disconnect connection to PostgreSQL. I thought you said earlier you where only connecting to the database on your laptop at localhost?: Yes it is a local connection using TCP on port 5432 using local loopback adapter localhost or IP address 127.0.0.1. "The Database is on the same machine/laptop, I try to connect using localhost and 127.0.0.1, both have the same slow connection problem." So Internet connection should not be of concern here or is there more to this story? Yes, I've also try to disconnect from internet connection, and there is no change on the connection behaviour. It is still slow to connect to the database and easily dropped the connection. For additional information, I've also had this problem when connectiong from PHP Application, so that total 4 apps I try to connect with PostgreSQL (psql, pgAdmin, Navicat, PHP Application Connection) I'm not installing any AntiVirus software, the only installed AntiVirus software are WIndows Defender that came with Microsoft Windows. (Currently I'm Disabling the real time scan on windows defender) After I activate the DEBUG5 for *log_min_messages* and *log_min_error_statement*, another line of log came up with the other log line I mentioned earlier: 2020-07-22 23:31:29.065 +00 [postgres@postgres] - 127.0.0.1(10191) - [1724] (psql) LOG: could not receive data from client: An existing connection was forcibly closed by the remote host. 2020-07-22 23:31:29.065 +00 [postgres@postgres] - 127.0.0.1(10191) - [1724] (psql) DEBUG: unexpected EOF on client connection After so much trial and error I've finally able to solve the problem with my connection to my local PostgreSQL server on my laptop. After I'm managed to fully disable any Windows Defender and Windows Firewall services, I'm now able to connect to my PostgreSQL server quickly and without any dropped connection like before. The error of *DEBUG: unexpected EOF on client connectio**n *based on my research on the internet are caused by suddenly dropped connection between PostgreSQL client apps with the PostgreSQL serve. and most of the case of dropped connection are caused by some kind of firewall in the system. Thanks to Adrian Klaver and Rob Sargent for giving me insight to solve the problem. Regards, Surya
Re: Best Open Source OS for Postgresql
Hi, From 2019, I've been using AlmaLinux from version 8.4 up to now version 8.7. This January, I've been trying to upgrade PostgreSQL from v14.6 to v15.1. When I install PostgreSQL v14.6 along side with v15.1 in the same server, it run without trouble at all, but because I'm using the PostGIS extension, there is one package *ogr_fdw_14 *than cannot be along side with the *ogr_fdw_15 *version, specifically on this file: Error: Transaction test error: file /usr/lib/.build-id/a0/a43182caa55ed9d3562e2d9b74a1dda150e2c4 from install of ogr_fdw_15-1.1.3-1.rhel8.x86_64 conflicts with file from package ogr_fdw_14-1.1.3-1.rhel8.x86_64 because of this problem, I'm currently stuck on upgrading the PostgreSQL to v15.1. Last week, on my development server I can install the *ogr_fdw_15 *on by using manual extraction of the RPM package to each individual directory with exception the conflicted file, and the extension is successfully installed and detected on the PostgreSQL v15.1. Next weekend, I planned on upgrading the production server to v15.1 using the same method, unless anyone here can show me other method than manually extracting the RPM package. May be someone here on this mailing-list have access to the package manager that build the *ogr_fdw_14 *and *ogr_fdw_15* package, and release the package update to resolve the conflicted file, I'll be waiting for the package release update before I rollout the update to my production server. Best Regards, Surya Widyanto On 31-01-2023 15:02, Giovanni Biscontini wrote: Hello everyone, we're looking for a Open Source alternative to Rhel for our VM server dedicated to Postgresql (14->15) installations. We're testing Alma, Rocky, and Oracle distributions as they're compatible with Rhel package systems. Can you share your experience on a similar choice? Thanks in advance and best regards, Giovanni -- *Cordiali Saluti - Best Regards* ***Dott. Giovanni Biscontini* * [Divisone Software]* **WEB: https://www.es2000.it <http://www.es2000.it/> Privacy e riservatezza: il presente messaggio, così come i relativi allegati, contengono dati ed informazioni da considerarsi strettamente riservate ed è indirizzato esclusivamente al destinatario sopra indicato, il quale è l'unico autorizzato a trattarlo in osservanza delle norme del Regolamento UE 2016/679 (RGPD) . Preghiamo chiunque ricevesse questo messaggio per errore di evitare di copiarlo, divulgarlo, distribuirlo a terzi e di dare notizia al mittente dell’errato invio, distruggendone poi l'eventuale copia cartacea e la copia in formato elettronico. Il titolare dei dati potrà esercitare tutti i diritti di cui all'art.7 del suddetto decreto tra cui quelli di accesso, rettifica, aggiornamento, opposizione al trattamento e cancellazione *Please, print this e-mail only if necessary*
Can't Compile PostgreSQL v17.2 on Windows 11 with Meson/Ninja
Hi, I need to compile my own PostgreSQL v17.2 binary on Windows platform, so far I've manage to run the Meson successfully with output below: The Meson build system Version: 1.6.1 Source dir: K:\Compile\postgresql-17.2 Build dir: K:\Compile\postgresql-17.2\build Build type: native build Project name: postgresql Project version: 17.2 Activating VS 17.11.6 C compiler for the host machine: cl (msvc 19.41.34123 "Microsoft (R) C/C++ Optimizing Compiler Version 19.41.34123 for x64") C linker for the host machine: link link 14.41.34123.0 Host machine cpu family: x86_64 Host machine cpu: x86_64 Run-time dependency threads found: YES Library ws2_32 found: YES Library secur32 found: YES Program perl found: YES (D:\Users\surya\AppData\Local\activestate\cache\bin\perl.BAT) Program python found: YES (C:\Python39\python.EXE) Program win_flex found: YES 2.6.4 2.6.4 (K:\Shared Program Files\Win-Flex\win_flex.EXE) Program win_bison found: YES 2.7 2.7 (K:\Shared Program Files\Win-Flex\win_bison.EXE) Program gsed sed found: NO Program prove found: YES (D:\Users\surya\AppData\Local\activestate\cache\bin\prove.BAT) Program tar found: YES (C:\Windows\system32\tar.EXE) Program gzip found: NO Program lz4 found: NO Program openssl found: YES (C:\Program Files\OpenSSL-Win64\bin\openssl.EXE) Program zstd found: NO Program dtrace skipped: feature dtrace disabled Program config/missing found: YES (sh K:\Compile\postgresql-17.2\config/missing) Program cp found: NO Program xmllint found: NO Program xsltproc found: NO Program wget found: YES (K:\Shared Program Files\System-Internal\wget.EXE) Program C:\Python39\Scripts\meson found: YES (C:\Python39\Scripts\meson.exe) Check usable header "bsd_auth.h" : NO Check usable header "dns_sd.h" : NO Program fop found: NO Did not find pkg-config by name 'pkg-config' Found pkg-config: NO Found CMake: C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.EXE (3.29.5) Run-time dependency krb5-gssapi found: NO (tried pkgconfig and cmake) Checking for size of "void *" : 8 Library gssapi64 found: NO Library krb5_64 found: NO Library comerr64 found: NO Library wldap32 found: YES Compiler for language cpp skipped: feature llvm disabled Run-time dependency icu-uc found: NO (tried pkgconfig and cmake) Run-time dependency icu found: NO (tried cmake) Run-time dependency libxml-2.0 found: NO (tried pkgconfig and cmake) Run-time dependency libxml2 found: NO (tried cmake) Run-time dependency libxslt found: NO (tried pkgconfig and cmake) Run-time dependency libxslt found: NO (tried cmake) Run-time dependency liblz4 found: NO (tried pkgconfig and cmake) Run-time dependency lz4 found: NO (tried cmake) Run-time dependency tcl found: NO (tried pkgconfig and cmake) Library tcl found: NO Has header "tcl.h" with dependency -ltcl: NO Run-time dependency pam found: NO (tried pkgconfig and cmake) Library pam found: NO Has header "perl.h" : YES WARNING: You should add the boolean check kwarg to the run_command call. It currently defaults to false, but it will default to true in meson 2.0. See also: https://github.com/mesonbuild/meson/issues/9300 Message: CCFLAGS recommended by perl: -DWIN32 -DWIN64 -DPERL_TEXTMODE_SCRIPTS -DMULTIPLICITY -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D__USE_MINGW_ANSI_STDIO -fwrapv -fno-strict-aliasing -mms-bitfields Message: CCFLAGS for embedding perl: -ID:\Users\surya\AppData\Local\ActiveState\cache\bcb6f752\lib/CORE -DWIN32 -DWIN64 -DPERL_TEXTMODE_SCRIPTS -DMULTIPLICITY -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPLPERL_HAVE_UID_GID -DNO_THREAD_SAFE_LOCALE Message: LDFLAGS for embedding perl: "" Checking if "libperl" : links: NO Message: disabling optional dependency plperl: missing libperl Program C:\Python39\python.EXE found: YES (C:\Python39\python.EXE) WARNING: Using a debug build type with MSVC or an MSVC-compatible compiler when the Python interpreter is not also a debug build will almost certainly result in a failed build. Prefer using a release build type or a debug Python interpreter. Run-time dependency python found: YES 3.9 Check usable header "Python.h" with dependency python: YES Run-time dependency readline found: NO (tried pkgconfig and cmake) Library readline found: NO Run-time dependency libedit found: NO (tried pkgconfig and cmake) Library libedit found: NO Dependency libselinux skipped: feature selinux disabled Dependency libsystemd skipped: feature systemd disabled Run-time dependency openssl (modules: OpenSSL::Crypto, OpenSSL::SSL) found: YES 3.0.5 Has header "openssl/ssl.h" with dependency OpenSSL: YES Has header "openssl/err.h" with dependency OpenSSL: YES Checking for function "CRYPTO_new_ex_data" with dependency OpenSSL: YES Checking for function "SSL_new" with dependency OpenSSL: YES Checking for function "SSL_CTX_set_cert_cb" with dependency OpenSSL: YES Checking for function "OPENSSL_init_ssl" with dependency OpenSSL: YES Checking for function "BIO_meth_new" with de