[no subject]

2022-06-08 Thread Jim McNamara
Hi -

Does anyone use the gawk extension? I think it is the coolest thing.

I see that it installed .so files on my system from the fedora package
manager but there is no .sql file or control file in the extension
directory.

I searched with kfind utility and didn't find anything.

I can't seem to use create extension to get it installed.

Please help if you know the trick.

thanks


Fwd:

2022-06-08 Thread Jim McNamara
gawk extension for postgresql

-- Forwarded message -
From: Jim McNamara 
Date: Wed, Jun 8, 2022 at 6:51 AM
Subject:
To: 


Hi -

Does anyone use the gawk extension? I think it is the coolest thing.

I see that it installed .so files on my system from the fedora package
manager but there is no .sql file or control file in the extension
directory.

I searched with kfind utility and didn't find anything.

I can't seem to use create extension to get it installed.

Please help if you know the trick.

thanks


FATAL: could not receive timeline history file from the primary server: ERROR: could not open file "pg_wal/0000000x.history": No such file or directory

2022-06-08 Thread pgdba pgdba
hello everyone,

I want to install a two-node streaming replication with postgresql version 11, 
but I'm getting this error when starting the service of my slave node. Can you 
support me? I couldn't find the solution.

FATAL:  could not receive timeline history file from the primary server: ERROR: 
 could not open file "pg_wal/0002.history": No such file or directory


slave node has recovery.conf file and include primary_con_info informations.


Thanks


gawk extension linux missing stuff in package manager fedora 36

2022-06-08 Thread Jim McNamara
Hi guys-

I forgot to put a subject and then when I went to correct it failed to put
a subject yet again. Sorry about that.

I installed gawk postgresql extension with my fedora package manager. I'd
like to use create extension.

The package doesn't contain the sql or control file in
/usr/share/pgsql/extensions. It did install .so files though. I ran sudo
dnf repoquery -l package name and looked at the files.
I can't seem to install the extension. I also took a gander at the .tar.gz
file and didn't see an .sql file or control file either.

 Is there any way I can get a little help?

I'd love to use gawk with postgresql. I think it is the coolest idea.

thanks for your help,
jim


Re: gawk extension linux missing stuff in package manager fedora 36

2022-06-08 Thread Daniel Verite
Jim McNamara wrote:

> The package doesn't contain the sql or control file in
> /usr/share/pgsql/extensions. It did install .so files though. I ran sudo
> dnf repoquery -l package name and looked at the files.

It's probably this library:
http://gawkextlib.sourceforge.net/pgsql/gawk-pgsql.html

Quote:
  This API can be used by either invoking gawk with a command-line
  argument of -l pgsql or by inserting @load "pgsql" in your script.

It's not a PostgreSQL server-side extension. It's a client-side
gawk plugin to query a postgres database from inside a gawk
script.



Best regards,
-- 
Daniel Vérité
https://postgresql.verite.pro/
Twitter: @DanielVerite




Re:

2022-06-08 Thread Ian Lawrence Barwick
2022年6月8日(水) 19:51 Jim McNamara :
>
> Hi -
>
> Does anyone use the gawk extension? I think it is the coolest thing.
>
> I see that it installed .so files on my system from the fedora package 
> manager but there is no .sql file or control file in the extension directory.
>
> I searched with kfind utility and didn't find anything.
>
> I can't seem to use create extension to get it installed.
>
> Please help if you know the trick.

Are you talking about this: http://gawkextlib.sourceforge.net/pgsql/pgsql.html ?

I haven't used it, but from the description it sounds like an extension for the
gawk utility which provides PostgreSQL connectivity via libpq, not an extension
to be installed in PostgreSQL.

Regards

Ian Barwick




Re: FATAL: could not receive timeline history file from the primary server: ERROR: could not open file "pg_wal/0000000x.history": No such file or directory

2022-06-08 Thread Kyotaro Horiguchi
At Wed, 8 Jun 2022 16:43:55 +, pgdba pgdba  
wrote in 
> hello everyone,
> 
> I want to install a two-node streaming replication with postgresql version 
> 11, but I'm getting this error when starting the service of my slave node. 
> Can you support me? I couldn't find the solution.
> 
> FATAL:  could not receive timeline history file from the primary server: 
> ERROR:  could not open file "pg_wal/0002.history": No such file or 
> directory

It seems like that the stanby is on TLI=1 and the primary is on 2 or
greater (call it n).  In that case, at replication start, the standby
requests to the primary every history (000n.history) files from
TLI=2 to TLI=n if the standby doesn't have.

Thus, the message means 002.history has been somehow removed in
pg_wal of the primary, but I'm not sure how come it happened.

If you did remove some history files on primary, do not remove them
for between the TLIs of primary and standby.

> slave node has recovery.conf file and include primary_con_info informations.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center




Fwd: message log merge (streaming replication)

2022-06-08 Thread Peter Adlersburg
Dear fellow DBA's,


While troubleshooting one of our production replication clusters (phys.
streaming replication using the patroni framework)
I stumbled over a - at least for me - strange phenomenon in the postgres
logs of the two cluster members:

*** node-01 ***

[postgres@db-node-01 main]$ grep 'LOG:  database' postgresql-2022-06-05.log
time=2022-06-05 18:25:26 CEST, pid=1720 LOG:  database system is shut down
time=2022-06-05 18:25:29 CEST, pid=3252374 LOG:  database system was shut
down at 2022-06-05 18:25:23 CEST
time=2022-06-05 18:25:31 CEST, pid=3252371 LOG:  database system is ready
to accept read only connections
time=2022-06-05 18:29:11 CEST, pid=3252371 LOG:  database system is ready
to accept connections
time=2022-06-05 18:32:01 CEST, pid=1816 LOG:  database system was
interrupted while in recovery at log time 2022-06-05 18:29:11 CEST
time=2022-06-05 18:32:03 CEST, pid=1813 LOG:  database system is ready to
accept read only connections
time=2022-06-05 19:00:26 CEST, pid=1813 LOG:  database system is ready to
accept connections

*** node-02 ***

[postgres@db-node-02 main]$ grep 'LOG:  database' postgresql-2022-06-05.log
time=2022-06-05 18:25:26 CEST, pid=1720 LOG:  database system is shut down
time=2022-06-05 18:25:29 CEST, pid=3252374 LOG:  database system was shut
down at 2022-06-05 18:25:23 CEST
time=2022-06-05 18:25:31 CEST, pid=3252371 LOG:  database system is ready
to accept read only connections
time=2022-06-05 18:29:11 CEST, pid=3252371 LOG:  database system is ready
to accept connections
time=2022-06-05 18:32:01 CEST, pid=1816 LOG:  database system was
interrupted while in recovery at log time 2022-06-05 18:29:11 CEST
time=2022-06-05 18:32:03 CEST, pid=1813 LOG:  database system is ready to
accept read only connections
time=2022-06-05 19:00:26 CEST, pid=1813 LOG:  database system is ready to
accept connections

The output is by no means complete - I only kept the duplicate entries.

My question:

How is it possible that the error logs are 'merged' across the two database
nodes? Are the message/error-logs also replicated? Is this the intended
behaviour?

Thank you in advance for shedding light on this.

KR p.