Regarding postgre slow query response with pgp_sym_decrypt

Started by Mitali Rajendra Dalviover 12 years ago4 messagesbugs
Jump to latest
#1Mitali Rajendra Dalvi
Mitali_Dalvi@infosys.com

Hello,

I have a simple query in which I am decrypting the column values using pgp_sym_decrypt function.
Query is taking 13 secs to execute which is quite long.
Can you please help me as soon as possible. I have gone through the Support documentation but still it didn't solve my problem.

Thanks & Regards,
Mitali Dalvi

**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
for the use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further, you are not
to copy, disclose, or distribute this e-mail or its contents to any other person and
any such actions are unlawful. This e-mail may contain viruses. Infosys has taken
every reasonable precaution to minimize this risk, but is not liable for any damage
you may sustain as a result of any virus in this e-mail. You should carry out your
own virus checks before opening the e-mail or attachment. Infosys reserves the
right to monitor and review the content of all messages sent to or from this e-mail
address. Messages sent to or from this e-mail address may be stored on the
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***

#2ascot.moss@gmail.com
ascot.moss@gmail.com
In reply to: Mitali Rajendra Dalvi (#1)
Enable WAL Archive in Replication server

Hi,

I want to enable WAL archive on the replica, I am advised that WAL archive can only be enabled on the Master, can you please advise if this is a bug and any workaround available?

regards

now you can only enable WAL archive on the Master server,it will not take effect on replication server.

I can't find the doc which explicit prohibit WAL archive on the replication server,and there are WAL generated in the slave pg_xlog dir with archive_status subdir,so I think this may be a bug.

Jov
blog: http:amutu.com/blog

2013/8/11

Hi,

I want to archive WAL log files in the replication server as well, the postgresql.conf is added with following new lines, after restarting PG, the /var/pgsql/data/archive/ is still empty after 1 hour:

### new lines added today
#
# to enable the replica as Hot Standby
hot_standby = on
#
# to enable WAL archive (coped from master's conf)
wal_level = hot_standby
max_wal_senders = 5
wal_keep_segments = 500
wal_sync_method = fsync
fsync = on
archive_mode = on
archive_command = 'test ! -f /var/pgsql/data/archive/%f && cp %p /var/pgsql/data/archive/%f'
###

ls -la /var/pgsql/data/archive/
total 8
drwx------ 2 postgres root 4096 Aug 11 16:12 ./
drwx------ 3 postgres root 4096 Aug 10 10:59 ../

PG: 9.2.4
OS: Ubuntu 12.04

I am new to Streaming Replication, can you please advise why there is no WAL archive files found in the archive folder?

regards

#3Michael Paquier
michael@paquier.xyz
In reply to: ascot.moss@gmail.com (#2)
Re: Enable WAL Archive in Replication server

On Mon, Aug 12, 2013 at 1:53 AM, ascot.moss@gmail.com
<ascot.moss@gmail.com> wrote:

I want to enable WAL archive on the replica, I am advised that WAL archive
can only be enabled on the Master, can you please advise if this is a bug
and any workaround available?

Archiving a WAL file is only done once its generation has been
completed by a master server. A standby node only replays WAL files,
copying them from the indicated archive folder with restore_command to
its local pg_xlog folder when necessary, and performs no archive
actions.
http://www.postgresql.org/docs/devel/static/continuous-archiving.html#BACKUP-ARCHIVING-WAL
--
Michael

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

#4ascot.moss@gmail.com
ascot.moss@gmail.com
In reply to: Michael Paquier (#3)
Re: Enable WAL Archive in Replication server

Thanks so much.

On 12 Aug 2013, at 6:45 AM, Michael Paquier wrote:

On Mon, Aug 12, 2013 at 1:53 AM, ascot.moss@gmail.com
<ascot.moss@gmail.com> wrote:

I want to enable WAL archive on the replica, I am advised that WAL archive
can only be enabled on the Master, can you please advise if this is a bug
and any workaround available?

Archiving a WAL file is only done once its generation has been
completed by a master server. A standby node only replays WAL files,
copying them from the indicated archive folder with restore_command to
its local pg_xlog folder when necessary, and performs no archive
actions.
http://www.postgresql.org/docs/devel/static/continuous-archiving.html#BACKUP-ARCHIVING-WAL
--
Michael

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