Re: [GENERAL] PostgreSQL walsender process doesn't exist after "pg_ctl stop -m fast"

2017-11-13 Thread Michael Paquier
On Tue, Nov 14, 2017 at 12:05 AM, Tom Lane  wrote:
> y39chen  writes:
>> We encounter one problem that PostgreSQL walsender process doesn't exist
>> after "pg_ctl stop -m fast".
>> Uses PostgreSQL 9.6.2
>
> There was a fix in 9.6.4 that's at least related to this problem.
> It would be interesting to see if you can still reproduce it on
> current 9.6.

Commit that may matter here:
commit: e9d4aa594f2caa8c28d55c41c9926420b1efdb79
author: Tom Lane 
date: Fri, 30 Jun 2017 12:00:03 -0400
Fix walsender to exit promptly if client requests shutdown.

It's possible for WalSndWaitForWal to be asked to wait for WAL that doesn't
exist yet.  That's fine, in fact it's the normal situation if we're caught
up; but when the client requests shutdown we should not keep waiting.
The previous coding could wait indefinitely if the source server was idle.

In passing, improve the rather weak comments in this area, and slightly
rearrange some related code for better readability.

Back-patch to 9.4 where this code was introduced.

Discussion: https://postgr.es/m/14154.1498781...@sss.pgh.pa.us
-- 
Michael


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] PostgreSQL walsender process doesn't exist after "pg_ctl stop -m fast"

2017-11-13 Thread Tom Lane
y39chen  writes:
> We encounter one problem that PostgreSQL walsender process doesn't exist
> after "pg_ctl stop -m fast".
> Uses PostgreSQL 9.6.2
 
There was a fix in 9.6.4 that's at least related to this problem.
It would be interesting to see if you can still reproduce it on
current 9.6.

regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] PostgreSQL walsender process doesn't exist after "pg_ctl stop -m fast"

2017-11-13 Thread y39chen
We encounter one problem that PostgreSQL walsender process doesn't exist
after "pg_ctl stop -m fast".
Uses PostgreSQL 9.6.2
Steps:
1)active postgres server  is up;
2)standby postgres intance take pg_basebackup 
3)usin command "pg_ctl stop -W -m fast -D /mnt/db/DBTestPostgres/db_data" to
stop active postgres server;
4)active postgres server can't stop successfully. It hanging by walsender
process and can't exit (we wait about 10min)
5)kill -9 walsender process, it exit right now. 

1. make postgres coredump, the log as bellow
  
 Stack trace of thread 2288:
 #0  0x7f7fae6ea013 __select
(libc.so.6)
 #1  0x0046df6b
ServerLoop (postgres)
 #2  0x0060d528
PostmasterMain (postgres)
 #3  0x0046f2dc main
(postgres)
 #4  0x7f7fae62a461
__libc_start_main (libc.so.6)
 #5  0x0046f35a _start
(postgres)

Nov 10 10:08:02 mn-1 systemd-coredump[8994]: Process 2645 (postgres) of user
550 dumped core.
 
 Stack trace of thread 2645:
 #0  0x7f7fae6f1d63
epoll_wait (libc.so.6)
 #1  0x0063ce69
WaitEventSetWait (postgres)
 #2  0x0063d1ab
WaitLatchOrSocket (postgres)
 #3  0x00622ead
WalSndLoop (postgres)
 #4  0x00623a8f
exec_replication_command (postgres)
 #5  0x006558fd
PostgresMain (postgres)
 #6  0x0046e631
ServerLoop (postgres)
 #7  0x0060d528
PostmasterMain (postgres)
 #8  0x0046f2dc main
(postgres)
 #9  0x7f7fae62a461
__libc_start_main (libc.so.6)
 #10 0x0046f35a _start
(postgres)


2. active postgres intance log:

Nov 09 12:29:53 mn-1 postgres[6073]: [3-1] DEBUG:  autovacuum: processing
database "DBTestPostgres"
Nov 09 12:30:13 mn-1 postgres[6204]: [3-1] DEBUG:  autovacuum: processing
database "postgreswd"
Nov 09 12:30:20 mn-1 postgres[2231]: [35-1] DEBUG:  checkpoint sync:
number=1 file=base/16385/16467 time=14.990 msec
Nov 09 12:30:20 mn-1 postgres[2231]: [36-1] LOG:  checkpoint complete: wrote
1065 buffers (6.5%); 0 transaction log file(s) added, 0 removed, 2 recycled;
write=59.892 s, sync=0.015 s, total=59.927 s; sync files=1, longest=0.014 s,
average=0.014 s; distance=12487 kB, estimate=19411 kB
Nov 09 12:30:20 mn-1 postgres[2231]: [37-1] LOG:  checkpoint starting: force
wait
Nov 09 12:30:20 mn-1 postgres[2231]: [38-1] DEBUG:  performing replication
slot checkpoint
Nov 09 12:30:21 mn-1 postgres[2231]: [39-1] DEBUG:  checkpoint sync:
number=1 file=base/16385/16467 time=59.400 msec
Nov 09 12:30:21 mn-1 postgres[2231]: [40-1] LOG:  checkpoint complete: wrote
1 buffers (0.0%); 0 transaction log file(s) added, 0 removed, 0 recycled;
write=1.102 s, sync=0.059 s, total=1.168 s; sync files=1, longest=0.059 s,
average=0.059 s; distance=3900 kB, estimate=17860 kB
Nov 09 12:30:23 mn-1 postgres[2235]: [28-1] DEBUG:  archived transaction log
file "00020193"
Nov 09 12:30:23 mn-1 postgres[2235]: [29-1] DEBUG:  archived transaction log
file "00020193.0108.backup"
Nov 09 12:30:24 mn-1 postgres[6263]: [3-1] DEBUG:  received replication
command: IDENTIFY_SYSTEM
Nov 09 12:30:24 mn-1 postgres[6263]: [4-1] DEBUG:  received replication
command: START_REPLICATION 0/6500 TIMELINE 2
Nov 09 12:30:24 mn-1 postgres[6263]: [5-1] DEBUG:  standby "walreceiver" has
now caught up with primary

Nov 09 12:30:24 mn-1 dbim-postgres[2039]: [2039-139870943506432] 
/opt/nokia/libexec/SS_RCPPostgress/bin/pg_ctl stop -W -m fast -D
/mnt/db/DBTestPostgres/db_data
Nov 09 12:30:24 mn-1 postgres[2157]: [3-1] LOG:  received fast shutdown
request
Nov 09 12:30:24 mn-1 postgres[2157]: [4-1] LOG:  aborting any active
transactions
Nov 09 12:30:24 mn-1 postgres[6073]: [4-1] err-2:  terminating autovacuum
process due to administrator command
Nov 09 12:30:24 mn-1 postgres[2234]: [3-1] LOG:  autovacuum launcher
shutting down
Nov 09 12:30:24 mn-1 postgres[2231]: [41-1] LOG:  shutting down
..
Nov 09 12:30:44 mn-1 postgres[6408]: [5-1] err-2:  the database system is
shutting down
Nov 09 12:30:46 mn-1 postgres[6411]: [5-1] err-2:  the database system is
shutting down
Nov 09 12:30:48 mn-1 postgres[6415]: [5-1] 

Re: [GENERAL] Postgresql and github

2017-11-09 Thread Jeremy Schneider
Hi Poul, and thanks for using PostgreSQL!  I've also been a very heavy
user of Oracle and now a heavy user of PostgreSQL.

I remember the days before Oracle acquired the RMAN software and
bundled it with their database.  Not so long ago, doing backups on
Oracle wasn't so different from PostgreSQL; either you did
storage-level snapshots or you used sql to begin/end backup.  At that
time there were many 3rd party tools for managing Oracle backups, much
like the situation with PostgreSQL today.  You can write your own
scripts for backup and recovery, or if you want a polished interface
then you can use any of the free or commercial PostgreSQL backup and
recovery tools on the market.

PostgreSQL certainly does have the advanced 24/7 backup and
point-in-time recovery capabilities that you should expect in any
serious database.  I would also include 2nd Quadrant's "pglogical"
replication extension which enables near zero-downtime major version
upgrades, similar to what you might do with GoldenGate on Oracle.

Regarding ansible, the Oracle playbook you referenced was published by
Mikael Sandström from Sweden. He and I have both worked on the RAC
Attack project and I remember talking with him about those Ansible
scripts when he first published them! He's not an Oracle employee but
just a community contributor. There are also lots of people
contributing PostgreSQL roles in Ansible Galaxy (backed by GitHub).  I
see over 300 Ansible roles; does the link below work for you?

https://galaxy.ansible.com/list#/roles?page=1_size=10=postgres

You're certainly right that we could use more step-by-step examples
for new users to PostgreSQL.  As you continue learning, I hope you'll
continue to share what stands out to you.  You might even consider
writing some blog posts yourself - I would love to read them and pass
them along to other new users!  And if you find any errors in the
official PostgreSQL documentation, by all means let us know and we
will address them.

Looking forward to hearing more from you!

-Jeremy


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Postgresql and github

2017-11-09 Thread Poul Kristensen
Dear friends,

The reason I posted this:

For the last 6 months I have noticed the enormous numbers of github's
raising on the Internet.
For the last 10 years I have worked with Oracle(yes expensive)and
Postgresql(from version 8.4!) and I am familiar conserning the _big_
difference between the to database environments. Good and not so good.
Administration well Oracle is easier because of
the instance/backup/restore(point in time) crontrolled by itselr.
Postgresql does not have that kind of stuff - I mean backup/restore(pointin
time
controlled by _itself_. But it is free and free of charge. But is not 24/7
when upgrading.
Therefore:
To make administration easier for your customers I suggest to establish a
github with different possibilites, showing how to upgrade minor/major
in 24/7 enviroments especially the restore(point in time) as a "build in"
method liek Oracle'srman. I have been told by a consultant that
pgBackRest is recommended. But it is not buildin in the way Oracle's rman.
Sorry if i got out of the scope of my mail. And sorry for my demands.:)
BTW: why are PG databases visible by all users (prompt: \l)


Thanks
Poul







2017-11-09 19:00 GMT+01:00 Steve Atkins :

>
> > On Nov 9, 2017, at 9:37 AM, Poul Kristensen  wrote:
> >
> > No it isn't.
> >
> > What I want to do is:
> >
> > ansible-playbook   somepostgresql.yml
> >
> > and postgresql is then changed on some server
> > the way things are done by e.g.
> > github.com/oravirt/ansible-oracle
>
> You're looking for help with an Ansible recipe, not with anything to do
> with PostgreSQL itself.
>
> Mentioning it here, in case someone already has one, is worth a try but
> you're likely going to need to go talk to the Ansible people. Or write your
> own.
>
> Cheers,
>   Steve
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>



-- 
Med venlig hilsen / Best regards
Poul Kristensen
Linux-OS/Virtualizationexpert and Oracle DBA


Re: [GENERAL] Postgresql and github

2017-11-09 Thread Steve Atkins

> On Nov 9, 2017, at 9:37 AM, Poul Kristensen  wrote:
> 
> No it isn't.
> 
> What I want to do is:
> 
> ansible-playbook   somepostgresql.yml 
> 
> and postgresql is then changed on some server
> the way things are done by e.g.
> github.com/oravirt/ansible-oracle 

You're looking for help with an Ansible recipe, not with anything to do with 
PostgreSQL itself.

Mentioning it here, in case someone already has one, is worth a try but you're 
likely going to need to go talk to the Ansible people. Or write your own.

Cheers,
  Steve



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Postgresql and github

2017-11-09 Thread Nicklas Avén
On Thu, 2017-11-09 at 12:27 +0100, Poul Kristensen wrote:
> Hi!
> 
> How come that Postgresql is not present in a github with latest
> release?
> 
> It would be very convenient to deploy PG using Ansible.
> 
> Oracle(latest release) is available through github.
> 
> TIA
> 
> Poul
> 

How can you say Oracle is present on github?
In the link in your last post it clearly states that "You'll need to
manually download the Oracle software and make it available to the
control-machine (either locally or on a web-server, or through a nfs-
share) before running the playbook."


As I understand it ansible is just some deployment automation?


PostgreSQL is available as binaries and sources from a lot of places,
but Oracle is not, or am I missing something here?



Regards


Nicklas Avén

Re: [GENERAL] Postgresql and github

2017-11-09 Thread Poul Kristensen
No it isn't.

What I want to do is:

ansible-playbook   somepostgresql.yml

and postgresql is then changed on some server
the way things are done by e.g.
github.com/oravirt/ansible-oracle

Thanks
Poul



2017-11-09 17:18 GMT+01:00 Igal @ Lucee.org :

> On 11/9/2017 3:27 AM, Poul Kristensen wrote:
>
> How come that Postgresql is not present in a github with latest release?
>
>
> What do you mean?  Is this not what you're referring to:
> https://github.com/postgres/postgres/releases
> ?
>
> Igal Sapir
> Lucee Core Developer
> Lucee.org 
>



-- 
Med venlig hilsen / Best regards
Poul Kristensen
Linux-OS/Virtualizationexpert and Oracle DBA


Re: [GENERAL] Postgresql and github

2017-11-09 Thread Igal @ Lucee.org

On 11/9/2017 3:27 AM, Poul Kristensen wrote:

How come that Postgresql is not present in a github with latest release?


What do you mean?  Is this not what you're referring to:
    https://github.com/postgres/postgres/releases
?

Igal Sapir
Lucee Core Developer
Lucee.org 



Re: [GENERAL] Postgresql and github

2017-11-09 Thread Michael Paquier
On Thu, Nov 9, 2017 at 8:27 PM, Poul Kristensen  wrote:
> How come that Postgresql is not present in a github with latest release?
>
> It would be very convenient to deploy PG using Ansible.
>
> Oracle(latest release) is available through github.

You are looking for that, which is a mirror of the official repository
in git.postgresql.org:
https://github.com/postgres/postgres
There is as well a section with release tarballs (so do the facilities
offered by community by the way).
-- 
Michael


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Postgresql and github

2017-11-09 Thread Poul Kristensen
Hi!

How come that Postgresql is not present in a github with latest release?

It would be very convenient to deploy PG using Ansible.

Oracle(latest release) is available through github.

TIA

Poul


[GENERAL] PostgreSQL 9.5 showing unexpected behavior when installed with different locale other than default

2017-11-08 Thread Mayank Agrawal
Hi,

On Windows 7, I am trying to install PostgreSQL 9.5 (
*postgresql-9.5.2-1-windows-x64.exe*) with different locales, but it is
getting installed with default locale only, which is, `*English_United
States.1252*`. I tried both the methods, GUI and unattended/silent, but the
results are same.

I followed the below steps:

1. Set the locale of system to the particular locale, for ex. `*English,
Australia*`.
2. Restarted the system.
3. Installed PostgreSQL using following command using parameter `*--locale*
`:

* start /w postgresql-9.5.2-1-windows-x64.exe --mode unattended
--unattendedmodeui none --superaccount "postgres" --superpassword
"postgrespwd" --prefix "C:\Program Files\PostgreSQL\9.5" --datadir
"C:\Program Files\PostgreSQL\9.5\data" --serverport "5432"
--install_runtimes 1 --locale "English, Australia"*

4. Executed the command:  `*Show lc_collate*` and got the output as
`*English_United
States.1252*`

Similarly, I followed the same steps while installing through GUI mode
(selected option `English, Australia`) and got the same unexpected output.

Here is the important logs from PostgreSQL log file bitrock_installer.log
(GUI mode):


Executing cscript //NoLogo "C:\Program
Files\PostgreSQL\9.5/installer/server/initcluster.vbs" "NT
AUTHORITY\NetworkService" "postgres" "" "C:\Program
Files\PostgreSQL\9.5" "C:\Program Files\PostgreSQL\9.5\data" 5432 "English,
Australia" 0
Script exit code: 0
.
.
.
The database cluster will be initialized with locale "English_United
States.1252".

5. When I selected `*[Default Locale]*` in GUI mode (PostgreSQL 9.5), then
only it got installed with `*English, Australia*` locale. Output of command
`*Show lc_collate*` was `*English_Australia.1252*`

When I installed PostgreSQL 8.4.8 under same conditions (in GUI mode),
there were no issues with that. It got installed with locale English,
Australia.

Any idea, what can be the reason behind this?


Thanks and Regards,
Mayank Agrawal


.


Re: [GENERAL] Postgresql 9.3 service doesn't start on RedHat Linux 6.8

2017-11-06 Thread John R Pierce

On 11/6/2017 5:28 AM, Vikas Sharma wrote:
I am having issues in starting up postgresql service on RHEL 6.8, It 
was all working fine yesterday but now it doesn't start and throws 
error - same kind of error that is received connecting to remote 
postgres database.


what /exact/ error is it throwing ?



for the meantime I have started postgresql as below -
/usr/pgsql-9.3/bin/postmaster  -D /var/lib/pgsql/9.3/data &
and it is working fine.

Can someone let me know where to look at for why I can't start the 
service?


whats in /var/lib/pgsql/9.3/pgstartup.log  and 
/var/lib/pgsql/9.3/data/(latest).log  ?



--
john r pierce, recycling bits in santa cruz



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Postgresql 9.3 service doesn't start on RedHat Linux 6.8

2017-11-06 Thread Vikas Sharma
Hi,

I am having issues in starting up postgresql service on RHEL 6.8, It was
all working fine yesterday but now it doesn't start and throws error - same
kind of error that is received connecting to remote postgres database.

for the meantime I have started postgresql as below -
/usr/pgsql-9.3/bin/postmaster  -D /var/lib/pgsql/9.3/data  &
and it is working fine.

Can someone let me know where to look at for why I can't start the service?

Thanks
Vikas


Re: [GENERAL] Postgresql CDC tool recommendations ?

2017-10-06 Thread Nico Williams
On Thu, Oct 05, 2017 at 10:28:31AM -0700, avi Singh wrote:
>  Any recommendation on a good CDC tool that can be used to push
> postgresql changes to Kafka in json format ?

There are quite a few WAL->JSON type tools out there.  E.g.,
https://github.com/eulerto/wal2json

I expect this to improve with PG 10 logical replication.

You can easily add the bit that pushes those JSON texts to Kafka.

Nico
-- 


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Postgresql CDC tool recommendations ?

2017-10-05 Thread Steve Atkins

> On Oct 5, 2017, at 10:28 AM, avi Singh  wrote:
> 
> Guys
>  Any recommendation on a good CDC tool that can be used to push 
> postgresql changes to Kafka in json format ?

Not sure whether json is a constraint, but I'd look at http://debezium.io  and 
(maybe) the no longer supported https://github.com/confluentinc/bottledwater-pg

Cheers,
  Steve

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Postgresql CDC tool recommendations ?

2017-10-05 Thread avi Singh
Guys
 Any recommendation on a good CDC tool that can be used to push
postgresql changes to Kafka in json format ?

Thanks
Avi


Re: [GENERAL] PostgreSQL COPY Statement Error On Linux

2017-09-12 Thread Francisco Olarte
George:

On Tue, Sep 12, 2017 at 6:40 PM, George Neuner  wrote:
> Francisco already pointed out that Linux doesn't understand the
> backslashes in the file path, however it should be noted that Windows
> *does* understand forward slashes and that [modulo disk names in
> Windows] you can use forward slash paths on both systems.

That's not strictly correct. Linus understand backslahes in paths
fine, they are just not a directory separator ( there are only two
reserved byte values in path names, IIRC, slash for dir sep and nul
for string end, C issues ). Windows, OTOH, inherits path separator
logic from MSDOS 2.0, and if it hasn't changed in the last fifteen
years treats any slash as a separator.

But the issue is that windos treats a \\netname\resource prefix as a
network request, and transform it internally, while linux does not. In
*ix you have to connect to
the machine and mount its resources first, similarly to what you do
with local disks. Normally //x is treated the same as /x, or as x:

folarte@n:~$ ls -ldi /tmp //tmp ///tmp
655361 drwxrwxrwt 14 root root 45056 Sep 12 19:17 /tmp
655361 drwxrwxrwt 14 root root 45056 Sep 12 19:17 //tmp
655361 drwxrwxrwt 14 root root 45056 Sep 12 19:17 ///tmp

Francisco Olarte.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] PostgreSQL COPY Statement Error On Linux

2017-09-12 Thread George Neuner
On Tue, 12 Sep 2017 11:30:02 +0100, Osahon Oduware
 wrote:

>I am trying to utilize the "COPY" statement below to copy a .CSV file to a
>table in a PostgreSQL database.:
>*COPY .() FROM
>'\\shared\network\path\to\csv\test.csv' DELIMITER ',' CSV HEADER;*
>
>This works with a PostgreSQL database installed in a WINDOWS environment
>(Windows 7), but fails with the following error with a similar PostgreSQL
>database in a Linux environment (Centos 7):
>*org.postgresql.util.PSQLException: ERROR: could not open file
>"\\shared\network\path\to\csv\test.csv" for reading: No such file or
>directory*
>

Francisco already pointed out that Linux doesn't understand the
backslashes in the file path, however it should be noted that Windows
*does* understand forward slashes and that [modulo disk names in
Windows] you can use forward slash paths on both systems.

George



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] PostgreSQL COPY Statement Error On Linux

2017-09-12 Thread Osahon Oduware
Hi Francisco,

Thanks for your response. I would try this out and give you feedback.

On Tue, Sep 12, 2017 at 12:00 PM, Francisco Olarte 
wrote:

> On Tue, Sep 12, 2017 at 12:30 PM, Osahon Oduware 
> wrote:
> > I am trying to utilize the "COPY" statement below to copy a .CSV file to
> a
> > table in a PostgreSQL database.:
> > COPY .() FROM
> > '\\shared\network\path\to\csv\test.csv' DELIMITER ',' CSV HEADER;
> >
> > This works with a PostgreSQL database installed in a WINDOWS environment
> > (Windows 7), but fails with the following error with a similar PostgreSQL
> > database in a Linux environment (Centos 7):
> > org.postgresql.util.PSQLException: ERROR: could not open file
> > "\\shared\network\path\to\csv\test.csv" for reading: No such file or
> > directory
> >
> > I have granted READ access to EVERYONE on the CSV folder on the network
> path
> > as depicted in the attached image.
> > Could someone point me to the reason for the failure in Linux?
>
> You are invoking server side copy. This means the SERVER neads to be
> able to access the file under the name you've given to it.
>
> The network path you have given is valid on windows machines ( UNC
> path? It's been a decade an a half since Iast used windows ), but not
> on linux. Typically on linux you mount the shared folder /some/where
> and type the path as /some/where/path/to/csv/test.csv.
>
> You may be needing a CLIENT copy. I do not see which client program
> you are using, it may be some fancy GUI stuff, in which case I cannot
> help you. If you are using the standard "psql" tool you can just use
> \copy. As explained in the docs this just does "copy from stdin" ( or
> to stdout ) on the client side and redirects the file you give in the
> command line ( or you can issue a [psql ... -c "copy ...from stdin"]
> in a command line and feed the file via shell redirections, but, IIRC,
> windows shells are terrible at quoting arguments and redirecting i/o,
> so it may be better to avoid it).
>
> Francisco Olarte.
>


Re: [GENERAL] PostgreSQL COPY Statement Error On Linux

2017-09-12 Thread Osahon Oduware
Hi Charles,

Thanks for your response. I would try this out and give you feedback.

On Tue, Sep 12, 2017 at 12:01 PM, Charles Clavadetscher <
clavadetsc...@swisspug.org> wrote:

> Hello
>
>
>
> *From:* pgsql-general-ow...@postgresql.org [mailto:pgsql-general-owner@
> postgresql.org] *On Behalf Of *Osahon Oduware
> *Sent:* Dienstag, 12. September 2017 12:30
> *To:* pgsql-general@postgresql.org
> *Subject:* [GENERAL] PostgreSQL COPY Statement Error On Linux
>
>
>
> Hi All,
>
> I am trying to utilize the "COPY" statement below to copy a .CSV file to a
> table in a PostgreSQL database.:
> *COPY .() FROM
> '\\shared\network\path\to\csv\test.csv' DELIMITER ',' CSV HEADER;*
>
> This works with a PostgreSQL database installed in a WINDOWS environment
> (Windows 7), but fails with the following error with a similar PostgreSQL
> database in a Linux environment (Centos 7):
> *org.postgresql.util.PSQLException: ERROR: could not open file
> "\\shared\network\path\to\csv\test.csv" for reading: No such file or
> directory*
>
> It looks like the share is not visible for the Linux system. You probably
> need to mount it first using Samba and then access it through the mount
> point using slashes instead of bakslashes: /
>
> Instructions on how to mount a Windows share in Linux can be found on the
> internet. Since I am not an expert on this myself, I can’t give you more
> concrete instructions.
>
>
>
> This may help: http://www.serverlab.ca/tutorials/linux/storage-file-
> systems-linux/mounting-smb-shares-centos-7/
>
>
>
> An alternative would be to copy the file to the Linux system using e.g.
> scp of sftp and the load it locally.
>
>
>
> Hope this helps.
>
> Bye
>
> Charles
>
>
> I have granted READ access to EVERYONE on the CSV folder on the network
> path as depicted in the attached image.
>
> Could someone point me to the reason for the failure in Linux?
>


Re: [GENERAL] PostgreSQL COPY Statement Error On Linux

2017-09-12 Thread Francisco Olarte
On Tue, Sep 12, 2017 at 12:30 PM, Osahon Oduware  wrote:
> I am trying to utilize the "COPY" statement below to copy a .CSV file to a
> table in a PostgreSQL database.:
> COPY .() FROM
> '\\shared\network\path\to\csv\test.csv' DELIMITER ',' CSV HEADER;
>
> This works with a PostgreSQL database installed in a WINDOWS environment
> (Windows 7), but fails with the following error with a similar PostgreSQL
> database in a Linux environment (Centos 7):
> org.postgresql.util.PSQLException: ERROR: could not open file
> "\\shared\network\path\to\csv\test.csv" for reading: No such file or
> directory
>
> I have granted READ access to EVERYONE on the CSV folder on the network path
> as depicted in the attached image.
> Could someone point me to the reason for the failure in Linux?

You are invoking server side copy. This means the SERVER neads to be
able to access the file under the name you've given to it.

The network path you have given is valid on windows machines ( UNC
path? It's been a decade an a half since Iast used windows ), but not
on linux. Typically on linux you mount the shared folder /some/where
and type the path as /some/where/path/to/csv/test.csv.

You may be needing a CLIENT copy. I do not see which client program
you are using, it may be some fancy GUI stuff, in which case I cannot
help you. If you are using the standard "psql" tool you can just use
\copy. As explained in the docs this just does "copy from stdin" ( or
to stdout ) on the client side and redirects the file you give in the
command line ( or you can issue a [psql ... -c "copy ...from stdin"]
in a command line and feed the file via shell redirections, but, IIRC,
windows shells are terrible at quoting arguments and redirecting i/o,
so it may be better to avoid it).

Francisco Olarte.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] PostgreSQL COPY Statement Error On Linux

2017-09-12 Thread Charles Clavadetscher
Hello

 

From: pgsql-general-ow...@postgresql.org 
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Osahon Oduware
Sent: Dienstag, 12. September 2017 12:30
To: pgsql-general@postgresql.org
Subject: [GENERAL] PostgreSQL COPY Statement Error On Linux

 

Hi All,

I am trying to utilize the "COPY" statement below to copy a .CSV file to a 
table in a PostgreSQL database.:
COPY .() FROM 
'\\shared\network\path\to\csv\test.csv' DELIMITER ',' CSV HEADER;

This works with a PostgreSQL database installed in a WINDOWS environment 
(Windows 7), but fails with the following error with a similar PostgreSQL 
database in a Linux environment (Centos 7):
org.postgresql.util.PSQLException: ERROR: could not open file 
"\\shared\network\path\to\csv\test.csv 
 " for reading: No such file or 
directory



It looks like the share is not visible for the Linux system. You probably need 
to mount it first using Samba and then access it through the mount point using 
slashes instead of bakslashes: /

Instructions on how to mount a Windows share in Linux can be found on the 
internet. Since I am not an expert on this myself, I can’t give you more 
concrete instructions.

 

This may help: 
http://www.serverlab.ca/tutorials/linux/storage-file-systems-linux/mounting-smb-shares-centos-7/

 

An alternative would be to copy the file to the Linux system using e.g. scp of 
sftp and the load it locally.

 

Hope this helps.

Bye

Charles


I have granted READ access to EVERYONE on the CSV folder on the network path as 
depicted in the attached image. 

Could someone point me to the reason for the failure in Linux?



[GENERAL] PostgreSQL COPY Statement Error On Linux

2017-09-12 Thread Osahon Oduware
Hi All,

I am trying to utilize the "COPY" statement below to copy a .CSV file to a
table in a PostgreSQL database.:
*COPY .() FROM
'\\shared\network\path\to\csv\test.csv' DELIMITER ',' CSV HEADER;*

This works with a PostgreSQL database installed in a WINDOWS environment
(Windows 7), but fails with the following error with a similar PostgreSQL
database in a Linux environment (Centos 7):
*org.postgresql.util.PSQLException: ERROR: could not open file
"\\shared\network\path\to\csv\test.csv" for reading: No such file or
directory*

I have granted READ access to EVERYONE on the CSV folder on the network
path as depicted in the attached image.

Could someone point me to the reason for the failure in Linux?

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Postgresql init and cleanup module functions

2017-09-06 Thread Yan Pas
Sorry, replied only to direct sender, duplicating to both sender and
mailing list
*---*
*MSG1:*
Thanks you, that is what I was looking for!

I was testing sample module and found it's behavior odd:
1. functions have few permissions, they even were not able to create file
in "/tmp" directory. At least I'm able to use pglog (ereport(LOG,
(errmsg("init")));)
2. _PG_init() is called separately for each connection right before any of
the module's function is called by the client, so there are many instances
of the module
3. For cleaning up I've use trick with standard 'atexit' function, called
inside _PG_init() and it works properly
4. Global object's constructor and destructor are called on module unload.

I thought it works like "dlopen on postgres start, dlclose on postgres
shutdown". I think I should stick to background worker process which will
provide some C-Postgres functions
*---*
*MSG2:*
After reading bg workers' manual it seems to me that they cannot provide
postgres functions. So the only way to achieve ONE global state and
postgres functions using this state is to use some IPC between background
process and dynamicaly loadable module (e.g. Unix/TCP sockets)

Regards, Yan


Re: [GENERAL] Postgresql init and cleanup module functions

2017-09-05 Thread Andres Freund
On 2017-09-05 20:15:57 +0300, Yan Pas wrote:
> I'm writing C postgresql module with some psql-functions and global state.
> Do module API provide any init and cleanup functions? If yes then it would
> be fine to see them in "35.9. C-Language Functions" help page."

The relevant doc page is at
https://www.postgresql.org/docs/current/static/xfunc-c.html

what you're looking for is _PG_init(). There effectively is no cleanup
logic, as modules cannot be unloaded anymore.

- Andres


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Postgresql init and cleanup module functions

2017-09-05 Thread Yan Pas
High!

I'm writing C postgresql module with some psql-functions and global state.
Do module API provide any init and cleanup functions? If yes then it would
be fine to see them in "35.9. C-Language Functions" help page."

Regards, Yan


[GENERAL] PostgreSQL used in our network engine (SLikeNet)

2017-08-14 Thread Stefan Hett
Hi,

I'd just like to quickly reach out to let you know that we released a
new (open source) network engine in which we also utilize PostgreSQL and want 
to thank you for the work you put into the project.

PostgreSQL is utilized for two parts in the network engine:
- as an option for a backend db behind an autopatching system to allow 
synchronizing files between different peers
- as an option for a backend db behind a lobby system to handle/manage things 
like friends and room-management

In order to not have this acknowledgement mail be misinterpreted as an
advertisement mail from our side, I refrained from adding links to the
project pages. If you are interested in the project, feel free to send
me a mail and I'll give you the links to the project pages.

Please note that I'm not subscribed to the mailing list and would appreciate if 
you could CC me directly if you choose to reply to this mail.

-- 
Regards,
Stefan Hett, CEO SLikeSoft

SLikeSoft UG (haftungsbeschränkt), Dresdener Str. 8, 52068 Aachen, Germany
Tel: +49 157 74050303
Geschäftsführer: Stefan Hett, Handelsregister Aachen HRB 20706



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)

2017-08-06 Thread Dan Cooperstock at Software4Nonprofits
Thanks, David, this was actually the most helpful suggestion. Using logging of 
SQL statements in Postgres, I was able to first determine that the style of 
quoting I was using in the PowerBuilder INI file wasn’t working, and then that 
the  variable wasn’t being expanded by PowerBuilder before sending 
the SQL to Postgres. The latter of which is a clear PowerBuilder problem, so I 
have submitted it to them as a bug.

 

So I think we can now put this to rest on this mailing list. Thanks, all.

 



Dan Cooperstock
DONATION and ACCOUNTS web site:  <http://www.Software4Nonprofits.com> 
http://www.Software4Nonprofits.com
Email:  <mailto:i...@software4nonprofits.com> i...@software4nonprofits.com
Phone: 416-423-7722
Mail: 57 Gledhill Ave., Toronto ON M4C 5K7, Canada

If you do not want to receive any further emails from Software4Nonprofits, 
please reply to this email with the subject line "UNSUBSCRIBE", and we will 
immediately remove you from our mailing list, if you are on it.



 

From: pgsql-general-ow...@postgresql.org 
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of David G. Johnston
Sent: August 6, 2017 3:47 AM
To: Dan Cooperstock at Software4Nonprofits <i...@software4nonprofits.com>
Cc: Forums postgresql <pgsql-general@postgresql.org>
Subject: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)

 

On Saturday, August 5, 2017, Dan Cooperstock at Software4Nonprofits 
<i...@software4nonprofits.com 
<javascript:_e(%7B%7D,'cvml','i...@software4nonprofits.com');> > wrote:

As I have mentioned in several replies, I have tested all of this code
directly in SQL statements and they work perfectly. It's only the
interaction with PowerBuilder that isn't working right, which is why I keep
saying that further answers from anyone that hasn't solved this problem of
using Postgres with PowerBuilder, and getting identity retrieval to work in
PowerBuilder, are not at this point worthwhile.

 

If it is PostgreSQL's problem you should be able to setup statement logging on 
the server and see what is happening at the SQL level.

 

David J.



[GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)

2017-08-06 Thread David G. Johnston
On Saturday, August 5, 2017, Dan Cooperstock at Software4Nonprofits <
i...@software4nonprofits.com
> wrote:
>
> As I have mentioned in several replies, I have tested all of this code
> directly in SQL statements and they work perfectly. It's only the
> interaction with PowerBuilder that isn't working right, which is why I keep
> saying that further answers from anyone that hasn't solved this problem of
> using Postgres with PowerBuilder, and getting identity retrieval to work in
> PowerBuilder, are not at this point worthwhile.
>

If it is PostgreSQL's problem you should be able to setup statement logging
on the server and see what is happening at the SQL level.

David J.


Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)

2017-08-05 Thread Igor Korot
Hi, Dan,

On Sat, Aug 5, 2017 at 8:52 PM, Dan Cooperstock at Software4Nonprofits
 wrote:
> No, Carl, when I created the sequence, I didn't put its name in double
> quotes, so therefore its name wasn't being forced to stay upper case. So in
> the nextval() command, putting it only in single quotes works - Postgres
> converts both the original creation and the reference to it to lower case.
>
> As I have mentioned in several replies, I have tested all of this code
> directly in SQL statements and they work perfectly. It's only the
> interaction with PowerBuilder that isn't working right, which is why I keep
> saying that further answers from anyone that hasn't solved this problem of
> using Postgres with PowerBuilder, and getting identity retrieval to work in
> PowerBuilder, are not at this point worthwhile.

Do you have this DW inside some Window object?
Further do you have those queey in responce to an event for DW or Window?
If yes - what kind?

Can you post a complete script? You can do a PM if anything.
I didn't work with PB + PG, but I do have some PB knowledge...

Thank you.

>
> 
> Dan Cooperstock
> DONATION and ACCOUNTS web site: http://www.Software4Nonprofits.com
> Email: i...@software4nonprofits.com
> Phone: 416-423-7722
> Mail: 57 Gledhill Ave., Toronto ON M4C 5K7, Canada
>
> If you do not want to receive any further emails from Software4Nonprofits,
> please reply to this email with the subject line "UNSUBSCRIBE", and we will
> immediately remove you from our mailing list, if you are on it.
>
>
> -Original Message-
> From: Karl Czajkowski [mailto:kar...@isi.edu]
> Sent: August 5, 2017 8:25 PM
> To: Dan Cooperstock at Software4Nonprofits 
> Cc: 'Rob Sargent' ; 'Forums postgresql'
> 
> Subject: Re: PostgreSQL with PowerBuilder, and Identity keys (serials)
>
>
>>   Select currval('GEN_')
>>
>
> From the above, I am assuming you did something like:
>
>CREATE SEQUENCE "GEN_" ...;
>
> and are trying to access this sequence?  If so, you actually have to include
> the SQL quoted identifier syntax within the text argument to
> currval() or nextval(), e.g.
>
>SELECT nextval('"GEN_"');
>
> With these sorts of identifier-as-argument parameters in Postgres, you can
> also include schema-qualification syntax:
>
>SELECT nextval('"My Schema"."GEN_"');
>
>
> Karl
>
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)

2017-08-05 Thread Dan Cooperstock at Software4Nonprofits
No, Carl, when I created the sequence, I didn't put its name in double
quotes, so therefore its name wasn't being forced to stay upper case. So in
the nextval() command, putting it only in single quotes works - Postgres
converts both the original creation and the reference to it to lower case.

As I have mentioned in several replies, I have tested all of this code
directly in SQL statements and they work perfectly. It's only the
interaction with PowerBuilder that isn't working right, which is why I keep
saying that further answers from anyone that hasn't solved this problem of
using Postgres with PowerBuilder, and getting identity retrieval to work in
PowerBuilder, are not at this point worthwhile.


Dan Cooperstock
DONATION and ACCOUNTS web site: http://www.Software4Nonprofits.com
Email: i...@software4nonprofits.com
Phone: 416-423-7722
Mail: 57 Gledhill Ave., Toronto ON M4C 5K7, Canada

If you do not want to receive any further emails from Software4Nonprofits,
please reply to this email with the subject line "UNSUBSCRIBE", and we will
immediately remove you from our mailing list, if you are on it.


-Original Message-
From: Karl Czajkowski [mailto:kar...@isi.edu] 
Sent: August 5, 2017 8:25 PM
To: Dan Cooperstock at Software4Nonprofits 
Cc: 'Rob Sargent' ; 'Forums postgresql'

Subject: Re: PostgreSQL with PowerBuilder, and Identity keys (serials)


>   Select currval('GEN_')
>

>From the above, I am assuming you did something like:

   CREATE SEQUENCE "GEN_" ...;

and are trying to access this sequence?  If so, you actually have to include
the SQL quoted identifier syntax within the text argument to
currval() or nextval(), e.g.

   SELECT nextval('"GEN_"');

With these sorts of identifier-as-argument parameters in Postgres, you can
also include schema-qualification syntax:

   SELECT nextval('"My Schema"."GEN_"');


Karl




-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)

2017-08-05 Thread Karl Czajkowski

>   Select currval('GEN_')
>

>From the above, I am assuming you did something like:

   CREATE SEQUENCE "GEN_" ...;

and are trying to access this sequence?  If so, you actually have to
include the SQL quoted identifier syntax within the text argument to
currval() or nextval(), e.g.

   SELECT nextval('"GEN_"');

With these sorts of identifier-as-argument parameters in Postgres, you
can also include schema-qualification syntax:

   SELECT nextval('"My Schema"."GEN_"');


Karl



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)

2017-08-05 Thread Rick Widmer

On 8/5/2017 6:06 PM, Dan Cooperstock at Software4Nonprofits wrote:
 (I wish Postgres had a web-based community board, 
rather than just this mailing list with no history available!) I will 
post it to Appeon as an actual bug if I get stuck.


Have you looked here?

https://www.postgresql.org/list/

or here:

https://www.postgresql.org/list/pgsql-general/


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)

2017-08-05 Thread Dan Cooperstock at Software4Nonprofits
Igor, PowerBuilder is now being sold and supported by Appeon, not SAP, and I 
have this question also on a community discussion board there, but so far no 
answers. (I wish Postgres had a web-based community board, rather than just 
this mailing list with no history available!) I will post it to Appeon as an 
actual bug if I get stuck.

 

Melvin, I created the schema, so I know for sure what the naming is, and as I 
mentioned in another answer, I have done exactly what PowerBuilder should be 
doing with direct SQL statements in Postgres and they work perfectly.

 

It’s currval() that can’t be called before nextval(). Nextval() can always be 
called, and is the only thing that should be being called in this situation.

 

I think I can assure you all that although I’m a newbie with Postgres, I have 
long experience with various SQL database servers, I have read the relevant 
parts of the Postgres docs thoroughly, and I know what’s going on with the 
sequence within it. The problem is clearly in whatever PowerBuilder is doing 
with Postgres, but I was just hoping someone on this list would have experience 
with that combination and know the answer.

 

I really think there is no point in anyone else replying to this thread unless 
you have experience with both programs together, and have solved this problem 
for yourself. Thanks.

 



Dan Cooperstock
DONATION and ACCOUNTS web site:  <http://www.Software4Nonprofits.com> 
http://www.Software4Nonprofits.com
Email:  <mailto:i...@software4nonprofits.com> i...@software4nonprofits.com
Phone: 416-423-7722
Mail: 57 Gledhill Ave., Toronto ON M4C 5K7, Canada

If you do not want to receive any further emails from Software4Nonprofits, 
please reply to this email with the subject line "UNSUBSCRIBE", and we will 
immediately remove you from our mailing list, if you are on it.



 

From: pgsql-general-ow...@postgresql.org 
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Melvin Davidson
Sent: August 5, 2017 7:05 PM
To: Igor Korot <ikoro...@gmail.com>
Cc: Dan Cooperstock at Software4Nonprofits <i...@software4nonprofits.com>; Rob 
Sargent <robjsarg...@gmail.com>; Forums postgresql 
<pgsql-general@postgresql.org>
Subject: Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)

 

 

On Sat, Aug 5, 2017 at 6:26 PM, Igor Korot <ikoro...@gmail.com 
<mailto:ikoro...@gmail.com> > wrote:

Hi,

Did you try bringing it to SAP?

Thank you.

On Sat, Aug 5, 2017 at 2:39 PM, Dan Cooperstock at Software4Nonprofits

<i...@software4nonprofits.com <mailto:i...@software4nonprofits.com> > wrote:
> Yes my direct SQL testing used all caps and worked fine.
>
> There is no error message. It's just that PowerBuilder's built-in mechanism 
> that should retrieve the identity key column's value after an insert is done 
> using its DataWindow control, that is based on the setting I gave in my first 
> post,
>
> GetIdentity="Select currval('GEN_')"
>
> isn't working - the value doesn't get filled in. I have no way of knowing 
> whether that code isn't getting called, isn't working, or what. (I tried a 
> trace option in PowerBuilder, and it didn't show any call to that code, but 
> it also didn't show any call to the corresponding code in my setup for 
> Firebird SQL, where this works perfectly.)
>
> I really need responses from people who have successfully done this with 
> PowerBuilder, because I think it's an issue about the combination of 
> PowerBuilder and PostgreSQL, not PostgreSQL alone.
>
> 
> Dan Cooperstock
> DONATION and ACCOUNTS web site: http://www.Software4Nonprofits.com
> Email: i...@software4nonprofits.com <mailto:i...@software4nonprofits.com> 
> Phone: 416-423-7722  
> Mail: 57 Gledhill Ave., Toronto ON M4C 5K7, Canada
>
> If you do not want to receive any further emails from Software4Nonprofits, 
> please reply to this email with the subject line "UNSUBSCRIBE", and we will 
> immediately remove you from our mailing list, if you are on it.
>
>
> -Original Message-
> From: Rob Sargent [mailto:robjsarg...@gmail.com 
> <mailto:robjsarg...@gmail.com> ]
> Sent: August 5, 2017 5:30 PM
> To: Dan Cooperstock at Software4Nonprofits <i...@software4nonprofits.com 
> <mailto:i...@software4nonprofits.com> >
> Cc: Forums postgresql <pgsql-general@postgresql.org 
> <mailto:pgsql-general@postgresql.org> >
> Subject: Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys 
> (serials)
>
>
>> On Aug 5, 2017, at 3:12 PM, Dan Cooperstock at Software4Nonprofits 
>> <i...@software4nonprofits.com <mailto:i...@software4nonprofits.com> > wrote:
>>
>> I’m on 

Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)

2017-08-05 Thread Melvin Davidson
On Sat, Aug 5, 2017 at 6:26 PM, Igor Korot <ikoro...@gmail.com> wrote:

> Hi,
>
> Did you try bringing it to SAP?
>
> Thank you.
>
> On Sat, Aug 5, 2017 at 2:39 PM, Dan Cooperstock at Software4Nonprofits
> <i...@software4nonprofits.com> wrote:
> > Yes my direct SQL testing used all caps and worked fine.
> >
> > There is no error message. It's just that PowerBuilder's built-in
> mechanism that should retrieve the identity key column's value after an
> insert is done using its DataWindow control, that is based on the setting I
> gave in my first post,
> >
> > GetIdentity="Select currval('GEN_')"
> >
> > isn't working - the value doesn't get filled in. I have no way of
> knowing whether that code isn't getting called, isn't working, or what. (I
> tried a trace option in PowerBuilder, and it didn't show any call to that
> code, but it also didn't show any call to the corresponding code in my
> setup for Firebird SQL, where this works perfectly.)
> >
> > I really need responses from people who have successfully done this with
> PowerBuilder, because I think it's an issue about the combination of
> PowerBuilder and PostgreSQL, not PostgreSQL alone.
> >
> > 
> > Dan Cooperstock
> > DONATION and ACCOUNTS web site: http://www.Software4Nonprofits.com
> > Email: i...@software4nonprofits.com
> > Phone: 416-423-7722
> > Mail: 57 Gledhill Ave., Toronto ON M4C 5K7, Canada
> >
> > If you do not want to receive any further emails from
> Software4Nonprofits, please reply to this email with the subject line
> "UNSUBSCRIBE", and we will immediately remove you from our mailing list, if
> you are on it.
> >
> >
> > -Original Message-
> > From: Rob Sargent [mailto:robjsarg...@gmail.com]
> > Sent: August 5, 2017 5:30 PM
> > To: Dan Cooperstock at Software4Nonprofits <i...@software4nonprofits.com
> >
> > Cc: Forums postgresql <pgsql-general@postgresql.org>
> > Subject: Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys
> (serials)
> >
> >
> >> On Aug 5, 2017, at 3:12 PM, Dan Cooperstock at Software4Nonprofits <
> i...@software4nonprofits.com> wrote:
> >>
> >> I’m on PostgreSQL 9.6, 64-bit Windows.
> >>
> >> That really is the correct name for the sequence, because I’m not using
> SERIAL. (I needed everything to match the naming in my existing DB I’m
> using for the app, Firebird SQL, so the changes to make it work with either
> DB would be as minimal as possible.) The setup of tables I’m using with
> this sort of thing are like the following example:
> >>
> >> CREATE SEQUENCE GEN_CATEGORY MINVALUE 0;
> >>
> >> CREATE TABLE CATEGORY(
> >>   CATEGORYNUMSMALLINT NOT NULL DEFAULT NEXTVAL('GEN_CATEGORY'),
> >>   DESCRIPTIONVARCHAR(20) NOT NULL,
> >>   CONSTRAINT PK_CATEGORY PRIMARY KEY (CATEGORYNUM) );
> >>
> >> So as you can see GEN_ plus the tablename is indeed correct. The
> default on the CATEGORYNUM column is definitely working, which I tested
> with direct SQL commands: after inserting a row (with the CATEGORYNUM not
> specified in the INSERT), if I SELECT currval(‘GEN_CATEGORY’), it gives me
> the correct value, which is also what got saved in that column.
> >>
> >> 
> >> Dan Cooperstock
> >> DONATION and ACCOUNTS web site: http://www.Software4Nonprofits.com
> >> Email: i...@software4nonprofits.com
> >> Phone: 416-423-7722
> >> Mail: 57 Gledhill Ave., Toronto ON M4C 5K7, Canada
> >>
> >> If you do not want to receive any further emails from
> Software4Nonprofits, please reply to this email with the subject line
> "UNSUBSCRIBE", and we will immediately remove you from our mailing list, if
> you are on it.
> >>
> >>
> >> From: Melvin Davidson [mailto:melvin6...@gmail.com]
> >> Sent: August 5, 2017 4:46 PM
> >> To: Dan Cooperstock at Software4Nonprofits
> >> <i...@software4nonprofits.com>
> >> Cc: pgsql-general@postgresql.org
> >> Subject: Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys
> >> (serials)
> >>
> >> >GetIdentity="Select currval('GEN_')"
> >>
> >> FYI, it would be helpful to specify the PostgreSQL version & O/S, but
> >> generically speaking, in PostgreSQL, when you generate a sequence by
> >> specifying serial as data type, the name takews the form of
> >> tab

Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)

2017-08-05 Thread Igor Korot
Hi,

Did you try bringing it to SAP?

Thank you.

On Sat, Aug 5, 2017 at 2:39 PM, Dan Cooperstock at Software4Nonprofits
<i...@software4nonprofits.com> wrote:
> Yes my direct SQL testing used all caps and worked fine.
>
> There is no error message. It's just that PowerBuilder's built-in mechanism 
> that should retrieve the identity key column's value after an insert is done 
> using its DataWindow control, that is based on the setting I gave in my first 
> post,
>
> GetIdentity="Select currval('GEN_')"
>
> isn't working - the value doesn't get filled in. I have no way of knowing 
> whether that code isn't getting called, isn't working, or what. (I tried a 
> trace option in PowerBuilder, and it didn't show any call to that code, but 
> it also didn't show any call to the corresponding code in my setup for 
> Firebird SQL, where this works perfectly.)
>
> I really need responses from people who have successfully done this with 
> PowerBuilder, because I think it's an issue about the combination of 
> PowerBuilder and PostgreSQL, not PostgreSQL alone.
>
> 
> Dan Cooperstock
> DONATION and ACCOUNTS web site: http://www.Software4Nonprofits.com
> Email: i...@software4nonprofits.com
> Phone: 416-423-7722
> Mail: 57 Gledhill Ave., Toronto ON M4C 5K7, Canada
>
> If you do not want to receive any further emails from Software4Nonprofits, 
> please reply to this email with the subject line "UNSUBSCRIBE", and we will 
> immediately remove you from our mailing list, if you are on it.
>
>
> -Original Message-
> From: Rob Sargent [mailto:robjsarg...@gmail.com]
> Sent: August 5, 2017 5:30 PM
> To: Dan Cooperstock at Software4Nonprofits <i...@software4nonprofits.com>
> Cc: Forums postgresql <pgsql-general@postgresql.org>
> Subject: Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys 
> (serials)
>
>
>> On Aug 5, 2017, at 3:12 PM, Dan Cooperstock at Software4Nonprofits 
>> <i...@software4nonprofits.com> wrote:
>>
>> I’m on PostgreSQL 9.6, 64-bit Windows.
>>
>> That really is the correct name for the sequence, because I’m not using 
>> SERIAL. (I needed everything to match the naming in my existing DB I’m using 
>> for the app, Firebird SQL, so the changes to make it work with either DB 
>> would be as minimal as possible.) The setup of tables I’m using with this 
>> sort of thing are like the following example:
>>
>> CREATE SEQUENCE GEN_CATEGORY MINVALUE 0;
>>
>> CREATE TABLE CATEGORY(
>>   CATEGORYNUMSMALLINT NOT NULL DEFAULT NEXTVAL('GEN_CATEGORY'),
>>   DESCRIPTIONVARCHAR(20) NOT NULL,
>>   CONSTRAINT PK_CATEGORY PRIMARY KEY (CATEGORYNUM) );
>>
>> So as you can see GEN_ plus the tablename is indeed correct. The default on 
>> the CATEGORYNUM column is definitely working, which I tested with direct SQL 
>> commands: after inserting a row (with the CATEGORYNUM not specified in the 
>> INSERT), if I SELECT currval(‘GEN_CATEGORY’), it gives me the correct value, 
>> which is also what got saved in that column.
>>
>> 
>> Dan Cooperstock
>> DONATION and ACCOUNTS web site: http://www.Software4Nonprofits.com
>> Email: i...@software4nonprofits.com
>> Phone: 416-423-7722
>> Mail: 57 Gledhill Ave., Toronto ON M4C 5K7, Canada
>>
>> If you do not want to receive any further emails from Software4Nonprofits, 
>> please reply to this email with the subject line "UNSUBSCRIBE", and we will 
>> immediately remove you from our mailing list, if you are on it.
>>
>>
>> From: Melvin Davidson [mailto:melvin6...@gmail.com]
>> Sent: August 5, 2017 4:46 PM
>> To: Dan Cooperstock at Software4Nonprofits
>> <i...@software4nonprofits.com>
>> Cc: pgsql-general@postgresql.org
>> Subject: Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys
>> (serials)
>>
>> >GetIdentity="Select currval('GEN_')"
>>
>> FYI, it would be helpful to specify the PostgreSQL version & O/S, but
>> generically speaking, in PostgreSQL, when you generate a sequence by
>> specifying serial as data type, the name takews the form of
>> tablename_columnname_seq, so in your case, try
>>
>> https://www.postgresql.org/docs/9.4/static/datatype-numeric.html#DATAT
>> YPE-SERIAL
>>
>> GetIdentity="Select currval('tablename_column_seq')".
>>
>> BTW, in PostgreSQL, it is NOT recommended to use mixed case object names, as 
>> all names are converted to lowercase unless enclosed in double quote

Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)

2017-08-05 Thread Dan Cooperstock at Software4Nonprofits
Yes my direct SQL testing used all caps and worked fine.

There is no error message. It's just that PowerBuilder's built-in mechanism 
that should retrieve the identity key column's value after an insert is done 
using its DataWindow control, that is based on the setting I gave in my first 
post, 

GetIdentity="Select currval('GEN_')"

isn't working - the value doesn't get filled in. I have no way of knowing 
whether that code isn't getting called, isn't working, or what. (I tried a 
trace option in PowerBuilder, and it didn't show any call to that code, but it 
also didn't show any call to the corresponding code in my setup for Firebird 
SQL, where this works perfectly.)

I really need responses from people who have successfully done this with 
PowerBuilder, because I think it's an issue about the combination of 
PowerBuilder and PostgreSQL, not PostgreSQL alone.


Dan Cooperstock
DONATION and ACCOUNTS web site: http://www.Software4Nonprofits.com
Email: i...@software4nonprofits.com
Phone: 416-423-7722
Mail: 57 Gledhill Ave., Toronto ON M4C 5K7, Canada

If you do not want to receive any further emails from Software4Nonprofits, 
please reply to this email with the subject line "UNSUBSCRIBE", and we will 
immediately remove you from our mailing list, if you are on it.


-Original Message-
From: Rob Sargent [mailto:robjsarg...@gmail.com] 
Sent: August 5, 2017 5:30 PM
To: Dan Cooperstock at Software4Nonprofits <i...@software4nonprofits.com>
Cc: Forums postgresql <pgsql-general@postgresql.org>
Subject: Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)


> On Aug 5, 2017, at 3:12 PM, Dan Cooperstock at Software4Nonprofits 
> <i...@software4nonprofits.com> wrote:
> 
> I’m on PostgreSQL 9.6, 64-bit Windows.
>  
> That really is the correct name for the sequence, because I’m not using 
> SERIAL. (I needed everything to match the naming in my existing DB I’m using 
> for the app, Firebird SQL, so the changes to make it work with either DB 
> would be as minimal as possible.) The setup of tables I’m using with this 
> sort of thing are like the following example:
>  
> CREATE SEQUENCE GEN_CATEGORY MINVALUE 0;
>  
> CREATE TABLE CATEGORY(
>   CATEGORYNUMSMALLINT NOT NULL DEFAULT NEXTVAL('GEN_CATEGORY'),
>   DESCRIPTIONVARCHAR(20) NOT NULL,
>   CONSTRAINT PK_CATEGORY PRIMARY KEY (CATEGORYNUM) );
>  
> So as you can see GEN_ plus the tablename is indeed correct. The default on 
> the CATEGORYNUM column is definitely working, which I tested with direct SQL 
> commands: after inserting a row (with the CATEGORYNUM not specified in the 
> INSERT), if I SELECT currval(‘GEN_CATEGORY’), it gives me the correct value, 
> which is also what got saved in that column.
>  
> 
> Dan Cooperstock
> DONATION and ACCOUNTS web site: http://www.Software4Nonprofits.com
> Email: i...@software4nonprofits.com
> Phone: 416-423-7722
> Mail: 57 Gledhill Ave., Toronto ON M4C 5K7, Canada
> 
> If you do not want to receive any further emails from Software4Nonprofits, 
> please reply to this email with the subject line "UNSUBSCRIBE", and we will 
> immediately remove you from our mailing list, if you are on it.
> 
>  
> From: Melvin Davidson [mailto:melvin6...@gmail.com]
> Sent: August 5, 2017 4:46 PM
> To: Dan Cooperstock at Software4Nonprofits 
> <i...@software4nonprofits.com>
> Cc: pgsql-general@postgresql.org
> Subject: Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys 
> (serials)
>  
> >GetIdentity="Select currval('GEN_')"
> 
> FYI, it would be helpful to specify the PostgreSQL version & O/S, but 
> generically speaking, in PostgreSQL, when you generate a sequence by 
> specifying serial as data type, the name takews the form of 
> tablename_columnname_seq, so in your case, try
> 
> https://www.postgresql.org/docs/9.4/static/datatype-numeric.html#DATAT
> YPE-SERIAL
> 
> GetIdentity="Select currval('tablename_column_seq')".
> 
> BTW, in PostgreSQL, it is NOT recommended to use mixed case object names, as 
> all names are converted to lowercase unless enclosed in double quotes.
> 
>  
> On Sat, Aug 5, 2017 at 4:09 PM, Dan Cooperstock at Software4Nonprofits 
> <i...@software4nonprofits.com> wrote:
>> I’m trying to get a Postgres DB version of an application I write in 
>> PowerBuilder working. The thing I’m stuck on is Identity keys – what you set 
>> up with the SERIAL attribute or SEQUENCEs / GENERATORs in Postgres.
>>  
>> I have the sequence set up and clearly working. And in PowerBuilder, I have 
>> added a section I found online to a file it uses to know how to deal

Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)

2017-08-05 Thread Rob Sargent

> On Aug 5, 2017, at 3:12 PM, Dan Cooperstock at Software4Nonprofits 
> <i...@software4nonprofits.com> wrote:
> 
> I’m on PostgreSQL 9.6, 64-bit Windows.
>  
> That really is the correct name for the sequence, because I’m not using 
> SERIAL. (I needed everything to match the naming in my existing DB I’m using 
> for the app, Firebird SQL, so the changes to make it work with either DB 
> would be as minimal as possible.) The setup of tables I’m using with this 
> sort of thing are like the following example:
>  
> CREATE SEQUENCE GEN_CATEGORY MINVALUE 0;
>  
> CREATE TABLE CATEGORY(
>   CATEGORYNUMSMALLINT NOT NULL DEFAULT NEXTVAL('GEN_CATEGORY'),
>   DESCRIPTIONVARCHAR(20) NOT NULL,
>   CONSTRAINT PK_CATEGORY PRIMARY KEY (CATEGORYNUM)
> );
>  
> So as you can see GEN_ plus the tablename is indeed correct. The default on 
> the CATEGORYNUM column is definitely working, which I tested with direct SQL 
> commands: after inserting a row (with the CATEGORYNUM not specified in the 
> INSERT), if I SELECT currval(‘GEN_CATEGORY’), it gives me the correct value, 
> which is also what got saved in that column.
>  
> 
> Dan Cooperstock
> DONATION and ACCOUNTS web site: http://www.Software4Nonprofits.com
> Email: i...@software4nonprofits.com
> Phone: 416-423-7722
> Mail: 57 Gledhill Ave., Toronto ON M4C 5K7, Canada
> 
> If you do not want to receive any further emails from Software4Nonprofits, 
> please reply to this email with the subject line "UNSUBSCRIBE", and we will 
> immediately remove you from our mailing list, if you are on it.
> 
>  
> From: Melvin Davidson [mailto:melvin6...@gmail.com] 
> Sent: August 5, 2017 4:46 PM
> To: Dan Cooperstock at Software4Nonprofits <i...@software4nonprofits.com>
> Cc: pgsql-general@postgresql.org
> Subject: Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys 
> (serials)
>  
> >GetIdentity="Select currval('GEN_')"
> 
> FYI, it would be helpful to specify the PostgreSQL version & O/S, but 
> generically speaking, in PostgreSQL, when you generate a sequence 
> by specifying serial as data type, the name takews the form of 
> tablename_columnname_seq, so in your case, try
> 
> https://www.postgresql.org/docs/9.4/static/datatype-numeric.html#DATATYPE-SERIAL
> 
> GetIdentity="Select currval('tablename_column_seq')".
> 
> BTW, in PostgreSQL, it is NOT recommended to use mixed case object names, as 
> all names are converted to lowercase unless enclosed in double quotes.
> 
>  
> On Sat, Aug 5, 2017 at 4:09 PM, Dan Cooperstock at Software4Nonprofits 
> <i...@software4nonprofits.com> wrote:
>> I’m trying to get a Postgres DB version of an application I write in 
>> PowerBuilder working. The thing I’m stuck on is Identity keys – what you set 
>> up with the SERIAL attribute or SEQUENCEs / GENERATORs in Postgres.
>>  
>> I have the sequence set up and clearly working. And in PowerBuilder, I have 
>> added a section I found online to a file it uses to know how to deal with 
>> different aspects of different DBs (PBODBxxx.INI) for Postgres, including 
>> the following line for retrieving an identity key after saving a record, 
>> when the DB automatically fills in the value:
>>  
>> GetIdentity="Select currval('GEN_')"
>>  
>> That obviously depends on the generator being named “GEN_” plus the table’s 
>> name – which is true in our case.
>>  
>> But nothing like that is happening. Does anyone else have PostgresSQL 
>> working with PowerBuilder and identity keys, who can give me some pointers 
>> on how get this to work?
>>  
>> Thanks.
>>  
>> 
>> Dan Cooperstock
>> DONATION and ACCOUNTS web site: http://www.Software4Nonprofits.com
>> Email: i...@software4nonprofits.com
>> Phone: 416-423-7722
>> Mail: 57 Gledhill Ave., Toronto ON M4C 5K7, Canada
>> 
>> If you do not want to receive any further emails from Software4Nonprofits, 
>> please reply to this email with the subject line "UNSUBSCRIBE", and we will 
>> immediately remove you from our mailing list, if you are on it.
>> 
>>  
> 
> 
> 
> -- 
> Melvin Davidson
> I reserve the right to fantasize.  Whether or not you 
> wish to share my fantasy is entirely up to you. 

I don’t see that you posted any sort of error message?
Also don’t test that sequence more than 64K times as you’ll certainly get a 
number too big for smallest :)
Did your direct sql testing actually use ALL CAPS?



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)

2017-08-05 Thread Dan Cooperstock at Software4Nonprofits
I’m on PostgreSQL 9.6, 64-bit Windows.

 

That really is the correct name for the sequence, because I’m not using SERIAL. 
(I needed everything to match the naming in my existing DB I’m using for the 
app, Firebird SQL, so the changes to make it work with either DB would be as 
minimal as possible.) The setup of tables I’m using with this sort of thing are 
like the following example:

 

CREATE SEQUENCE GEN_CATEGORY MINVALUE 0;

 

CREATE TABLE CATEGORY(

  CATEGORYNUMSMALLINT NOT NULL DEFAULT NEXTVAL('GEN_CATEGORY'),

  DESCRIPTIONVARCHAR(20) NOT NULL,

  CONSTRAINT PK_CATEGORY PRIMARY KEY (CATEGORYNUM)

);

 

So as you can see GEN_ plus the tablename is indeed correct. The default on the 
CATEGORYNUM column is definitely working, which I tested with direct SQL 
commands: after inserting a row (with the CATEGORYNUM not specified in the 
INSERT), if I SELECT currval(‘GEN_CATEGORY’), it gives me the correct value, 
which is also what got saved in that column.

 



Dan Cooperstock
DONATION and ACCOUNTS web site:  <http://www.Software4Nonprofits.com> 
http://www.Software4Nonprofits.com
Email:  <mailto:i...@software4nonprofits.com> i...@software4nonprofits.com
Phone: 416-423-7722
Mail: 57 Gledhill Ave., Toronto ON M4C 5K7, Canada

If you do not want to receive any further emails from Software4Nonprofits, 
please reply to this email with the subject line "UNSUBSCRIBE", and we will 
immediately remove you from our mailing list, if you are on it.



 

From: Melvin Davidson [mailto:melvin6...@gmail.com] 
Sent: August 5, 2017 4:46 PM
To: Dan Cooperstock at Software4Nonprofits <i...@software4nonprofits.com>
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)

 

>GetIdentity="Select currval('GEN_')"

FYI, it would be helpful to specify the PostgreSQL version & O/S, but 
generically speaking, in PostgreSQL, when you generate a sequence 

by specifying serial as data type, the name takews the form of 
tablename_columnname_seq, so in your case, try

https://www.postgresql.org/docs/9.4/static/datatype-numeric.html#DATATYPE-SERIAL

GetIdentity="Select currval('tablename_column_seq')".

BTW, in PostgreSQL, it is NOT recommended to use mixed case object names, as 
all names are converted to lowercase unless enclosed in double quotes.

 

On Sat, Aug 5, 2017 at 4:09 PM, Dan Cooperstock at Software4Nonprofits 
<i...@software4nonprofits.com <mailto:i...@software4nonprofits.com> > wrote:

I’m trying to get a Postgres DB version of an application I write in 
PowerBuilder working. The thing I’m stuck on is Identity keys – what you set up 
with the SERIAL attribute or SEQUENCEs / GENERATORs in Postgres.

 

I have the sequence set up and clearly working. And in PowerBuilder, I have 
added a section I found online to a file it uses to know how to deal with 
different aspects of different DBs (PBODBxxx.INI) for Postgres, including the 
following line for retrieving an identity key after saving a record, when the 
DB automatically fills in the value:

 

GetIdentity="Select currval('GEN_')"

 

That obviously depends on the generator being named “GEN_” plus the table’s 
name – which is true in our case.

 

But nothing like that is happening. Does anyone else have PostgresSQL working 
with PowerBuilder and identity keys, who can give me some pointers on how get 
this to work?

 

Thanks.

 



Dan Cooperstock
DONATION and ACCOUNTS web site: http://www.Software4Nonprofits.com
Email: i...@software4nonprofits.com <mailto:i...@software4nonprofits.com> 
Phone: 416-423-7722 <tel:(416)%20423-7722> 
Mail: 57 Gledhill Ave., Toronto ON M4C 5K7, Canada

If you do not want to receive any further emails from Software4Nonprofits, 
please reply to this email with the subject line "UNSUBSCRIBE", and we will 
immediately remove you from our mailing list, if you are on it.

 




-- 

Melvin Davidson
I reserve the right to fantasize.  Whether or not you 
wish to share my fantasy is entirely up to you.   
<http://us.i1.yimg.com/us.yimg.com/i/mesg/tsmileys2/01.gif> 



Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)

2017-08-05 Thread Melvin Davidson
>GetIdentity="Select currval('GEN_')"


*FYI, it would be helpful to specify the PostgreSQL version & O/S, but
generically speaking, in PostgreSQL, when you generate a sequence *






*by specifying serial as data type, the name takews the form of
tablename_columnname_seq, so in your case,
tryhttps://www.postgresql.org/docs/9.4/static/datatype-numeric.html#DATATYPE-SERIAL
GetIdentity="Select
currval('tablename_column_seq')".*

*BTW, in PostgreSQL, it is NOT recommended to use mixed case object names,
as all names are converted to lowercase unless enclosed in double quotes.*

On Sat, Aug 5, 2017 at 4:09 PM, Dan Cooperstock at Software4Nonprofits <
i...@software4nonprofits.com> wrote:

> I’m trying to get a Postgres DB version of an application I write in
> PowerBuilder working. The thing I’m stuck on is Identity keys – what you
> set up with the SERIAL attribute or SEQUENCEs / GENERATORs in Postgres.
>
>
>
> I have the sequence set up and clearly working. And in PowerBuilder, I
> have added a section I found online to a file it uses to know how to deal
> with different aspects of different DBs (PBODBxxx.INI) for Postgres,
> including the following line for retrieving an identity key after saving a
> record, when the DB automatically fills in the value:
>
>
>
> GetIdentity="Select currval('GEN_')"
>
>
>
> That obviously depends on the generator being named “GEN_” plus the
> table’s name – which is true in our case.
>
>
>
> But nothing like that is happening. Does anyone else have PostgresSQL
> working with PowerBuilder and identity keys, who can give me some pointers
> on how get this to work?
>
>
>
> Thanks.
>
>
>
> 
>
> Dan Cooperstock
> DONATION and ACCOUNTS web site: http://www.Software4Nonprofits.com
> Email: i...@software4nonprofits.com
> Phone: 416-423-7722 <(416)%20423-7722>
> Mail: 57 Gledhill Ave., Toronto ON M4C 5K7, Canada
>
> *If you do not want to receive any further emails from
> Software4Nonprofits, please reply to this email with the subject line
> "UNSUBSCRIBE", and we will immediately remove you from our mailing list, if
> you are on it.*
>
>
>



-- 
*Melvin Davidson*
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.


[GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)

2017-08-05 Thread Dan Cooperstock at Software4Nonprofits
I'm trying to get a Postgres DB version of an application I write in
PowerBuilder working. The thing I'm stuck on is Identity keys - what you set
up with the SERIAL attribute or SEQUENCEs / GENERATORs in Postgres.

 

I have the sequence set up and clearly working. And in PowerBuilder, I have
added a section I found online to a file it uses to know how to deal with
different aspects of different DBs (PBODBxxx.INI) for Postgres, including
the following line for retrieving an identity key after saving a record,
when the DB automatically fills in the value:

 

GetIdentity="Select currval('GEN_')"

 

That obviously depends on the generator being named "GEN_" plus the table's
name - which is true in our case.

 

But nothing like that is happening. Does anyone else have PostgresSQL
working with PowerBuilder and identity keys, who can give me some pointers
on how get this to work?

 

Thanks.

 



Dan Cooperstock
DONATION and ACCOUNTS web site: http://www.Software4Nonprofits.com
Email: i...@software4nonprofits.com  
Phone: 416-423-7722
Mail: 57 Gledhill Ave., Toronto ON M4C 5K7, Canada

If you do not want to receive any further emails from Software4Nonprofits,
please reply to this email with the subject line "UNSUBSCRIBE", and we will
immediately remove you from our mailing list, if you are on it.



 



[GENERAL] PostgreSQL 9.3 Uninstall error - Windows 2012

2017-08-02 Thread Pankaj Arora
Hi,

I am trying to uninstall PostgreSQL 9.3 from a Windows 2012 server using
the *uninstall-postgresql.exe*. During the uninstall, I get an error:

*The uninstall-postgresql.dat file cannot be found and is required to
uninstall the application, aborting. Uninstallation did not complete
successfully.*

The uninstall-postgresql.dat does exist in the install folder. Not sure
what the dat file contains and if this file is corrupt on my system.

Questions:
1. Can someone give me info on the uninstall-postgresql.dat file and what
it contains?
2. Is there anyway to get rid of this error message and still use the
uninstall-postgresql.exe to uninstall the DB from the Windows system?

Thanks

-- 
~*Pankaj Arora*


[GENERAL] PostgreSQL and Data Warehouse optimizations

2017-07-31 Thread Daniel Franco
Recently, I've been doing a research about data warehouse optimizations and
techniques. For example, Oracle uses parallel queries, materialized views
with different refresh modes, star transformations in queries, etc. Since
I've never worked with PostgreSQL in an OLAP environment, I thought maybe
the community could guide me to find what features and techniques
PostgreSQL provides for its users and it would be especially useful if
someone could point out a previous work comparing PostgreSQL with another
RDBMs in this regard. Also, I'm interested if there's any interesting
books, articles or anything related PostgreSQL and Data Warehouses
optimizations.

Thanks and Regards for all the community.


Livre
de vírus. www.avast.com
.
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>


Re: [GENERAL] Postgresql - commercial version

2017-07-07 Thread John R Pierce

On 7/7/2017 8:22 AM, Terry Schmitt wrote:
You have the open source version installed. Now where it was installed 
from is a different story.



if its a redhat/centos/fedora type system, try...

rpm -qa |grep ^postgres

if it was installed from rpm's, the full names of the rpms will clue you in.

also, see what path postgres's tools are installed in, the RPM versions 
install everything in /usr/pgsql-9.x/bin while EDB typically installs to 
/opt or something.



--
john r pierce, recycling bits in santa cruz



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Postgresql - commercial version

2017-07-07 Thread Terry Schmitt
You have the open source version installed. Now where it was installed from
is a different story.

EnterpriseDB Advanced Server will look like:
 EnterpriseDB 9.5.5.10 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.4.7
20120313 (Red Hat 4.4.7-16), 64-bit

T

On Fri, Jul 7, 2017 at 7:04 AM, Krithika Venkatesh <
krithikavenkates...@gmail.com> wrote:

>  select version () gives me output something like this
>
> PostgreSQL 9.5.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.1.2
> 20080704 (Red hat 4.1.2-55), 64 bit.
>
> Is there any other way to find
>
> On 07-Jul-2017 7:28 PM, "Adrian Klaver"  wrote:
>
>> On 07/07/2017 06:52 AM, Krithika Venkatesh wrote:
>>
>>> Hi,
>>>
>>> I have postgreSQL 9.5 installed in the server. Is it possible to find
>>> whether the installed postgresql is enterprise db or an open source version
>>> through a query.
>>>
>>
>> Not sure, but I would try:
>>
>> select version();
>>
>>
>>> Thanks in Advance.
>>>
>>
>>
>> --
>> Adrian Klaver
>> adrian.kla...@aklaver.com
>>
>


Re: [GENERAL] Postgresql - commercial version

2017-07-07 Thread John McKown
On Fri, Jul 7, 2017 at 9:04 AM, Krithika Venkatesh <
krithikavenkates...@gmail.com> wrote:

>  select version () gives me output something like this
>
> PostgreSQL 9.5.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.1.2
> 20080704 (Red hat 4.1.2-55), 64 bit.
>
> Is there any other way to find
>
>
​I don't have access to EDB, just the community version (from the Fedora
RPM). But from looking at the manual:
https://www.enterprisedb.com/docs/en/9.6/DB_Compat_Oracle_Reference/Database_Compatibility_for_Oracle_Developers_Reference_Guide.1.203.html

you might try:

SELECT * FROM PRODUCT_COMPONENT_VERSION;

This table does not exist in the version which I have, and so I am guessing
that it would be a decent test.


-- 
Veni, Vidi, VISA: I came, I saw, I did a little shopping.

Maranatha! <><
John McKown


Re: [GENERAL] Postgresql - commercial version

2017-07-07 Thread Adrian Klaver

On 07/07/2017 07:04 AM, Krithika Venkatesh wrote:

  select version () gives me output something like this

PostgreSQL 9.5.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.1.2 
20080704 (Red hat 4.1.2-55), 64 bit.


Is there any other way to find


It depends on what you are trying to determine:

1) If you are looking at a database installed from here:
https://www.enterprisedb.com/downloads/postgres-postgresql-downloads#linux

Then it will the same as the community database, it was just installed 
differently.


2) If you are looking at one of EDB's value added products you have to 
pay for, then I would suspect there will tables/functions/etc that do 
not exist in the community version you could query for.




On 07-Jul-2017 7:28 PM, "Adrian Klaver" > wrote:


On 07/07/2017 06:52 AM, Krithika Venkatesh wrote:

Hi,

I have postgreSQL 9.5 installed in the server. Is it possible to
find whether the installed postgresql is enterprise db or an
open source version through a query.


Not sure, but I would try:

select version();


Thanks in Advance.



-- 
Adrian Klaver

adrian.kla...@aklaver.com 




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


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Postgresql - commercial version

2017-07-07 Thread David G. Johnston
On Fri, Jul 7, 2017 at 7:04 AM, Krithika Venkatesh <
krithikavenkates...@gmail.com> wrote:

>  select version () gives me output something like this
>
> PostgreSQL 9.5.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.1.2
> 20080704 (Red hat 4.1.2-55), 64 bit.
>
> Is there any other way to find
>

​If memory serves the ​commercial version put out by EnterpriseDB uses a
4-part versioning scheme so the above would seem to be the community
version you are looking at.

Otherwise maybe someone with access will be kind enough to provide the
version their 9.5 version of the EnterpriseDB install outputs for
comparison.

You can always check the O/S package manager and try and figure out how it
was installed.

David J.


Re: [GENERAL] Postgresql - commercial version

2017-07-07 Thread Krithika Venkatesh
 select version () gives me output something like this

PostgreSQL 9.5.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.1.2
20080704 (Red hat 4.1.2-55), 64 bit.

Is there any other way to find

On 07-Jul-2017 7:28 PM, "Adrian Klaver"  wrote:

> On 07/07/2017 06:52 AM, Krithika Venkatesh wrote:
>
>> Hi,
>>
>> I have postgreSQL 9.5 installed in the server. Is it possible to find
>> whether the installed postgresql is enterprise db or an open source version
>> through a query.
>>
>
> Not sure, but I would try:
>
> select version();
>
>
>> Thanks in Advance.
>>
>
>
> --
> Adrian Klaver
> adrian.kla...@aklaver.com
>


Re: [GENERAL] Postgresql - commercial version

2017-07-07 Thread Adrian Klaver

On 07/07/2017 06:52 AM, Krithika Venkatesh wrote:

Hi,

I have postgreSQL 9.5 installed in the server. Is it possible to find 
whether the installed postgresql is enterprise db or an open source 
version through a query.


Not sure, but I would try:

select version();



Thanks in Advance.



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


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Postgresql - commercial version

2017-07-07 Thread Krithika Venkatesh
Hi,

I have postgreSQL 9.5 installed in the server. Is it possible to find
whether the installed postgresql is enterprise db or an open source version
through a query.

Thanks in Advance.


Re: [GENERAL] PostGreSQL Timeout, auto shutdown and Pkey errors

2017-06-30 Thread Adrian Klaver

On 06/30/2017 11:35 AM, Niel Smith wrote:

Please reply to list also.
Ccing list.

Also to help with replies in the future could you change your posting 
style to something like:


https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

Thanks.

What version of Postgres and where did you get it? This Was from 
postgresSQL 9.5  


 > I'm not sure where this was downloaded from this was
 > installed on the server before I started with the company I work 
for. my

 > guess is from the postgreSQL website


OS and version?

  >this is running a windows 7 embedded OS.

Do you have anti-virus software running on this machine?

Which logs? 


 >From the PostgreSQL logs.



A timeout expired, probably on client side.
Where are the clients relative to the server, local network or Internet? 

  > Local network


Where are the above coming from as I can not find a reference to 
readCurIndex in either the Postgres or psqodbc code?  



  >This is from a Log
  > called Trace and it comes from my Central Storage interface

What is Central Storage?



Timestamp: 6/20/2017 3:09:15 PM
Message: Error during indexfile unfixed fields readCurIndex: 
3292CurFileNum: 550

Severity: Error, Machine: DIRELIANT2,  Thread Name: SQLThreadPM
Process Name: C:\Program Files\Dynamic Instruments, Inc\Digital 
Recorder\DICSInterface\DICSInterface.exe


Timestamp: 6/21/2017 4:51:05 AM
Message: Error during indexfile unfixed fields readCurIndex: 
6249CurFileNum: 550

Severity: Error, Machine: DIRELIANT2,  Thread Name: SQLThreadPM
Process Name: C:\Program Files\Dynamic Instruments, Inc\Digital 
Recorder\DICSInterface\DICSInterface.exe




So the above is this third party instrument, correct?:

http://www.officer.com/company/10028921/dynamic-instruments

If so you might want to get in touch with them, as this looks to be 
coming from their software.



Timestamp: 6/21/2017 9:43:28 AM
Message: Exception during making connection to 
databaseDriver={PostgreSQL 
UNICODE};Server=127.0.0.1;Port=5432;UID=postgres;PWD=root;Database=postgres;ERROR 
[08001] timeout expired


That looks fairly straight forward the connection attempt timed out.

The question is why?

Do you see anything in the Postgres logs from this time period that 
might help?


Do you have network issues that might prevent the device from connecting 
in a timely fashion?


Is there any consistency to when these errors occur?

at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, 
RetCode retcode)
at System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection 
connection, OdbcConnectionString constr, OdbcEnvironmentHandle 
environmentHandle)
at System.Data.Odbc.OdbcConnectionOpen..ctor(OdbcConnection 
outerConnection, OdbcConnectionString connectionOptions)
at 
System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOptions 
options, Object poolGroupProviderInfo, DbConnectionPool pool, 
DbConnection owningObject)
at 
System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection 
owningConnection, DbConnectionPoolGroup poolGroup)
at 
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection 
owningConnection)
at 
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection 
outerConnection, DbConnectionFactory connectionFactory)

at System.Data.Odbc.OdbcConnection.Open()
at DICSInterface.DISQL.ConnectToSQL(OdbcConnection& conn, String 
DatabaseType, String IPAddress)

Severity: Critical, Machine: DIRELIANT2,  Thread Name:
Process Name: C:\Program Files\Dynamic Instruments, Inc\Digital 
Recorder\DICSInterface\DICSInterface.exe


Niel Smith - Support Technician




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


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] PostGreSQL Timeout, auto shutdown and Pkey errors

2017-06-29 Thread Adrian Klaver

On 06/28/2017 11:32 AM, Niel Smith wrote:

Hi,

So I have a few problems with my PostGreSQL and was hoping you could 
help me out. one is I'm getting random timeouts and the errors I'm 
seeing in the logs are


What version of Postgres and where did you get it?
OS and version?
Which logs?



On the 6/22/17 at 10:51am we had  ERROR [08001] timeout expired at 
System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode 
retcode)


A timeout expired, probably on client side.
Where are the clients relative to the server, local network or Internet?



  2:23pm we had Error during indexfile unfixed fields readCurIndex: 
6598CurFileNum: 551


4;25 pm Error during indexfile unfixed fields readCurIndex: 
7054CurFileNum: 551


6/23/17 @ 5:57PM Error during indexfile unfixed fields readCurIndex: 
4449CurFileNum: 552


Where are the above coming from as I can not find a reference to 
readCurIndex in either the Postgres or psqodbc code?




6/24/17 9:43 am ERROR [08001] timeout expired
at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, 
RetCode retcode)


Another timeout.



6/26/17 7:21am  Exception during IsDuplicateSelect ID from 
di_central.di_web_records where starttime = '2017-06-26 01:07:34' AND 
channelnum = 95 AND ulseqlow = 5095480The connection has been disabled. 
   at System.Data.Odbc.OdbcConnection.ConnectionIsAlive(Exception 
innerException) >

x2 6/26/17 7:21am ERROR [08001] FATAL:  the database system is shutting down
at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, 
RetCode retcode)


Looks like bad code in IsDuplicateSelect ID is triggering an exception 
that shuts down the database.




  Having an Issue of timing out or just randomly shutting down?  other 
errors I'm getting are duplicate key value violates unique constraint 
"di_web_users_pkey"


I am not seeing that in what you show. In any case that is what a unique 
constraint is supposed to do, throw an error when you try to create a 
duplicate entry. The client/application code will need to be able to 
deal with that.


2017-06-21 06:53:09 MDT ERROR:  relation 
"di_central.di_web_user_hmaxfield" does not exist at character 37
2017-06-21 06:53:09 MDT STATEMENT:  select column_name, is_checked from 
di_central.di_web_user_hmaxfield
2017-06-21 09:43:35 MDT LOG:  could not receive data from client: An 
established connection was aborted by the software in your host machine.


2017-06-26 07:21:35 MDT FATAL:  terminating connection due to 
administrator command

2017-06-26 07:21:47 MDT FATAL:  the database system is shutting down


Looks like some external process is shutting down the server.



I also have MySQL running on this PC and have an error in event viewer 
we have a spam of errors Task category is WebHost and the source is 
system.serviceModel 4.0.0.0 WebHost failed to process a request.
  Sender Information: 
System.ServiceModel.ServiceHostingEnvironment+HostingManager/45653674
  Exception: System.ServiceModel.ServiceActivationException: The service 
'/MySQLService.svc' cannot be activated due to an exception during 
compilation.  The exception message is: Memory gates checking failed 
because the free memory (89677824 bytes) is less than 5% of total 
memory. Process Name: w3wp Process ID: 10672


The only thing I understand in the above is:

"...the free memory (89677824 bytes) is less than 5% of total memory."

Whatever it is wants more memory.



if anyone can help me out with these errors that would be very much 
appreciated.


Thank you


Niel Smith - Support Technician
Equature




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


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] PostGreSQL Timeout, auto shutdown and Pkey errors

2017-06-29 Thread Adrian Klaver

On 06/28/2017 11:32 AM, Niel Smith wrote:

Hi,

So I have a few problems with my PostGreSQL and was hoping you could 
help me out. one is I'm getting random timeouts and the errors I'm 
seeing in the logs are


What version of Postgres and where did you get it?
OS and version?
What is the source for the logs below?



On the 6/22/17 at 10:51am we had  ERROR [08001] timeout expired at 
System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode 
retcode)


A timeout expired, probably on client side.
Where are the clients relative to the server, local network or Internet?



  2:23pm we had Error during indexfile unfixed fields readCurIndex: 
6598CurFileNum: 551


4;25 pm Error during indexfile unfixed fields readCurIndex: 
7054CurFileNum: 551


6/23/17 @ 5:57PM Error during indexfile unfixed fields readCurIndex: 
4449CurFileNum: 552


Where are the above coming from as I can not find a reference to 
readCurIndex in either the Postgres or psqodbc code?




6/24/17 9:43 am ERROR [08001] timeout expired
at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, 
RetCode retcode)


Another timeout.



6/26/17 7:21am  Exception during IsDuplicateSelect ID from 
di_central.di_web_records where starttime = '2017-06-26 01:07:34' AND 
channelnum = 95 AND ulseqlow = 5095480The connection has been disabled. 
   at System.Data.Odbc.OdbcConnection.ConnectionIsAlive(Exception 
innerException) >

x2 6/26/17 7:21am ERROR [08001] FATAL:  the database system is shutting down
at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, 
RetCode retcode)


Looks like bad code in IsDuplicateSelect ID is triggering an exception 
that shuts down the database.




  Having an Issue of timing out or just randomly shutting down?  other 
errors I'm getting are duplicate key value violates unique constraint 
"di_web_users_pkey"


I am not seeing that in what you show. In any case that is what a unique 
constraint is supposed to do, throw an error when you try to create a 
duplicate entry. The client/application code will need to be able to 
deal with that.


2017-06-21 06:53:09 MDT ERROR:  relation 
"di_central.di_web_user_hmaxfield" does not exist at character 37
2017-06-21 06:53:09 MDT STATEMENT:  select column_name, is_checked from 
di_central.di_web_user_hmaxfield
2017-06-21 09:43:35 MDT LOG:  could not receive data from client: An 
established connection was aborted by the software in your host machine.


2017-06-26 07:21:35 MDT FATAL:  terminating connection due to 
administrator command

2017-06-26 07:21:47 MDT FATAL:  the database system is shutting down


Looks like some external process is shutting down the server.



I also have MySQL running on this PC and have an error in event viewer 
we have a spam of errors Task category is WebHost and the source is 
system.serviceModel 4.0.0.0 WebHost failed to process a request.
  Sender Information: 
System.ServiceModel.ServiceHostingEnvironment+HostingManager/45653674
  Exception: System.ServiceModel.ServiceActivationException: The service 
'/MySQLService.svc' cannot be activated due to an exception during 
compilation.  The exception message is: Memory gates checking failed 
because the free memory (89677824 bytes) is less than 5% of total 
memory. Process Name: w3wp Process ID: 10672


The only thing I understand in the above is:

"...the free memory (89677824 bytes) is less than 5% of total memory."

Whatever it is wants more memory.



if anyone can help me out with these errors that would be very much 
appreciated.


Thank you


Niel Smith - Support Technician
Equature




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


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] PostGreSQL Timeout, auto shutdown and Pkey errors

2017-06-28 Thread Niel Smith
Hi,

So I have a few problems with my PostGreSQL and was hoping you could help
me out. one is I'm getting random timeouts and the errors I'm seeing in the
logs are

On the 6/22/17 at 10:51am we had  ERROR [08001] timeout expired at
System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode
retcode)

 2:23pm we had Error during indexfile unfixed fields readCurIndex:
6598CurFileNum: 551

4;25 pm Error during indexfile unfixed fields readCurIndex: 7054CurFileNum:
551

6/23/17 @ 5:57PM Error during indexfile unfixed fields readCurIndex:
4449CurFileNum: 552

6/24/17 9:43 am ERROR [08001] timeout expired
   at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle,
RetCode retcode)

6/26/17 7:21am  Exception during IsDuplicateSelect ID from
di_central.di_web_records where starttime = '2017-06-26 01:07:34' AND
channelnum = 95 AND ulseqlow = 5095480The connection has been disabled.
at System.Data.Odbc.OdbcConnection.ConnectionIsAlive(Exception
innerException)

x2 6/26/17 7:21am ERROR [08001] FATAL:  the database system is shutting down
   at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle,
RetCode retcode)

 Having an Issue of timing out or just randomly shutting down?  other
errors I'm getting are duplicate key value violates unique constraint
"di_web_users_pkey"
2017-06-21 06:53:09 MDT ERROR:  relation "di_central.di_web_user_hmaxfield"
does not exist at character 37
2017-06-21 06:53:09 MDT STATEMENT:  select column_name, is_checked from
di_central.di_web_user_hmaxfield
2017-06-21 09:43:35 MDT LOG:  could not receive data from client: An
established connection was aborted by the software in your host machine.

2017-06-26 07:21:35 MDT FATAL:  terminating connection due to administrator
command
2017-06-26 07:21:47 MDT FATAL:  the database system is shutting down

I also have MySQL running on this PC and have an error in event viewer we
have a spam of errors  Task category is WebHost and the source is
system.serviceModel 4.0.0.0 WebHost failed to process a request.
 Sender Information: System.ServiceModel.ServiceHos
tingEnvironment+HostingManager/45653674
 Exception: System.ServiceModel.ServiceActivationException: The service
'/MySQLService.svc' cannot be activated due to an exception during
compilation.  The exception message is: Memory gates checking failed
because the free memory (89677824 bytes) is less than 5% of total
memory. Process Name: w3wp Process ID: 10672

if anyone can help me out with these errors that would be very much
appreciated.

Thank you


Niel Smith - Support Technician
Equature
18311 W. 10 Mile Rd.
Southfield, Michigan 48075
248.359.8860 <(248)%20359-8860> - Office Phone
888.305.3428 <(888)%20305-3428> - 24 Hour Support

*Interactive Response*

Police * Fire * EMT * Military * Security

[image:
http://www.equature.com/wp-content/uploads/2015/05/eq-logo-tiny-2015.fw_.png]


Re: [GENERAL] PostgreSQL Cookbook Testing

2017-06-23 Thread Adrian Klaver

On 06/23/2017 05:27 AM, PAWAN SHARMA wrote:

Hi All,

Please help to configure kitchen.yml to test the PostgreSQL cookbook 
testing.


#-> kitchen converge
-> Starting Kitchen (v1.16.0)
 >> --Exception---
 >> Class: Kitchen::UserError
 >> Message: Error parsing /tmp/postgresql-master/.kitchen.yml as YAML.


The above seems to indicate that you are not supplying .kitchen.yml as 
proper YAML.


You did not say, but I am assuming you are working with Chef. In that 
case you might want to look at link below for proper form of .kitchen.yml:


https://docs.chef.io/config_yml_kitchen.html

Might also run the file through a linter. A quick search found these:

http://www.yamllint.com/

https://github.com/adrienverge/yamllint


Please run `kitchen diagnose --no-instances --loader' to help debug your 
issue.

 >> --
 >> Please see .kitchen/logs/kitchen.log for more details
 >> Also try running `kitchen diagnose --all` for configuration

-Server type: VMware
OS: Redhat 6 or Redhat 7
PostgreSQL Version: 9.5.7


-Pawan






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


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] PostgreSQL Cookbook Testing

2017-06-23 Thread Karsten Hilbert
On Fri, Jun 23, 2017 at 06:33:56PM +0530, PAWAN SHARMA wrote:

> > On Fri, Jun 23, 2017 at 05:57:44PM +0530, PAWAN SHARMA wrote:
> >
> > > Please help to configure kitchen.yml to test the PostgreSQL cookbook
> > > testing.
> > >
> > > #-> kitchen converge
> > > -> Starting Kitchen (v1.16.0)
> > > >> --Exception---
> > > >> Class: Kitchen::UserError
> > > >> Message: Error parsing /tmp/postgresql-master/.kitchen.yml as
> > YAML.
> > > Please run `kitchen diagnose --no-instances --loader' to help debug your
> > > issue.
> > > >> --
> > > >> Please see .kitchen/logs/kitchen.log for more details
> > > >> Also try running `kitchen diagnose --all` for configuration
> >
> > So ?  The output gives you THREE hints already.  Care to do as the suggest
> > ?
> 
> nothing, it will show me the configuration of kitchen.yml

"Nothing" is quite obviously not the same as "configuration
of kitchen.yml". And, it is one of _three_. Also, whatever
"it" _is_.

You'll have to put in more effort, I suppose.

But that's not the track record AFAIR.

Bye,
Karsten
-- 
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] PostgreSQL Cookbook Testing

2017-06-23 Thread PAWAN SHARMA
On Fri, Jun 23, 2017 at 6:10 PM, Karsten Hilbert 
wrote:

> On Fri, Jun 23, 2017 at 05:57:44PM +0530, PAWAN SHARMA wrote:
>
> > Please help to configure kitchen.yml to test the PostgreSQL cookbook
> > testing.
> >
> > #-> kitchen converge
> > -> Starting Kitchen (v1.16.0)
> > >> --Exception---
> > >> Class: Kitchen::UserError
> > >> Message: Error parsing /tmp/postgresql-master/.kitchen.yml as
> YAML.
> > Please run `kitchen diagnose --no-instances --loader' to help debug your
> > issue.
> > >> --
> > >> Please see .kitchen/logs/kitchen.log for more details
> > >> Also try running `kitchen diagnose --all` for configuration
>
> So ?  The output gives you THREE hints already.  Care to do as the suggest
> ?
>
>
> Karsten
> --
> GPG key ID E4071346 @ eu.pool.sks-keyservers.net
> E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general




nothing, it will show me the configuration of kitchen.yml


Re: [GENERAL] PostgreSQL Cookbook Testing

2017-06-23 Thread Karsten Hilbert
On Fri, Jun 23, 2017 at 05:57:44PM +0530, PAWAN SHARMA wrote:

> Please help to configure kitchen.yml to test the PostgreSQL cookbook
> testing.
> 
> #-> kitchen converge
> -> Starting Kitchen (v1.16.0)
> >> --Exception---
> >> Class: Kitchen::UserError
> >> Message: Error parsing /tmp/postgresql-master/.kitchen.yml as YAML.
> Please run `kitchen diagnose --no-instances --loader' to help debug your
> issue.
> >> --
> >> Please see .kitchen/logs/kitchen.log for more details
> >> Also try running `kitchen diagnose --all` for configuration

So ?  The output gives you THREE hints already.  Care to do as the suggest ?


Karsten
-- 
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] PostgreSQL Cookbook Testing

2017-06-23 Thread PAWAN SHARMA
Hi All,

Please help to configure kitchen.yml to test the PostgreSQL cookbook
testing.

#-> kitchen converge
-> Starting Kitchen (v1.16.0)
>> --Exception---
>> Class: Kitchen::UserError
>> Message: Error parsing /tmp/postgresql-master/.kitchen.yml as YAML.
Please run `kitchen diagnose --no-instances --loader' to help debug your
issue.
>> --
>> Please see .kitchen/logs/kitchen.log for more details
>> Also try running `kitchen diagnose --all` for configuration

-Server type: VMware
OS: Redhat 6 or Redhat 7
PostgreSQL Version: 9.5.7


-Pawan


Re: [GENERAL] PostgreSQL Source Control Integration

2017-06-21 Thread Günce Kaya
Hello Adrian,

Thank you for your suggest, I'll examine and decide to use it.

Regards,

Gunce

On Wed, Jun 21, 2017 at 3:45 PM, Adrian Klaver 
wrote:

> On 06/21/2017 05:08 AM, Günce Kaya wrote:
>
>> Hi,
>>
>> I work on PostgreSQL 9.6 and I'm looking for a source code control tool.
>> Is there anyone who give a  suggest about that?
>>
>
> http://sqitch.org/
>
>
>
>> Best Regards,
>>
>> --
>> Gunce Kaya
>>
>
>
> --
> Adrian Klaver
> adrian.kla...@aklaver.com
>



-- 
Gunce Kaya

Linkedin  - Twitter
 - Blog



Re: [GENERAL] PostgreSQL Source Control Integration

2017-06-21 Thread Adrian Klaver

On 06/21/2017 05:08 AM, Günce Kaya wrote:

Hi,

I work on PostgreSQL 9.6 and I'm looking for a source code control tool. 
Is there anyone who give a  suggest about that?


http://sqitch.org/



Best Regards,

--
Gunce Kaya



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


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] PostgreSQL Source Control Integration

2017-06-21 Thread Günce Kaya
Hi,

I work on PostgreSQL 9.6 and I'm looking for a source code control tool. Is
there anyone who give a  suggest about that?

Best Regards,

-- 
Gunce Kaya

Linkedin  - Twitter
 - Blog



[GENERAL] PostgreSQL RPMs for PPC64LE are released

2017-05-16 Thread Devrim Gündüz

The PostgreSQL YUM Repository Project is happy to announce RPMs of PostgreSQL
9.6 and related software for Power8 Little Endian (PPC64LE) platforms on RHEL 7
and CentOS 7. We want to thank IBM and EnterpriseDB for sponsoring hardware and
manpower for this project.

These packages follow the same update and maintenance policies of the packages
already distributed at https://yum.postgresql.org, and will also follow the
lifecycle of the released PostgreSQL versions.

We currently cover more than 110 RPMs, and more will come soon. PostgreSQL 9.5
and PostgreSQL 10 support will also be available soon.

In order to use the RPMs, please first install the repository RPM from:

https://yum.postgresql.org/repopackages.php#pg96

and then run install the PostgreSQL RPMs as usual:

yum install postgresql96-server (and others)

Please visit https://yum.postgresql.org/9.6/redhat/rhel-7-ppc64le/repoview/ for
the list of all current packages (use the links on the right top for full list)

Please report any packaging related errors to us: pgsql-pkg-...@postgresql.org 

Regards,
-- 
Devrim Gündüz
EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR


signature.asc
Description: This is a digitally signed message part


[GENERAL] PostgreSQL Portable for Linux

2017-05-12 Thread Alejandro Carrillo
Good morning / afternoon / night,
I already updated the PostgreSQL Portable for Linux Debian and him flawors. 
Tested on Debian Jessie and Ubuntu 17.4. Its a 7z 
file.https://sourceforge.net/projects/pgsqlportable/files/9.6/pgsql%209.6x64.7z/download

Please look the description of the project to run it. Its start executing  "sh 
start.sh" on terminal, stop postgresql executing "sh stop.sh", restart 
postgresql executing "sh restart.sh"
Thanks to williamp with the help!

Re: [GENERAL] PostgreSQL Required Monitoring

2017-04-28 Thread Igor Neyman

From: pgsql-general-ow...@postgresql.org 
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Andrew Kerber
Sent: Friday, April 28, 2017 12:58 PM
To: Scott Marlowe <scott.marl...@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] PostgreSQL Required Monitoring


Attention: This email was sent from someone outside of Perceptron. Always 
exercise caution when opening attachments or clicking links from unknown 
senders or when receiving unexpected emails.

Yes, that was the first item on my list (disk space)...

On Fri, Apr 28, 2017 at 11:56 AM, Scott Marlowe 
<scott.marl...@gmail.com<mailto:scott.marl...@gmail.com>> wrote:
On Fri, Apr 28, 2017 at 8:39 AM, Andrew Kerber 
<andrew.ker...@gmail.com<mailto:andrew.ker...@gmail.com>> wrote:
> I am a fairly experienced Oracle DBA, and we are starting to move in to the
> PostgreSQL world.  I would expect the standard monitoring items are required
> for mission critical postgres apps, Ie, disk space, wal log space, log
> monitoring, process counts,software running, connection available on the
> correct port, CPU usage.
>
> Are there additional PostgreSQL specific items that need to be monitored?
> if so, what items?

Amid all the other recommendations standard OS level monitoring is a
good idea. You don't wanna run out of space on drives etc.



--
Andrew W. Kerber

'If at first you dont succeed, dont take up skydiving.'

And there lies another difference with Oracle: Postgres does not allocate disk 
space for data files “in advance” (like Oracle does).

Regards,
Igor Neyman


Re: [GENERAL] PostgreSQL Required Monitoring

2017-04-28 Thread Andrew Kerber
Yes, that was the first item on my list (disk space)...

On Fri, Apr 28, 2017 at 11:56 AM, Scott Marlowe 
wrote:

> On Fri, Apr 28, 2017 at 8:39 AM, Andrew Kerber 
> wrote:
> > I am a fairly experienced Oracle DBA, and we are starting to move in to
> the
> > PostgreSQL world.  I would expect the standard monitoring items are
> required
> > for mission critical postgres apps, Ie, disk space, wal log space, log
> > monitoring, process counts,software running, connection available on the
> > correct port, CPU usage.
> >
> > Are there additional PostgreSQL specific items that need to be monitored?
> > if so, what items?
>
> Amid all the other recommendations standard OS level monitoring is a
> good idea. You don't wanna run out of space on drives etc.
>



-- 
Andrew W. Kerber

'If at first you dont succeed, dont take up skydiving.'


Re: [GENERAL] PostgreSQL Required Monitoring

2017-04-28 Thread Scott Marlowe
On Fri, Apr 28, 2017 at 8:39 AM, Andrew Kerber  wrote:
> I am a fairly experienced Oracle DBA, and we are starting to move in to the
> PostgreSQL world.  I would expect the standard monitoring items are required
> for mission critical postgres apps, Ie, disk space, wal log space, log
> monitoring, process counts,software running, connection available on the
> correct port, CPU usage.
>
> Are there additional PostgreSQL specific items that need to be monitored?
> if so, what items?

Amid all the other recommendations standard OS level monitoring is a
good idea. You don't wanna run out of space on drives etc.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] PostgreSQL Required Monitoring

2017-04-28 Thread Igor Neyman

From: pgsql-general-ow...@postgresql.org 
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Andrew Kerber
Sent: Friday, April 28, 2017 12:22 PM
To: John R Pierce <pie...@hogranch.com>
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] PostgreSQL Required Monitoring


Attention: This email was sent from someone outside of Perceptron. Always 
exercise caution when opening attachments or clicking links from unknown 
senders or when receiving unexpected emails.

yes, replication monitoring is high on the oracle list also, just forgot to 
mention it.  I ran into a similar transaction issue in Oracle when they were 
running queries across database links and not committing.  Its a little known 
fact that any oracle query that runs across a database link starts a 
transaction even without any Insert/update/delete command, so I had to explain 
that to my developers.

On Fri, Apr 28, 2017 at 11:04 AM, John R Pierce 
<pie...@hogranch.com<mailto:pie...@hogranch.com>> wrote:
On 4/28/2017 7:39 AM, Andrew Kerber wrote:
I am a fairly experienced Oracle DBA, and we are starting to move in to the 
PostgreSQL world.  I would expect the standard monitoring items are required 
for mission critical postgres apps, Ie, disk space, wal log space, log 
monitoring, process counts,software running, connection available on the 
correct port, CPU usage.

the nagios project has a rather handy monitoring script, check_postgres, this 
is a perl script that can be invoked from most any configurable monitoring 
framework, and has options to do 100s of different sorts of things, returning 
simple terse text output that can be parsed by said monitoring framework.

Are there additional PostgreSQL specific items that need to be monitored?  if 
so, what items?


its always a good idea to watch for stale 'idle in transaction' connections, as 
they gum up the important VACUUM processing.   you can make a simple query 
against pg_stat_activity to find the oldest 'idle in transaction', and if there 
are any more than, say, 1 hour old, its worth tracking down why they are 
happening and hammering the developers to fix it.oracle developers working 
in java seem to generate a lot of these (speaking from experience) if they 
aren't careful to avoid it.   Postgres JDBC starts a transaction on a simple 
SELECT, and if the app then just sits there doing nothing, that transaction 
stays open indefinitely.   I had a lot of pushback from developers insisting 
that SELECT's should not need commit.

the one big thing I don't see mentioned in your list above is monitoring 
replication

--
john r pierce, recycling bits in santa cruz




--
Sent via pgsql-general mailing list 
(pgsql-general@postgresql.org<mailto:pgsql-general@postgresql.org>)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



--
Andrew W. Kerber

'If at first you dont succeed, dont take up skydiving.'

I’d monitor not only “idle in transaction” but also just “idle” connections 
(and their state change – how long they’ve been idle), especially considering 
that unlike Oracle Postgres doesn’t have (yet) built-in connection pooler, so 
there is risk to run out of connections. There are very good add-on poolers 
such as PgBouncer, PgPool.

Regards,
Igor Neyman


Re: [GENERAL] PostgreSQL Required Monitoring

2017-04-28 Thread Andrew Kerber
yes, replication monitoring is high on the oracle list also, just forgot to
mention it.  I ran into a similar transaction issue in Oracle when they
were running queries across database links and not committing.  Its a
little known fact that any oracle query that runs across a database link
starts a transaction even without any Insert/update/delete command, so I
had to explain that to my developers.

On Fri, Apr 28, 2017 at 11:04 AM, John R Pierce  wrote:

> On 4/28/2017 7:39 AM, Andrew Kerber wrote:
>
>> I am a fairly experienced Oracle DBA, and we are starting to move in to
>> the PostgreSQL world.  I would expect the standard monitoring items are
>> required for mission critical postgres apps, Ie, disk space, wal log space,
>> log monitoring, process counts,software running, connection available on
>> the correct port, CPU usage.
>>
>
> the nagios project has a rather handy monitoring script, check_postgres,
> this is a perl script that can be invoked from most any configurable
> monitoring framework, and has options to do 100s of different sorts of
> things, returning simple terse text output that can be parsed by said
> monitoring framework.
>
>
> Are there additional PostgreSQL specific items that need to be monitored?
>> if so, what items?
>>
>
>
> its always a good idea to watch for stale 'idle in transaction'
> connections, as they gum up the important VACUUM processing.   you can make
> a simple query against pg_stat_activity to find the oldest 'idle in
> transaction', and if there are any more than, say, 1 hour old, its worth
> tracking down why they are happening and hammering the developers to fix
> it.oracle developers working in java seem to generate a lot of these
> (speaking from experience) if they aren't careful to avoid it.   Postgres
> JDBC starts a transaction on a simple SELECT, and if the app then just sits
> there doing nothing, that transaction stays open indefinitely.   I had a
> lot of pushback from developers insisting that SELECT's should not need
> commit.
>
> the one big thing I don't see mentioned in your list above is monitoring
> replication
>
> --
> john r pierce, recycling bits in santa cruz
>
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>



-- 
Andrew W. Kerber

'If at first you dont succeed, dont take up skydiving.'


Re: [GENERAL] PostgreSQL Required Monitoring

2017-04-28 Thread John R Pierce

On 4/28/2017 7:39 AM, Andrew Kerber wrote:
I am a fairly experienced Oracle DBA, and we are starting to move in 
to the PostgreSQL world.  I would expect the standard monitoring items 
are required for mission critical postgres apps, Ie, disk space, wal 
log space, log monitoring, process counts,software running, connection 
available on the correct port, CPU usage.


the nagios project has a rather handy monitoring script, check_postgres, 
this is a perl script that can be invoked from most any configurable 
monitoring framework, and has options to do 100s of different sorts of 
things, returning simple terse text output that can be parsed by said 
monitoring framework.



Are there additional PostgreSQL specific items that need to be 
monitored?  if so, what items? 



its always a good idea to watch for stale 'idle in transaction' 
connections, as they gum up the important VACUUM processing.   you can 
make a simple query against pg_stat_activity to find the oldest 'idle in 
transaction', and if there are any more than, say, 1 hour old, its worth 
tracking down why they are happening and hammering the developers to fix 
it.oracle developers working in java seem to generate a lot of these 
(speaking from experience) if they aren't careful to avoid it.   
Postgres JDBC starts a transaction on a simple SELECT, and if the app 
then just sits there doing nothing, that transaction stays open 
indefinitely.   I had a lot of pushback from developers insisting that 
SELECT's should not need commit.


the one big thing I don't see mentioned in your list above is monitoring 
replication


--
john r pierce, recycling bits in santa cruz



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] PostgreSQL Required Monitoring

2017-04-28 Thread Jan Keirse
On Fri, Apr 28, 2017 at 4:39 PM, Andrew Kerber 
wrote:

> I am a fairly experienced Oracle DBA, and we are starting to move in to
> the PostgreSQL world.  I would expect the standard monitoring items are
> required for mission critical postgres apps, Ie, disk space, wal log space,
> log monitoring, process counts,software running, connection available on
> the correct port, CPU usage.
>
> Are there additional PostgreSQL specific items that need to be monitored?
> if so, what items?
>
>
​In addition to what has already been mentioned I also monitor pg_locks .​
Not just counts but also mode, duration and non granted locks.

-- 


 DISCLAIMER 

http://www.tvh.com/glob/en/email-disclaimer

"This message is delivered to all addressees subject to the conditions
set forth in the attached disclaimer, which is an integral part of this
message."


Re: [GENERAL] PostgreSQL Required Monitoring

2017-04-28 Thread Melvin Davidson
On Fri, Apr 28, 2017 at 10:46 AM, Joshua D. Drake 
wrote:

> On 04/28/2017 07:39 AM, Andrew Kerber wrote:
>
>> I am a fairly experienced Oracle DBA, and we are starting to move in to
>> the PostgreSQL world.  I would expect the standard monitoring items are
>> required for mission critical postgres apps, Ie, disk space, wal log
>> space, log monitoring, process counts,software running, connection
>> available on the correct port, CPU usage.
>>
>> Are there additional PostgreSQL specific items that need to be
>> monitored?  if so, what items?
>>
>
> Pretty much anything that starts with pg_stat_
>
> JD
>
>
> --
> Command Prompt, Inc.  http://the.postgres.company/
> +1-503-667-4564
> PostgreSQL Centered full stack support, consulting and development.
> Everyone appreciates your honesty, until you are honest with them.
> Unless otherwise stated, opinions are my own.
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

One thing I always monitor is index sizes, usage and status. See attached
pg_stat_all_indexes.sh

-- 
*Melvin Davidson*
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.


pg_stat_all_indexes.sh
Description: Bourne shell script

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] PostgreSQL Required Monitoring

2017-04-28 Thread Joshua D. Drake

On 04/28/2017 07:39 AM, Andrew Kerber wrote:

I am a fairly experienced Oracle DBA, and we are starting to move in to
the PostgreSQL world.  I would expect the standard monitoring items are
required for mission critical postgres apps, Ie, disk space, wal log
space, log monitoring, process counts,software running, connection
available on the correct port, CPU usage.

Are there additional PostgreSQL specific items that need to be
monitored?  if so, what items?


Pretty much anything that starts with pg_stat_

JD


--
Command Prompt, Inc.  http://the.postgres.company/
+1-503-667-4564
PostgreSQL Centered full stack support, consulting and development.
Everyone appreciates your honesty, until you are honest with them.
Unless otherwise stated, opinions are my own.


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] PostgreSQL Required Monitoring

2017-04-28 Thread Andrew Kerber
I am a fairly experienced Oracle DBA, and we are starting to move in to the
PostgreSQL world.  I would expect the standard monitoring items are
required for mission critical postgres apps, Ie, disk space, wal log space,
log monitoring, process counts,software running, connection available on
the correct port, CPU usage.

Are there additional PostgreSQL specific items that need to be monitored?
if so, what items?

-- 
Andrew W. Kerber

'If at first you dont succeed, dont take up skydiving.'


Re: [GENERAL] PostgreSQL upgrade best practices, please share your thoughts

2017-04-27 Thread Adrian Klaver

On 04/27/2017 08:41 AM, Daniel Westermann wrote:

Hi all,

currently I am preparing my session (PostgreSQL upgrade best practices)
for the Swiss PGDay 2017 (http://www.pgday.ch/2017/). What I plan to
come up with is:

- Support policy
- Release notes
- Why it is important to upgrade (or at least to patch to the latest
minor release)
- Minor version upgrades vs major version upgrades
- The importance of version specific directories
- What to take care of with tablespaces
- What to take care of with extensions
- Pain points with (missing) statistics after the upgrade
- Upgrades using pg_dump
- Upgrades using pg_dumpall for global objects and then pg_dump in parallel
- pg_upgrade (check mode, normal mode vs. link mode, upgrading with
streaming replication configurations)
- Getting support (mailing lists)
- PostgreSQL 10: Logical replication

What I would like to ask you:
What would you add to the above list?


That is an ambitious agenda and I sincerely wish you the best on pulling 
it together.


Not sure if these are already covered as sub-points

- Minor version upgrades vs major version upgrades
Make clear that the version numbering that distinguishes this is 
changing with version 10.


- Getting support (mailing lists)
Differentiate between the community version vs versions with proprietary 
extension.


A new point.

Postgres source
The importance of verifying where the different instances of Postgres 
came from. It is not uncommon to see cross contamination issues because 
someone went from using a self compiled version to one from a package or 
pulled from different repos.




Can you please share what issues you had when upgrading and maybe how
you solved it? I'd love to include as much information as possible.

Thanks in advance
Daniel




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


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] PostgreSQL upgrade best practices, please share your thoughts

2017-04-27 Thread Daniel Westermann
Hi all, 

currently I am preparing my session (PostgreSQL upgrade best practices) for the 
Swiss PGDay 2017 (http://www.pgday.ch/2017/). What I plan to come up with is: 

- Support policy 
- Release notes 
- Why it is important to upgrade (or at least to patch to the latest minor 
release) 
- Minor version upgrades vs major version upgrades 
- The importance of version specific directories 
- What to take care of with tablespaces 
- What to take care of with extensions 
- Pain points with (missing) statistics after the upgrade 
- Upgrades using pg_dump 
- Upgrades using pg_dumpall for global objects and then pg_dump in parallel 
- pg_upgrade (check mode, normal mode vs. link mode, upgrading with streaming 
replication configurations) 
- Getting support (mailing lists) 
- PostgreSQL 10: Logical replication 

What I would like to ask you: 
What would you add to the above list? 
Can you please share what issues you had when upgrading and maybe how you 
solved it? I'd love to include as much information as possible. 

Thanks in advance 
Daniel 



Re: [GENERAL] postgresql-plperl-9.4 : Depends: libperl5.18 (>= 5.18.2) but it is not installable

2017-04-11 Thread Muhammad Hanif Abdul Hamid
Dear Adrian,

Solved, it is due to pgdg.list.

Typo, it should be xenial-pgdg instead of trusty-pgdg for the repository.

Thank you.

-Original Message-
From: Adrian Klaver [mailto:adrian.kla...@aklaver.com]
Sent: Rabu, 12 April 2017 12:16 ptg
To: Muhammad Hanif Abdul Hamid <hanif.ha...@mimos.my>; pgsql-general 
<pgsql-general@postgresql.org>
Subject: Re: [GENERAL] postgresql-plperl-9.4 : Depends: libperl5.18 (>= 5.18.2) 
but it is not installable

On 04/11/2017 07:23 PM, Muhammad Hanif Abdul Hamid wrote:
> Dear Admin,
>
>
>
> I would like to install “postgresql-plperl-9.4” package, however it
> failed due to the “libperl5.18” dependency is lower than “libperl5.22”
> installed as below:-

Obviously some Debian derived distribution, but what one and version number?

Which repos are you using the system or the PGDG ones?

On my Ubuntu 16.04.2 LTS machine using the PGDG repos I get:

aklaver@arkansas:~$ apt-cache show postgresql-plperl-9.4
Package: postgresql-plperl-9.4
Source: postgresql-9.4
Version: 9.4.11-1.pgdg16.04+1
Architecture: amd64
Maintainer: Debian PostgreSQL Maintainers 
<pkg-postgresql-pub...@lists.alioth.debian.org>
Installed-Size: 233
Depends: libc6 (>= 2.4), libperl5.22 (>= 5.22.1), postgresql-9.4 (= 
9.4.11-1.pgdg16.04+1), perl
Provides: postgresql-plperl
Filename:
pool/main/p/postgresql-9.4/postgresql-plperl-9.4_9.4.11-1.pgdg16.04+1_amd64.deb

which matches up with the installed Perl lib:

aklaver@arkansas:~$ dpkg -l| grep libperl

ii  libperl5.22:amd64 5.22.1-9 amd64shared Perl library


>
>
>
> root@db:/home/prod# apt-get install postgresql-plperl-9.4
>

>
>
> The following packages have unmet dependencies:
>
> postgresql-plperl-9.4 : Depends: libperl5.18 (>= 5.18.2) but it is not
> installable
>
> E: Unable to correct problems, you have held broken packages.
>
> root@db:/home/oneadmin# dpkg -l|grep libperl
>
> ii  libperl5.22:amd64   5.22.1-9
> amd64shared Perl library
>
> root@db:/home/prod#



>
>
>
> Please advise.
>
>
>
> Thank you.
>
>
>
>
> --
> --
> *DISCLAIMER:*
>
> This e-mail (including any attachments) is for the addressee(s) only
> and may be confidential, especially as regards personal data. If you
> are not the intended recipient, please note that any dealing, review,
> distribution, printing, copying or use of this e-mail is strictly
> prohibited. If you have received this email in error, please notify
> the sender immediately and delete the original message (including any
> attachments).
>
> MIMOS Berhad is a research and development institution under the
> purview of the Malaysian Ministry of Science, Technology and Innovation.
> Opinions, conclusions and other information in this e-mail that do not
> relate to the official business of MIMOS Berhad and/or its
> subsidiaries shall be understood as neither given nor endorsed by
> MIMOS Berhad and/or its subsidiaries and neither MIMOS Berhad nor its
> subsidiaries accepts responsibility for the same. All liability
> arising from or in connection with computer viruses and/or corrupted
> e-mails is excluded to the fullest extent permitted by law.
>


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


DISCLAIMER:


This e-mail (including any attachments) is for the addressee(s) only and may be 
confidential, especially as regards personal data. If you are not the intended 
recipient, please note that any dealing, review, distribution, printing, 
copying or use of this e-mail is strictly prohibited. If you have received this 
email in error, please notify the sender immediately and delete the original 
message (including any attachments).

MIMOS Berhad is a research and development institution under the purview of the 
Malaysian Ministry of Science, Technology and Innovation. Opinions, conclusions 
and other information in this e-mail that do not relate to the official 
business of MIMOS Berhad and/or its subsidiaries shall be understood as neither 
given nor endorsed by MIMOS Berhad and/or its subsidiaries and neither MIMOS 
Berhad nor its subsidiaries accepts responsibility for the same. All liability 
arising from or in connection with computer viruses and/or corrupted e-mails is 
excluded to the fullest extent permitted by law.

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] postgresql-plperl-9.4 : Depends: libperl5.18 (>= 5.18.2) but it is not installable

2017-04-11 Thread Adrian Klaver

On 04/11/2017 07:23 PM, Muhammad Hanif Abdul Hamid wrote:

Dear Admin,



I would like to install “postgresql-plperl-9.4” package, however it
failed due to the “libperl5.18” dependency is lower than “libperl5.22”
installed as below:-


Obviously some Debian derived distribution, but what one and version number?

Which repos are you using the system or the PGDG ones?

On my Ubuntu 16.04.2 LTS machine using the PGDG repos I get:

aklaver@arkansas:~$ apt-cache show postgresql-plperl-9.4
Package: postgresql-plperl-9.4
Source: postgresql-9.4
Version: 9.4.11-1.pgdg16.04+1
Architecture: amd64
Maintainer: Debian PostgreSQL Maintainers 


Installed-Size: 233
Depends: libc6 (>= 2.4), libperl5.22 (>= 5.22.1), postgresql-9.4 (= 
9.4.11-1.pgdg16.04+1), perl

Provides: postgresql-plperl
Filename: 
pool/main/p/postgresql-9.4/postgresql-plperl-9.4_9.4.11-1.pgdg16.04+1_amd64.deb


which matches up with the installed Perl lib:

aklaver@arkansas:~$ dpkg -l| grep libperl

ii  libperl5.22:amd64 5.22.1-9 amd64shared Perl library






root@db:/home/prod# apt-get install postgresql-plperl-9.4






The following packages have unmet dependencies:

postgresql-plperl-9.4 : Depends: libperl5.18 (>= 5.18.2) but it is not
installable

E: Unable to correct problems, you have held broken packages.

root@db:/home/oneadmin# dpkg -l|grep libperl

ii  libperl5.22:amd64   5.22.1-9
amd64shared Perl library

root@db:/home/prod#








Please advise.



Thank you.





*DISCLAIMER:*

This e-mail (including any attachments) is for the addressee(s) only and
may be confidential, especially as regards personal data. If you are not
the intended recipient, please note that any dealing, review,
distribution, printing, copying or use of this e-mail is strictly
prohibited. If you have received this email in error, please notify the
sender immediately and delete the original message (including any
attachments).

MIMOS Berhad is a research and development institution under the purview
of the Malaysian Ministry of Science, Technology and Innovation.
Opinions, conclusions and other information in this e-mail that do not
relate to the official business of MIMOS Berhad and/or its subsidiaries
shall be understood as neither given nor endorsed by MIMOS Berhad and/or
its subsidiaries and neither MIMOS Berhad nor its subsidiaries accepts
responsibility for the same. All liability arising from or in connection
with computer viruses and/or corrupted e-mails is excluded to the
fullest extent permitted by law.




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


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] postgresql-plperl-9.4 : Depends: libperl5.18 (>= 5.18.2) but it is not installable

2017-04-11 Thread Muhammad Hanif Abdul Hamid
Dear Admin,



I would like to install “postgresql-plperl-9.4” package, however it failed due 
to the “libperl5.18” dependency is lower than “libperl5.22” installed as below:-



root@db:/home/prod# apt-get install postgresql-plperl-9.4

Reading package lists... Done

Building dependency tree

Reading state information... Done

Some packages could not be installed. This may mean that you have

requested an impossible situation or if you are using the unstable

distribution that some required packages have not yet been created

or been moved out of Incoming.

The following information may help to resolve the situation:



The following packages have unmet dependencies:

postgresql-plperl-9.4 : Depends: libperl5.18 (>= 5.18.2) but it is not 
installable

E: Unable to correct problems, you have held broken packages.

root@db:/home/oneadmin# dpkg -l|grep libperl

ii  libperl5.22:amd64   5.22.1-9amd64   
 shared Perl library

root@db:/home/prod#


Please advise.



Thank you.



DISCLAIMER:


This e-mail (including any attachments) is for the addressee(s) only and may be 
confidential, especially as regards personal data. If you are not the intended 
recipient, please note that any dealing, review, distribution, printing, 
copying or use of this e-mail is strictly prohibited. If you have received this 
email in error, please notify the sender immediately and delete the original 
message (including any attachments).

MIMOS Berhad is a research and development institution under the purview of the 
Malaysian Ministry of Science, Technology and Innovation. Opinions, conclusions 
and other information in this e-mail that do not relate to the official 
business of MIMOS Berhad and/or its subsidiaries shall be understood as neither 
given nor endorsed by MIMOS Berhad and/or its subsidiaries and neither MIMOS 
Berhad nor its subsidiaries accepts responsibility for the same. All liability 
arising from or in connection with computer viruses and/or corrupted e-mails is 
excluded to the fullest extent permitted by law.


Re: [GENERAL] PostgreSQL and Kubernetes

2017-04-10 Thread Moreno Andreo

  
  
Il 03/04/2017 22:32, Alex Kliukin ha
  scritto:

as it makes little sense to build an aircraft carrier
  to carry a single Cessna. 

:-) A bit extreme, but it makes the idea ...
Thanks
Moreno.-

  
  
   
  

  Kind
regards,
  --
  Oleksii
“Alex" Kliukin

  
  



  





Re: [GENERAL] PostgreSQL and Kubernetes

2017-04-10 Thread Moreno Andreo

Il 03/04/2017 18:10, Joe Conway ha scritto:

On 03/31/2017 01:58 AM, Moreno Andreo wrote:

Il 30/03/2017 14:38, Vick Khera ha scritto:

On Thu, Mar 30, 2017 at 6:10 AM, Moreno Andreo
> wrote:

 Since I'm on Google Cloud Platform, I thought it would be a good
 idea to see what it offers.


They currently have in beta a Postgres flavor of their cloudsql. I
haven't used it yet, but I plan to test it sometime in the next couple
of months.

I'm aware of this (and I'm about to test it too), but while this is in
beta I need a solution to keep up with my architecture... I can't stay
with a single server and no backup (except a snapshot of the disk made
on a daily basis... but that's no real backup) waiting for Cloud SQL to
get out of beta...

Take a look at:
https://github.com/CrunchyData/crunchy-containers
This is another good post... but I decided to keep the current 
architecture, adding a standby server managed by repmgr and load 
balanced by PgPool II, with barman taking care of the backup. I don't 
think spending more than a week studying the docs and preparing the 
whole thing in test lab.


If I'm about to migrate to Cloud SQL I think it's not worth the effort 
to create a new structure and migrate in there, just for some time... 
and then migrate again to CloudSQL.


Thanks again
Moreno.-



HTH,

Joe






--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] PostgreSQL and Kubernetes

2017-04-03 Thread Alex Kliukin

> On 30. Mar 2017, at 12:10, Moreno Andreo  wrote:

> as databases aren't built for type of dynamic scheduling that something like 
> kubernetes (or any other container management solution), due to how they 
> interact with the filesystem, network stack, and more.
> Further more, he suggests that because of this lack of integration, that if 
> you do run your database in kubernetes/docker, you are very likely to 
> encounter data corruption and data loss"
> 
> What's your advice?


I think dynamic scheduling just increases the chances of your database instance 
being killed. Your K8S cluster, if not configured properly, may decide to kill 
your master database pod when scaling down nodes in order to utilise resources 
efficiently.

If you run your PostgreSQL on K8S make sure you have a good and battle-tested 
HA setup, know your way around configuring both PostgreSQL streaming 
replication and Kubernetes cluster, and have a number of databases to manage, 
as it makes little sense to build an aircraft carrier to carry a single Cessna. 

 
Kind regards,
--
Oleksii “Alex" Kliukin



Re: [GENERAL] PostgreSQL and Kubernetes

2017-04-03 Thread Joe Conway
On 03/31/2017 01:58 AM, Moreno Andreo wrote:
> Il 30/03/2017 14:38, Vick Khera ha scritto:
>>
>> On Thu, Mar 30, 2017 at 6:10 AM, Moreno Andreo
>> > wrote:
>>
>> Since I'm on Google Cloud Platform, I thought it would be a good
>> idea to see what it offers. 
>>
>>
>> They currently have in beta a Postgres flavor of their cloudsql. I
>> haven't used it yet, but I plan to test it sometime in the next couple
>> of months.
> 
> I'm aware of this (and I'm about to test it too), but while this is in
> beta I need a solution to keep up with my architecture... I can't stay
> with a single server and no backup (except a snapshot of the disk made
> on a daily basis... but that's no real backup) waiting for Cloud SQL to
> get out of beta...

Take a look at:
https://github.com/CrunchyData/crunchy-containers

HTH,

Joe

-- 
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development



signature.asc
Description: OpenPGP digital signature


Re: [GENERAL] PostgreSQL and Kubernetes

2017-03-31 Thread Moreno Andreo

  
  
Il 30/03/2017 14:38, Vick Khera ha
  scritto:


  

  On Thu, Mar 30, 2017 at 6:10 AM,
Moreno Andreo 
wrote:
Since
  I'm on Google Cloud Platform, I thought it would be a good
  idea to see what it offers. 
  
  
  They currently have in beta a Postgres flavor of their
  cloudsql. I haven't used it yet, but I plan to test it
  sometime in the next couple of months.
  

I'm aware of this (and I'm about to test it too), but while this
  is in beta I need a solution to keep up with my architecture... I
  can't stay with a single server and no backup (except a snapshot
  of the disk made on a daily basis... but that's no real backup)
  waiting for Cloud SQL to get out of beta...

  





Re: [GENERAL] PostgreSQL and Kubernetes

2017-03-30 Thread Moreno Andreo

Il 30/03/2017 15:27, Adrian Klaver ha scritto:

On 03/30/2017 03:10 AM, Moreno Andreo wrote:


Hi everyone,
I was googling around while searching stuff to finish my cluster
solution (already running in production in single-server mode) with
barman and pgbouncer, when I ran into this

https://hackernoon.com/postgresql-cluster-into-kubernetes-cluster-f353cde212de 



Since I'm on Google Cloud Platform, I thought it would be a good idea to
see what it offers. 

[snip]

What's your advice?


I don't us eKubernetes, 
neither do I, at the moment. but if there's to dig into something 
new, I'm always ready!



but I do know one of the former members of the Postgres Core does:

https://opensource.com/article/17/2/stateful-applications

That's a *niiice* article!


and delivered a talk at Scale15x on it:

http://www.socallinuxexpo.org/scale/15x/presentations/ccp-containerized-clustered-postgres 



https://www.youtube.com/watch?v=mxmZv9xkc8s

I'll take a look later

Thanks a lot!!!
Best regards
Moreno.


Go to about 3 minutes in on the video as there are sound/video issues 
before that.




Thanks in advance,
Moreno








--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] PostgreSQL and Kubernetes

2017-03-30 Thread Adrian Klaver

On 03/30/2017 03:10 AM, Moreno Andreo wrote:


Hi everyone,
I was googling around while searching stuff to finish my cluster
solution (already running in production in single-server mode) with
barman and pgbouncer, when I ran into this

https://hackernoon.com/postgresql-cluster-into-kubernetes-cluster-f353cde212de

Since I'm on Google Cloud Platform, I thought it would be a good idea to
see what it offers. After a quick read, I found a comment saying
*"There was a series of comments by Kelsey Hightower about running
databases in Kubernetes, both at conferences and on Twitter; he
essentially says that you should absolutely NOT run your database in a
container/kubernetes pod/service/deployment, as databases aren't built
for type of dynamic scheduling that something like kubernetes (or any
other container management solution), due to how they interact with the
filesystem, network stack, and more.*
*Further more, he suggests that because of this lack of integration,
that if you do run your database in kubernetes/docker, you are very
likely to encounter data corruption and data loss"*

What's your advice?


I don't us eKubernetes, but I do know one of the former members of the 
Postgres Core does:


https://opensource.com/article/17/2/stateful-applications

and delivered a talk at Scale15x on it:

http://www.socallinuxexpo.org/scale/15x/presentations/ccp-containerized-clustered-postgres

https://www.youtube.com/watch?v=mxmZv9xkc8s

Go to about 3 minutes in on the video as there are sound/video issues 
before that.




Thanks in advance,
Moreno



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


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] PostgreSQL and Kubernetes

2017-03-30 Thread Vick Khera
On Thu, Mar 30, 2017 at 6:10 AM, Moreno Andreo 
wrote:

> Since I'm on Google Cloud Platform, I thought it would be a good idea to
> see what it offers.


They currently have in beta a Postgres flavor of their cloudsql. I haven't
used it yet, but I plan to test it sometime in the next couple of months.


[GENERAL] PostgreSQL and Kubernetes

2017-03-30 Thread Moreno Andreo

  
  

Hi everyone,
    I was googling around while searching stuff to finish my cluster
solution (already running in production in single-server mode) with
barman and pgbouncer, when I ran into this

https://hackernoon.com/postgresql-cluster-into-kubernetes-cluster-f353cde212de

Since I'm on Google Cloud Platform, I thought it would be a good
idea to see what it offers. After a quick read, I found a comment
saying 
"There was a series of comments by Kelsey Hightower about running
  databases in Kubernetes, both at conferences and on Twitter; he
  essentially says that you should absolutely NOT run your database
  in a container/kubernetes pod/service/deployment, as databases
  aren't built for type of dynamic scheduling that something like
  kubernetes (or any other container management solution), due to
  how they interact with the filesystem, network stack, and more.
Further more, he suggests that because of this lack of
  integration, that if you do run your database in
  kubernetes/docker, you are very likely to encounter data
  corruption and data loss"

What's your advice?
Thanks in advance,
Moreno
  





Re: [GENERAL] PostgreSQL general discussions list - 2010 Thread: Wikipedia entry - AmigaOS port - error?

2017-03-14 Thread Michael Paquier
On Tue, Mar 14, 2017 at 6:40 PM, Rakesh Kumar
 wrote:
>>More to the point, whatever "MorphOS" is, it isn't AmigaOS.  It was pretty
>>clearly stated in the original thread that AmigaOS had no support for
>>fork(), without which there was no chance of running Postgres.
>
> Just curious, if PG is completely dependent on fork(), how was it ported to 
> Windows
> which also does not support fork directly.

There is a special treatment here with EXEC_BACKEND, so you can get PG
to work even if fork() is not in the area.
-- 
Michael


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] PostgreSQL general discussions list - 2010 Thread: Wikipedia entry - AmigaOS port - error?

2017-03-14 Thread Rakesh Kumar
>More to the point, whatever "MorphOS" is, it isn't AmigaOS.  It was pretty
>clearly stated in the original thread that AmigaOS had no support for
>fork(), without which there was no chance of running Postgres. 

Just curious, if PG is completely dependent on fork(), how was it ported to 
Windows
which also does not support fork directly.

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] PostgreSQL general discussions list - 2010 Thread: Wikipedia entry - AmigaOS port - error?

2017-03-13 Thread Scott Marlowe
On Mon, Mar 13, 2017 at 11:15 PM, John R Pierce  wrote:
> On 3/13/2017 10:06 PM, Scott Marlowe wrote:
>
> I am pretty sure it is:
>
> https://en.wikipedia.org/wiki/Comparison_of_relational_database_management_systems#Operating_system_support
>
> PostgreSQL  Yes Yes Yes Yes Yes Yes (MorphOS)[24]
>
> Oh man, 2005's versuin 6.3.2.  It's more of a historical oddity than a

Correction 1998's.

> version I'd ever wanna run. Isn't there some way to get gnuc etc
> running on an amiga and then work on direct support of the platform if
> that's what you want? I'd think paying a well known amiga hacker to
> port it would be a worthwhile investment.
>
>
>
> indeed, a 12 year old one-time port to an obscure platform which is at best
> a historical oddity does no one any favors.  if its not supported and
> reasonably current, it might as well not exist.
>
>
> --
> john r pierce, recycling bits in santa cruz



-- 
To understand recursion, one must first understand recursion.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] PostgreSQL general discussions list - 2010 Thread: Wikipedia entry - AmigaOS port - error?

2017-03-13 Thread John R Pierce

On 3/13/2017 10:06 PM, Scott Marlowe wrote:

I am pretty sure it is:

https://en.wikipedia.org/wiki/Comparison_of_relational_database_management_systems#Operating_system_support

PostgreSQL  Yes Yes Yes Yes Yes Yes (MorphOS)[24]


Oh man, 2005's versuin 6.3.2.  It's more of a historical oddity than a
version I'd ever wanna run. Isn't there some way to get gnuc etc
running on an amiga and then work on direct support of the platform if
that's what you want? I'd think paying a well known amiga hacker to
port it would be a worthwhile investment.



indeed, a 12 year old one-time port to an obscure platform which is at 
best a historical oddity does no one any favors.  if its not supported 
and reasonably current, it might as well not exist.



--
john r pierce, recycling bits in santa cruz



Re: [GENERAL] PostgreSQL general discussions list - 2010 Thread: Wikipedia entry - AmigaOS port - error?

2017-03-13 Thread Tom Lane
Scott Marlowe  writes:
> On Mon, Mar 13, 2017 at 10:41 PM, Adrian Klaver
>  wrote:
>> I am pretty sure it is:
>> https://en.wikipedia.org/wiki/Comparison_of_relational_database_management_systems#Operating_system_support
>> PostgreSQL  Yes Yes Yes Yes Yes Yes (MorphOS)[24]

> Oh man, 2005's versuin 6.3.2.  It's more of a historical oddity than a
> version I'd ever wanna run.

More to the point, whatever "MorphOS" is, it isn't AmigaOS.  It was pretty
clearly stated in the original thread that AmigaOS had no support for
fork(), without which there was no chance of running Postgres.  It's not
unreasonable of us to take the position that AmigaOS isn't a supported
platform, because *it is not*, and never has been.

(And, for the record, I didn't edit that wikipedia entry.  I don't even
have a wikipedia account.)

regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] PostgreSQL general discussions list - 2010 Thread: Wikipedia entry - AmigaOS port - error?

2017-03-13 Thread Scott Marlowe
On Mon, Mar 13, 2017 at 10:41 PM, Adrian Klaver
 wrote:
> On 03/13/2017 02:13 AM, Raffaele Irlanda wrote:

>> http://aminet.net/package/dev/gg/postgresql632-mos-bin
>>
>> In 2010 it has been sure completely outdated but sure you can see proof
>> it exists, and that Amiga had full dignity of being present into
>> Wikipedia Article.
>
>
> I am pretty sure it is:
>
> https://en.wikipedia.org/wiki/Comparison_of_relational_database_management_systems#Operating_system_support
>
> PostgreSQL  Yes Yes Yes Yes Yes Yes (MorphOS)[24]
>

Oh man, 2005's versuin 6.3.2.  It's more of a historical oddity than a
version I'd ever wanna run. Isn't there some way to get gnuc etc
running on an amiga and then work on direct support of the platform if
that's what you want? I'd think paying a well known amiga hacker to
port it would be a worthwhile investment.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] PostgreSQL general discussions list - 2010 Thread: Wikipedia entry - AmigaOS port - error?

2017-03-13 Thread Adrian Klaver

On 03/13/2017 02:13 AM, Raffaele Irlanda wrote:

Hello People of PostgreSQL,

Unfortunately only nowadays (March 2017), and only by chance I spotted
this 2010 discussion during a Google search.

Name of discussion:

Wikipedia entry - AmigaOS port - error?

id of message:

https://www.postgresql.org/message-id/839805.58072.qm%40web23603.mail.ird.yahoo.com

I found strange the doubt Mr. Glyn Astill expressed that Amiga platform
entry in Wikipedia about availability of PostgreSQL could be an error,
as he was just unaware that platform had a porting of PostgreSQL even if
unofficial...

Also I found strange the fact Mr. Tom Lane immediately deleted Amiga
reference entry on Wikipedia in article regarding RDBMS without
performing any serious search on Google, lasting more than a couple of
minutes of true serious search, or maybe asking directly into Amiga
Forums about PostgreSQL to Amiga Communituy of Users.

Infacts there is a port of PostgreSQL made in the late 2005 (five years
before your discussion started) present in online Amiga Repository
AMINET and it was available for the Amiga clone Operating System called
MorphOS




http://aminet.net/package/dev/gg/postgresql632-mos-bin

In 2010 it has been sure completely outdated but sure you can see proof
it exists, and that Amiga had full dignity of being present into
Wikipedia Article.


I am pretty sure it is:

https://en.wikipedia.org/wiki/Comparison_of_relational_database_management_systems#Operating_system_support

PostgreSQL  Yes Yes Yes Yes Yes Yes (MorphOS)[24]



A simple Google search could had helped you and sure it had solved your
doubts, or maybe just paying a visit on Amiga Forums that are well
represented online and asking directly to members of Amiga Community
that are well known for their friendly welcome attitude (I can assure
you two that we don't bite people from other platforms) sure had saved
Mr. Tom Lane from his presupponential deletion of Amiga Entry in RDBMS
in Wikipedia.

I get this occasion to inform you gentlemen that there are also various
packages regarding SQLite into Amiga repositories, if you search for it.
Last available package is from 2016, so it is not outdated this time.
and If you are active also in SQLite Community now you have full info
about Amiga portings.

http://aminet.net/search?query=SQLite

Hope from now on future, you will not delete anymore -abruptly- Amiga
entries before informing yourself about Amiga portings availability when
encoutering this platform name by chance on Wikipedia or other sites.

With respect,

Raffaele irlanda



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


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] PostgreSQL general discussions list - 2010 Thread: Wikipedia entry - AmigaOS port - error?

2017-03-13 Thread Raffaele Irlanda
Hello People of PostgreSQL,

Unfortunately only nowadays (March 2017), and only by chance I spotted this
2010 discussion during a Google search.

Name of discussion:

Wikipedia entry - AmigaOS port - error?

id of message:

https://www.postgresql.org/message-id/839805.58072.qm%40web23603.mail.ird.yahoo.com

I found strange the doubt Mr. Glyn Astill expressed that Amiga platform
entry in Wikipedia about availability of PostgreSQL could be an error, as
he was just unaware that platform had a porting of PostgreSQL even if
unofficial...

Also I found strange the fact Mr. Tom Lane immediately deleted Amiga
reference entry on Wikipedia in article regarding RDBMS without performing
any serious search on Google, lasting more than a couple of minutes of true
serious search, or maybe asking directly into Amiga Forums about PostgreSQL
to Amiga Communituy of Users.

Infacts there is a port of PostgreSQL made in the late 2005 (five years
before your discussion started) present in online Amiga Repository AMINET
and it was available for the Amiga clone Operating System called MorphOS

http://aminet.net/package/dev/gg/postgresql632-mos-bin

In 2010 it has been sure completely outdated but sure you can see proof it
exists, and that Amiga had full dignity of being present into Wikipedia
Article.

A simple Google search could had helped you and sure it had solved your
doubts, or maybe just paying a visit on Amiga Forums that are well
represented online and asking directly to members of Amiga Community that
are well known for their friendly welcome attitude (I can assure you two
that we don't bite people from other platforms) sure had saved Mr. Tom Lane
from his presupponential deletion of Amiga Entry in RDBMS in Wikipedia.

I get this occasion to inform you gentlemen that there are also various
packages regarding SQLite into Amiga repositories, if you search for it.
Last available package is from 2016, so it is not outdated this time. and
If you are active also in SQLite Community now you have full info about
Amiga portings.

http://aminet.net/search?query=SQLite

Hope from now on future, you will not delete anymore -abruptly- Amiga
entries before informing yourself about Amiga portings availability when
encoutering this platform name by chance on Wikipedia or other sites.

With respect,

Raffaele irlanda


Re: [GENERAL] postgresql how to duplicate rows in result.

2017-02-21 Thread Tom Lane
Merlin Moncure  writes:
> On Thu, Feb 16, 2017 at 10:27 AM, David G. Johnston
>  wrote:
>> If it wasn't lateral the reference to number in "generate_series(1, number)"
>> would fail.

> huh -- I didn't know that!  Testing it out, all JOIN types imply
> LATERAL if the function call is tlist SRF style (which is pretty werid
> IMO)

Quite.  We wouldn't have done that, except we concluded that the SQL
spec requires it.  I don't recall all the details, but I think there
are specific function-like syntaxes (maybe only UNNEST?) that the spec
says act as if they're always LATERAL.  It seemed like it was less of
a wart to make that true for all function-in-FROM cases than just for
some of them.

> I tend to avoid optional words (with the important exception of
> AS for column list renames) but I think it's a good idea to disclose
> LATERAL in this case.

Agreed.  We do make rule printing show LATERAL explicitly when it's
active:

regression=# create view vv as select * from int8_tbl cross join 
generate_series(1,q1) g;
CREATE VIEW
regression=# \d+ vv
 View "public.vv"
 Column |  Type  | Collation | Nullable | Default | Storage | Description 
++---+--+-+-+-
 q1 | bigint |   |  | | plain   | 
 q2 | bigint |   |  | | plain   | 
 g  | bigint |   |  | | plain   | 
View definition:
 SELECT int8_tbl.q1,
int8_tbl.q2,
g.g
   FROM int8_tbl
 CROSS JOIN LATERAL generate_series(1::bigint, int8_tbl.q1) g(g);


regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] postgresql how to duplicate rows in result.

2017-02-21 Thread Merlin Moncure
On Thu, Feb 16, 2017 at 10:27 AM, David G. Johnston
 wrote:
> If it wasn't lateral the reference to number in "generate_series(1, number)"
> would fail.

huh -- I didn't know that!  Testing it out, all JOIN types imply
LATERAL if the function call is tlist SRF style (which is pretty werid
IMO)  I tend to avoid optional words (with the important exception of
AS for column list renames) but I think it's a good idea to disclose
LATERAL in this case.  It's a big clue to the reader what is going on
and the expanded form:

SELECT foo.* FROM foo CROSS JOIN LATERAL (SELECT a,b FROM func(foo.bar)) q;

... requires LATERAL to be explicitly stated.  This form is more
general since it can be cleanly used when func() returns more than one
column.

merlin


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


  1   2   3   4   5   6   7   8   9   10   >