Re: libpq5 error

2024-10-08 Thread Devrim Gündüz
Hi,

On Mon, 2024-10-07 at 08:44 -0700, Adrian Klaver wrote:
> > Unknown Error occurred: Transaction test error:\n file 
> > /usr/share/pgsql/postgres.bki from install of 
> > libpq5-17.0-42PGDG.rhel9.x86_64 conflicts with file from package 
> > postgresql-server-15.8-1.module+el9.4.0+25512+c6b50a48.x86_64\n file
> > /usr/share/pgsql/system_constraints.sql from install of 
> > libpq5-17.0-42PGDG.rhel9.x86_64 conflicts with file from package 
> > postgresql-server-15.8-1.module+el9.4.0+25512+c6b50a48.x86_64\n.

Ah ok. So basically it means PostgreSQL is installed from Red Hat
packages, not PGDG. I would suggest you either not to use PGDG repos at
all for consistency, or switch to PGDG repo and use our packages as a
whole.

...or you can edit /etc/yum.repos.d/pgdg-redhat-all.repo file, and add

exclude=libpq5

under the [pgdg-common] section so that dnf will ignore that.

Regards,


-- 
Devrim Gündüz
Open Source Solution Architect, PostgreSQL Major Contributor
Twitter: @DevrimGunduz , @DevrimGunduzTR


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


txid_current vs xact_commit stats

2024-10-08 Thread senor
HI All;

I was under the impression that all transactions must end with a commit or a 
rollback but watching stats doesn't support this. Web searches tend to return 
info on what a transaction is or the ratio of commits to rollbacks. I found 
nothing contradicting what I think I know.

I've sampled pg_stat_database.xact_commit, pg_stat_database.xact_rollback and 
txid_current() at intervals on a few independent clusters and see that commits 
increase anywhere from 50% to 300% of the rate of transaction increase. 
Rollback remains very near zero for all clusters. Each cluster tends to stay 
consistently within a range (i.e. 120-130% or 50-70%).

I've seen strange issues with the stats collector missing updates and causing 
problems with autovacuum but that wouldn't explain more commits than 
transactions. All clusters receive many inserts (~10-100) in single 
transactions but AFAIK this still counts as a single commit. Many other tables 
are created while processing the inserted data and much of that is done within 
transaction blocks. I'm not aware of anything very sophisticated in the 
application handling this but I could be wrong.

I'm probably missing something fundamental. I know what I know but I'm not a 
DBA.
PG version 11 & 12 on Linux

Any hints and references appreciated.
Thanks,
Senor



Re: txid_current vs xact_commit stats

2024-10-08 Thread Laurenz Albe
On Wed, 2024-10-09 at 04:22 +, senor wrote:
> I was under the impression that all transactions must end with a commit or a
> rollback but watching stats doesn't support this. Web searches tend to return
> info on what a transaction is or the ratio of commits to rollbacks. I found
> nothing contradicting what I think I know.

The rollback can be implicit, for example when you terminate the connection or
crash the server...

Also, PostgreSQL has autocommit, so every data modifying statement that's not
in an explicit transaction will implicitly commit at the end of the statement.

> I've sampled pg_stat_database.xact_commit, pg_stat_database.xact_rollback and
> txid_current() at intervals on a few independent clusters and see that commits
> increase anywhere from 50% to 300% of the rate of transaction increase. 
> Rollback
> remains very near zero for all clusters. Each cluster tends to stay 
> consistently
> within a range (i.e. 120-130% or 50-70%).

Perhaps what I wrote above explains that.

> PG version 11 & 12 on Linux

That's too old.

Yours,
Laurenz Albe




Re: backup

2024-10-08 Thread Andy Hartman
Thanks, I'll check it out.

On Mon, Oct 7, 2024 at 11:25 PM Muhammad Usman Khan 
wrote:

>
> Hi,
> You can refer the following:
> Automating PostgreSQL Backups with Python Using pg_basebackup | by Usman
> Khan | Sep, 2024 | Medium
> 
> Automating PostgreSQL Backups with PG Back Web: The Complete Walkthrough |
> by Usman Khan | Sep, 2024 | Medium
> 
>
> On Mon, 7 Oct 2024 at 20:48, Andy Hartman  wrote:
>
>> anyone use Powershell in an automated fashion to do DB backup?  Would you
>> share your example?
>>
>>  Thanks.
>>
>


Availability of ogr fdw in repository for RHEL 9 / Rocky Linux

2024-10-08 Thread Bill Mische
I see the source rpm for the ogr_fdw_17 extension for Rocky Linux 9, but the 
installation rpm is unavailable. Is this something we build ourselves, or will 
it be available soon?

Thanks,
William Mische